Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
So in other words we need to compile the 10A222 kernel on 10A190? Shame that it's one of those instances where replacing the kernel from an older version works, e.g. 10.5.8 with the 10.5.5 kernel...

AFAIK, there are no sources for any of the DPs, perhaps aside of [some?] Unix tools.
 

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
Still interested in R?

I have written an implementation to install R packages via Macports – and while it is not as easy as adding a PG line, once I figured out how to deal with typical errors in a alien R way, things get fixed.

You will likely get malloc errors on PPC, if you install packages directly. I suspect it is because some packages link to libgcc_s.1 in /usr/lib and not a native dylib of the compiler (since C++11 is needed, gcc-4.2 cannot be used).
otool -L shows libraries being linked.
So anyway, normally these are quite easy to fix in Macports with legacysupport.redirect_bins, but it does not work with R packages (or my implementation of install system); however, I found a manual way to achieve the same result.

Long story short, in about a day I wrote PG, about 120 ports, and finally have RStan built and provisionally working:

View attachment 2124354

UPD. R-app for 10.6 PPC: https://github.com/barracuda156/macports-ports/tree/snow-ppc/math/R-app
Also, rather use R portgroup and ports from this tree: https://github.com/barracuda156/macports-ports/tree/R

I.e., PG: https://github.com/barracuda156/macports-ports/blob/R/_resources/port1.0/group/R-1.0.tcl
And everything from here: https://github.com/barracuda156/macports-ports/tree/R/R

Notice, building R ports require C++11 compiler and modern gfortran, gcc12 works fine, but use a patched version for 10A190: https://github.com/barracuda156/macports-ports/tree/snow-ppc/lang/gcc12
 
Last edited:

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
This is correct. DP sources were internal only, for obvious reasons. The only source code available is for builds 10432 onwards and some for the early developer toolchain. Links to all shared previously.

Just in case, not sure you noticed my post somewhere above: it may be easier to rebuild some system components within Macports environment, just ensuring that linking is done to OS components and nothing inside Macports prefix (this is perfectly doable, and several ports do this already). Destroot stage can be adjusted also in order for produced binaries either be installed into needed spots in the OS or – perhaps a safer way – stored into /var/roots or alike to be installed manually.
Perhaps a separate Macports tree can be used, so that all Unix tools can be built with needed – obviously outdated by now – versions.

P. S. I can write some ports if anyone interested, wanted to do it earlier, but been busy with other stuff.
 
  • Like
Reactions: pc297 and TheStork

pc297

macrumors 6502
Sep 26, 2015
333
206
So the mini G4 (silent upgrade 1.5GHz) can boot SL 10A190, a bit sluggish but useable. No QE/CI of course as not only the GPU is a AGP but also a Radeon 9200 which doesn't stand a chance to support CI, so software-only QE it is due to it being AGP obvsiously.

I will edit the Wiki table accordingly if it's okay!
 

Attachments

  • IMG_20230111_020236.jpg
    IMG_20230111_020236.jpg
    334.9 KB · Views: 161
Last edited:
  • Like
Reactions: barracuda156

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
So the mini G4 (silent upgrade 1.5GHz) can boot SL 10A190, a bit sluggish but useable. No QE/CI of course as not only the GPU is a AGP but also a Radeon 9200 which doesn't stand a chance to support CI, so software-only QE it is due to it being AGP obvsiously.

I will edit the Wiki table accordingly if it's okay!

Great! 1.42 also boots into 10A190, though I did not have patience to test it beyond installation LOL
 
  • Like
Reactions: pc297

MacPro2006VBox

macrumors 6502
Oct 9, 2014
337
226
So the mini G4 (silent upgrade 1.5GHz) can boot SL 10A190, a bit sluggish but useable. No QE/CI of course as not only the GPU is a AGP but also a Radeon 9200 which doesn't stand a chance to support CI, so software-only QE it is due to it being AGP obvsiously.

I will edit the Wiki table accordingly if it's okay!

Try introducing the Radeon8500 kexts and bundles… that seemed to be partially functional… it gets you a framebuffer at least.
 

pc297

macrumors 6502
Sep 26, 2015
333
206
They’re not, no.

Use Table 4 as a road map to carry over kexts, bundles, and frameworks from a 10.5.8 source, to help with graphics. The ones to pay especial notice for Radeon GPU support are concentrated in this segment:

View attachment 2140473
Cheers for that, I hadn't paid attention as to whether they were there or not, as I had seen the X1000 and X2000 kexts I incorrectly assumed that they were present in 10A190! I will try the 8500 and 9700 kexts on the mini and DLSD, respectively!
 
  • Like
Reactions: B S Magnet

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
Does anyone know if these can be accessed via preprocessor macros?

I am thinking how is may be possible to differentiate at compile time between pre-release 10.6 PPC and release 10.6.x Rosetta.
 

joevt

Contributor
Jun 21, 2012
6,689
4,086
Does anyone know if these can be accessed via preprocessor macros?

I am thinking how is may be possible to differentiate at compile time between pre-release 10.6 PPC and release 10.6.x Rosetta.
libkern is for the kernel. Rosetta is only used in user space programs.

What do you mean by pre-release 10.6 and release 10.6.x? Why do you need to detect this difference? What do you need to do differently for each?

At compile time you have access to stuff defined in the SDK that you are compiling against, the CPU architecture, the deployment target OS version, the minimum required OS version and the max allowed OS version, compiler type. See AvailabilityMacros.h and TargetConditionals.h.
 

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
libkern is for the kernel. Rosetta is only used in user space programs.

What do you mean by pre-release 10.6 and release 10.6.x? Why do you need to detect this difference? What do you need to do differently for each?

At compile time you have access to stuff defined in the SDK that you are compiling against, the CPU architecture, the deployment target OS version, the minimum required OS version and the max allowed OS version, compiler type. See AvailabilityMacros.h and TargetConditionals.h.
There are two rather different systems which identify as 10.6 with build arch ppc. As long as there is no way to make a difference between those for compiler, some ports won’t be fixed, because no one will prioritize pre-release developer build. First of all, GCC itself. 10A190 needs a slightly different config – which would be trivial to implement if only we could use a macro to make a special case for 10.6 pre-release.
 

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
May be worth changing type in /usr/include/pthread.h to const char*:
Code:
int        pthread_setname_np(const char*);
Later 10.6.x uses const char* here, Macports uses it in legacysupport, some other software does as well. Having conflicting defines can break compilation.
 
  • Like
Reactions: ChrisCharman

ChrisCharman

macrumors 6502
May 10, 2020
411
581
Bournemouth, UK
Since ChatGPT is the latest wonder of the world and apparently has the ability to analyse and write code, I thought i’d ask it a few questions to see if it could be of use to this project.


Me:

If you were provided with code, could you identify powerpc incompatibility within the code and suggest changes?



ChatGPT:

Yes, as an AI language model, I can review code and suggest changes to address any incompatibility with the PowerPC architecture. However, I should note that this can be a complex task that requires a deep understanding of both the PowerPC architecture and the specific code being analyzed.

Some common sources of PowerPC incompatibility in code include the use of Intel-specific instructions or data types, endianess differences, or assumptions about the alignment of memory addresses. In order to identify and address these issues, I would need to review the code in question and analyze it in the context of the PowerPC architecture.

If you provide me with specific code, I can review it and provide suggestions for modifications that may be needed to make it compatible with the PowerPC architecture. However, I should also note that this is a specialized task that may require additional expertise beyond my general knowledge of computer systems and programming.

Wanting to compare 10A190 vs 10A432 i asked for ChatGPT to write a script for me:

ChatGPT:
To compare two filesystem trees and output all files that are different or missing from one to the other, you can use the rsync command with the --dry-run and --itemize-changesoptions. Here's an example script:



#!/bin/bash



# Check if the correct number of arguments is provided

if [ "$#" -ne 2 ]; then

echo "Usage: $0 <dir1> <dir2>"

exit 1

fi



# Check if the directories exist

if [ ! -d "$1" ]; then

echo "Directory $1 not found"

exit 1

fi



if [ ! -d "$2" ]; then

echo "Directory $2 not found"

exit 1

fi



# Use the rsync command to compare the directories

rsync_output=$(rsync -n -i -r "$1/" "$2/")



# Check the output of rsync to determine if the directories are the same or different

if [ -z "$rsync_output" ]; then

echo "Directories $1 and $2 are the same"

else

echo "Directories $1 and $2 are different"

echo "$rsync_output"

fi



Save this script as compare.sh and make it executable with chmod +x compare.sh. To use it, simply run ./compare.sh dir1 dir2, replacing dir1 and dir2 with the names of the directories you want to compare.

This script will output all files that are different or missing from one directory to the other. The output will look something like this:



Directories dir1 and dir2 are different

>f+++++++++ dir1/file1

>f..t...... dir1/file2

>f..t...... dir2/file2

<f+++++++++ dir2/file3



Each line of output represents a file that is different or missing from one directory to the other. The first character indicates the type of change:

  • > indicates a file that is missing from the second directory
  • < indicates a file that is missing from the first directory
  • c indicates a file that is changed (different contents)
  • s indicates a file that is changed (different size)
  • t indicates a file that is changed (different modification time)
  • p indicates a file that is changed (different permissions)
  • m indicates a file that is changed (different checksum)


The remaining characters indicate the details of the change. For example, f+++++++++ dir1/file1 means that the file file1 is present in the first directory but missing from the second directory.

Me: Write a script that looks at the source code for 10.5 xnu and compares the changes to 10.6 xnu and outputs to a text file.

ChatGPT:

Sure, here's a script that compares the xnu 10.5 and 10.6 codebases and outputs the differences to a file, along with comments explaining each step:



#!/bin/bash



# This script compares the xnu 10.5 and 10.6 codebases to identify differences that may be specific to Intel architectures.



# Set the directories to compare

dir1="/path/to/xnu10.5"

dir2="/path/to/xnu10.6"



# Set the output file

outfile="/path/to/output.txt"



# Use the diff command to compare the two directories and output the differences to a file

# The -r option recursively compares the contents of the directories

# The -q option reports only whether files differ, rather than the differences themselves

# The > operator redirects the output to the specified file

diff -r -q $dir1 $dir2 > $outfile



# Output a message indicating whether any differences were found

if [ -s $outfile ]

then

echo "Differences found. See $outfile for details."

else

echo "No differences found."

fi



This script uses the diff command to compare the contents of the two directories and output the differences to the file specified by the outfile variable. The -r option recursively compares the contents of the directories, and the -q option reports only whether files differ, rather than the differences themselves. The `> operator redirects the output to the specified file.

The script also includes a message indicating whether any differences were found, based on the size of the output file. If the file is not empty (i.e., there were differences), the script outputs a message indicating that differences were found and provides the path to the output file. If the file is empty (i.e., there were no differences), the script outputs a message indicating that no differences were found.

You can customize the dir1, dir2, and outfile variables to match the directories and file paths on your local machine.

Finally, i asked ChatGPT to consider that creating a 10.6 PPC kernel was important and how one might go about achieving that goal:

ChatGPT:

If it were important to build a PowerPC version of the 10.6 xnu kernel, there are a few possible solutions that could be pursued. Here are some possible approaches:



  1. Use the source code from the Mac OS X 10.5 Leopard xnu kernel as a starting point: Since Mac OS X 10.5 was the last version of Mac OS X to support PowerPC-based Macs, it includes a version of the xnu kernel that is compatible with the PowerPC architecture. This source code could be used as a starting point for developing a PowerPC version of the 10.6 xnu kernel. However, this approach would require identifying the differences between the 10.5 and 10.6 versions of the kernel and modifying the 10.5 code to include the improvements made in 10.6.
  2. Reimplement the incompatible x86 code with PowerPC-compatible code: As I mentioned earlier, some of the improvements made to the xnu kernel in 10.6 Snow Leopard may have been specific to the x86 architecture and not compatible with PowerPC. If this is the case, it may be necessary to reimplement the x86-specific code with PowerPC-compatible code. This approach would require a deep understanding of the kernel's architecture and functionality, as well as the ability to write low-level code that interacts with hardware.
  3. Adapt open-source kernel code for PowerPC compatibility: There are several open-source kernel projects that support the PowerPC architecture, such as the Linux kernel and the FreeBSD kernel. It may be possible to adapt some of this open-source code for use in a PowerPC version of the 10.6 xnu kernel. However, this approach would require significant modification of the open-source code to make it compatible with the xnu kernel's design and functionality.
  4. Port the entire kernel to PowerPC: Finally, it may be possible to port the entire 10.6 xnu kernel to the PowerPC architecture. This approach would require modifying the entire codebase to work with the PowerPC architecture, as well as potentially redesigning some of the kernel's functionality to work with different hardware and software constraints. This would be a significant undertaking, but would result in a fully compatible PowerPC version of the 10.6 xnu kernel.
  5. Overall, building a PowerPC version of the 10.6 xnu kernel would be a complex and challenging task, requiring a deep understanding of the kernel's architecture and low-level coding skills. However, with the right expertise and resources, it may be possible to implement one of the above solutions to create a PowerPC-compatible version of the kernel.
 
Last edited:
Since ChatGPT is the latest wonder of the world and apparently has the ability to analyse and write code, I thought i’d ask it a few questions to see if it could be of use to this project.


Me:

If you were provided with code, could you identify powerpc incompatibility within the code and suggest changes?



ChatGPT:

Yes, as an AI language model, I can review code and suggest changes to address any incompatibility with the PowerPC architecture. However, I should note that this can be a complex task that requires a deep understanding of both the PowerPC architecture and the specific code being analyzed.

Some common sources of PowerPC incompatibility in code include the use of Intel-specific instructions or data types, endianess differences, or assumptions about the alignment of memory addresses. In order to identify and address these issues, I would need to review the code in question and analyze it in the context of the PowerPC architecture.

If you provide me with specific code, I can review it and provide suggestions for modifications that may be needed to make it compatible with the PowerPC architecture. However, I should also note that this is a specialized task that may require additional expertise beyond my general knowledge of computer systems and programming.

Wanting to compare 10A190 vs 10A432 i asked for ChatGPT to write a script for me:

ChatGPT:
To compare two filesystem trees and output all files that are different or missing from one to the other, you can use the rsync command with the --dry-run and --itemize-changesoptions. Here's an example script:



#!/bin/bash



# Check if the correct number of arguments is provided

if [ "$#" -ne 2 ]; then

echo "Usage: $0 <dir1> <dir2>"

exit 1

fi



# Check if the directories exist

if [ ! -d "$1" ]; then

echo "Directory $1 not found"

exit 1

fi



if [ ! -d "$2" ]; then

echo "Directory $2 not found"

exit 1

fi



# Use the rsync command to compare the directories

rsync_output=$(rsync -n -i -r "$1/" "$2/")



# Check the output of rsync to determine if the directories are the same or different

if [ -z "$rsync_output" ]; then

echo "Directories $1 and $2 are the same"

else

echo "Directories $1 and $2 are different"

echo "$rsync_output"

fi



Save this script as compare.sh and make it executable with chmod +x compare.sh. To use it, simply run ./compare.sh dir1 dir2, replacing dir1 and dir2 with the names of the directories you want to compare.

This script will output all files that are different or missing from one directory to the other. The output will look something like this:



Directories dir1 and dir2 are different

>f+++++++++ dir1/file1

>f..t...... dir1/file2

>f..t...... dir2/file2

<f+++++++++ dir2/file3



Each line of output represents a file that is different or missing from one directory to the other. The first character indicates the type of change:

  • > indicates a file that is missing from the second directory
  • < indicates a file that is missing from the first directory
  • c indicates a file that is changed (different contents)
  • s indicates a file that is changed (different size)
  • t indicates a file that is changed (different modification time)
  • p indicates a file that is changed (different permissions)
  • m indicates a file that is changed (different checksum)


The remaining characters indicate the details of the change. For example, f+++++++++ dir1/file1 means that the file file1 is present in the first directory but missing from the second directory.

Me: Write a script that looks at the source code for 10.5 xnu and compares the changes to 10.6 xnu and outputs to a text file.

ChatGPT:

Sure, here's a script that compares the xnu 10.5 and 10.6 codebases and outputs the differences to a file, along with comments explaining each step:



#!/bin/bash



# This script compares the xnu 10.5 and 10.6 codebases to identify differences that may be specific to Intel architectures.



# Set the directories to compare

dir1="/path/to/xnu10.5"

dir2="/path/to/xnu10.6"



# Set the output file

outfile="/path/to/output.txt"



# Use the diff command to compare the two directories and output the differences to a file

# The -r option recursively compares the contents of the directories

# The -q option reports only whether files differ, rather than the differences themselves

# The > operator redirects the output to the specified file

diff -r -q $dir1 $dir2 > $outfile



# Output a message indicating whether any differences were found

if [ -s $outfile ]

then

echo "Differences found. See $outfile for details."

else

echo "No differences found."

fi



This script uses the diff command to compare the contents of the two directories and output the differences to the file specified by the outfile variable. The -r option recursively compares the contents of the directories, and the -q option reports only whether files differ, rather than the differences themselves. The `> operator redirects the output to the specified file.

The script also includes a message indicating whether any differences were found, based on the size of the output file. If the file is not empty (i.e., there were differences), the script outputs a message indicating that differences were found and provides the path to the output file. If the file is empty (i.e., there were no differences), the script outputs a message indicating that no differences were found.

You can customize the dir1, dir2, and outfile variables to match the directories and file paths on your local machine.

Finally, i asked ChatGPT to consider that creating a 10.6 PPC kernel was important and how one might go about achieving that goal:

ChatGPT:

If it were important to build a PowerPC version of the 10.6 xnu kernel, there are a few possible solutions that could be pursued. Here are some possible approaches:



  1. Use the source code from the Mac OS X 10.5 Leopard xnu kernel as a starting point: Since Mac OS X 10.5 was the last version of Mac OS X to support PowerPC-based Macs, it includes a version of the xnu kernel that is compatible with the PowerPC architecture. This source code could be used as a starting point for developing a PowerPC version of the 10.6 xnu kernel. However, this approach would require identifying the differences between the 10.5 and 10.6 versions of the kernel and modifying the 10.5 code to include the improvements made in 10.6.
  2. Reimplement the incompatible x86 code with PowerPC-compatible code: As I mentioned earlier, some of the improvements made to the xnu kernel in 10.6 Snow Leopard may have been specific to the x86 architecture and not compatible with PowerPC. If this is the case, it may be necessary to reimplement the x86-specific code with PowerPC-compatible code. This approach would require a deep understanding of the kernel's architecture and functionality, as well as the ability to write low-level code that interacts with hardware.
  3. Adapt open-source kernel code for PowerPC compatibility: There are several open-source kernel projects that support the PowerPC architecture, such as the Linux kernel and the FreeBSD kernel. It may be possible to adapt some of this open-source code for use in a PowerPC version of the 10.6 xnu kernel. However, this approach would require significant modification of the open-source code to make it compatible with the xnu kernel's design and functionality.
  4. Port the entire kernel to PowerPC: Finally, it may be possible to port the entire 10.6 xnu kernel to the PowerPC architecture. This approach would require modifying the entire codebase to work with the PowerPC architecture, as well as potentially redesigning some of the kernel's functionality to work with different hardware and software constraints. This would be a significant undertaking, but would result in a fully compatible PowerPC version of the 10.6 xnu kernel.
  5. Overall, building a PowerPC version of the 10.6 xnu kernel would be a complex and challenging task, requiring a deep understanding of the kernel's architecture and low-level coding skills. However, with the right expertise and resources, it may be possible to implement one of the above solutions to create a PowerPC-compatible version of the kernel.

Holy frack, I’m gobsmacked. :O

Are you going to try these suggestions?
 

armdn

macrumors member
Feb 16, 2012
76
95
Interesting. Given that LibreSSL of the latest versions is easily assembled for Tiger and Leopard, you can even implement TLSv1.3 support in the "new" Snow Leopard. For example, I even have OpenSSH built using the LibreSSL library of the latest version in 10.4.11. ))
 

barracuda156

macrumors 68000
Sep 3, 2021
1,736
1,268
Interesting. Given that LibreSSL of the latest versions is easily assembled for Tiger and Leopard, you can even implement TLSv1.3 support in the "new" Snow Leopard. For example, I even have OpenSSH built using the LibreSSL library of the latest version in 10.4.11. ))

The latest OpenSSH certainly builds on 10.6 PPC.
 
  • Like
Reactions: lepidotós

zachiedoo

macrumors regular
Nov 3, 2022
162
91
S QC
I have a 1.25Ghz G5 PowerPC mini with 1GB of RAM and soon, a 120GB SSD. It's currently running 10.4.11, Tiger. Can I run Clouded Leopard on that? Or, do I need Leopard, first? If so, is there anywhere to get Leopard at this late date?
 
  • Like
Reactions: ChrisCharman

ChrisCharman

macrumors 6502
May 10, 2020
411
581
Bournemouth, UK
I have a 1.25Ghz G5 PowerPC mini with 1GB of RAM and soon, a 120GB SSD. It's currently running 10.4.11, Tiger. Can I run Clouded Leopard on that? Or, do I need Leopard, first? If so, is there anywhere to get Leopard at this late date?
You can create a new partition and then clone either the 10A096 pre-installed image if you want to follow @B S Magnet with the instructions to create ‘clouded leopard’ using the wiki post as a guide, or you can clone the 10A190 pre-installed image which is more experimental at the moment, but @barracuda156 provides support for MacPorts on that version. It really depends on what you’re looking to get out of it - both are pre-release software that require continued tinkering and it is not a completed project. If you wish to assist with testing or contribute ideas please do so.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.