gcc/config/darwin.h differences between 10.5 & 10.6 #32
Replies: 19 comments 60 replies
-
@kencu This may be a question for you, since it is related to Even stranger, I have built now
Nothing else changed aside of disabling
Help me please, I cannot go on with trial-and-error approach here, it is multi-hour endeavor every time, and I already did two builds resulting in broken |
Beta Was this translation helpful? Give feedback.
-
please note that I will be producing a Darwin branch in the next few days that includes the Arm64 support and some patches that I did not have time to include in 10.3.0 (but that does not affect this current issue AFAICS). |
Beta Was this translation helpful? Give feedback.
-
@iains I attach the log (some part in stage 1 missing due to reboot) and actual resulting archives from Macports software folder, as well as Portfile and patches used. All these from 10.6.8 Server (not from 10A190). |
Beta Was this translation helpful? Give feedback.
-
there are some apparent changes in the libgcc11 libraries that MacPorts has not yet accounted for, so you'll just have to wait a bit until that is fixed in MacPorts. Presumably some of these libraries that no longer exist in gcc 11.3.0 will now be provided in macports by libgcc 10. |
Beta Was this translation helpful? Give feedback.
-
@iains I am finally back to my PPC hardware and trying to minimize changes needed for GCC12 to build on 10.6 PPC. Looking into There are just three instances related to unwinding, from what I can see, and those are not present in rs6000 header but only in the main Darwin one.
Of course I can try patching these one at a time to see what eventually works, but if you can give an advice, that would be very helpful. As always in such cases, I am only asking for your opinion, not wasting your time to try anything in practice (that I do on my end anyway). P. S. It may be perhaps possible to fix 10.6 PPC instead (so that GCC builds on it like on Rosetta), but I don’t know which OS lib has to be backported. |
Beta Was this translation helpful? Give feedback.
-
@iains Thank you, this is very helpful. The initial failure (no patches) was with dynamic linking:
After I added this patch:
Then the build proceeded, but failed on static linking here:
Is |
Beta Was this translation helpful? Give feedback.
-
@iains Here is what I get (removing 10.3–10.5 versions):
Then, for
And for
So it seems symbols are there, but for some reason they do not get picked from libSystem. |
Beta Was this translation helpful? Give feedback.
-
Here is the log prior to undefined symbols error quoted above (the first one, no patches added from my side):
I can find
|
Beta Was this translation helpful? Give feedback.
-
I believe that what would my patch above do, emulating behavior on 10.5.x? Like it is done for some other settings for Rosetta in rs6000 Darwin header.
Yeah, I understand that, but even with earlier (obviously far from optimal) patches What I look for now is: |
Beta Was this translation helpful? Give feedback.
-
@iains Output:
GCC versions: gcc10 10.3.0, gcc11 11.3.0 (I did not run tests, but gcc10 is able to build gcc11, gcc11 builds Cmake, icu and tons of ports. I cannot yet confirm gcc12 on 10.6 PPC, as that is in the process. |
Beta Was this translation helpful? Give feedback.
-
@iains Good news: gcc12 has built through completion with this patch (so all changes moved to PPC header):
Bad news: another fix needed (and rebuild libgcc12 and gcc12 once again) in regard of
Another error when building
Perhaps this should fix it?
(I want to make clear that both Python and jemalloc built fine with gcc11 on 10.6 PPC, so these errors are caused by me not patching some setting correctly, not by GCC or 10.6 PPC as such – since I am trying to minimize required changes.) And to clarify whether I need
There is no such system dylib in 10A190 (but also in 10.5.8, from what I see). This dylib is installed with gcc12 itself though.
P. S. I noticed that gcc12 build used |
Beta Was this translation helpful? Give feedback.
-
@iains I lack the expertise required to judge which is preferable. Yes, some components are newer in 10.5.8, though not all (there is a table with some comparisons in Macrumors thread), and I have no idea which will be comparatively easier pathway. Of course, including PPC64 would make it much better. It could be a decisive factor, IMO. Have you tried restoring PPC64 in 10.6.8 Rosetta? You mentioned that idea somewhere earlier.
Once I am back to uni office, I will try – G5 Quad with external drives for testing is there. P. S. As a matter of curiosity, 10A190 installs in Parallels from DVD iso, but trickery needed, since it is not a server version. But technically one can run it on Intel. Rosetta is not there yet, but ppc binaries build and run. |
Beta Was this translation helpful? Give feedback.
-
Just an update: Python error is gone (once I do not build
|
Beta Was this translation helpful? Give feedback.
-
OK, for the record (I don't intend to spend any more time on this). Neither the pre-built nor a manually-built 10A190:
This highlights the problem - the whole thing is incredibly fragile, depending on a mix of kexts from old and new systems, any slight deviation from a tested set is likely to need changes to the kexts loaded. The problem on the G5 is likely associated with AHCI which, unfortunately is one of the drivers we do not have sources for - I think the PureDarwin project was planning/intending to write a replacement from scratch, but not looked recently. So, IMO, this approach is probably a non-starter for very many people, perhaps it will work for a narrow range of hardware, but then you plug something else in and boom kernel panic. out of curiosity, on the G5 you have working what is the output of |
Beta Was this translation helpful? Give feedback.
-
@iains Thank you for the update. Sad that it does not work. Drivers might be an issue on G5, indeed. Both my PowerMacs G5 are pretty standard in a sense of components - Quad has one of HDDs replaced with SSD, that is it. ATI 1900XT (original for Apple) has no hardware acceleration (or something related), but works normally. Nvidia card is fully supported. Case of PowerBook is a bit surprising. I know for sure that 10A190 works on PB G4 1.5 GHz 2005 and on MacMini G4, cannot remember the model, perhaps 1.4 GHz, one of the latest. But who knows, maybe some unsupported video card or smth else. This is from G5 2.3 GHz (I think 10A190 here has not been tweaked):
I will update with the output from Quad tomorrow, hopefully. It is sitting in uni office. |
Beta Was this translation helpful? Give feedback.
-
We have one (1) Iain. He is the only compiler engineer working with gcc for MacOS. Having him spend 99% of his time in these forums debugging 10.6 on PowerPC issues is counterproductive to all the real work that needs to be done. But he has already said he will spend no more time on it, so hopefully that will be the end of the questions about it. |
Beta Was this translation helpful? Give feedback.
-
my apologies for seeming too dogmatic. I do have an opinion on this, hopefully spoken clearly but not excessively, but hobbies are fun, and pursue what you wish. @barracuda156, you are learning a lot about macOS, gcc, and macports, and whatever led you to this is certainly fine. |
Beta Was this translation helpful? Give feedback.
-
macports offers blocks as an available port for < 10.6 https://ports.macports.org/port/libblocksruntime/ it does a fine job to supply that functionality to such systems. I had hoped that libdispatch might similarly be added. Most of the posix bits that are found on 10.7+ have been added to older systems by legacysupport: |
Beta Was this translation helpful? Give feedback.
-
@iains I tried building And another missing symbol (happens only on 10.5.8) is another instance of |
Beta Was this translation helpful? Give feedback.
-
@iains This is not an urgent matter, but I will greatly appreciate your comment, when you have few extra minutes.
gcc/config/darwin.h
has several settings that differentiate between 10.5 & 10.6 (this is nothing new, though the recent updates togcc10
andgcc11
modified some of those).Besides an obvious fact that several of these refer to specific libs/objects which may or may not be present in the host OS, what in particular do they control? Is resulting configuration on standard 10.6 better than on 10.5 in practical terms? I mean, is there an advantage to gain, or it is just a matter of compatibility with little to no consequence for compiler’s functionality?
There is a practical bearing to this matter: while original @kencu solution for building
gcc7
on 10.6 PPC was to “trick” config into thinking it is more or less 10.5, it may not be necessary to change all of these settings. For example,crt1.10.6.o
exists in 10A222 (the build which is very close to 10A190 with many compatible components), and I have just builtgcc11
on 10A190 leaving>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o
as is, and it worked. But I don’t know if it makes sense to do such peace-meal adjustments.P. S. While I ask this in relation to
gcc
on 10A190, I don’t expect an answer based on the knowledge of 10A190 as such. I just need to understand what differs between 10.5 & 10.6, and then I can figure out where exactly “in between” lies 10A190, and in which ways it can be brought closer to standard 10.6 (10A432).@kencu @catap Tagging you in a case you may be interested to join.
Beta Was this translation helpful? Give feedback.
All reactions