How to build LLVM as ppc64 on Leopard? error: offset in archive not a multiple of 8 (must be since member is an 64-bit object file) #29
Replies: 29 comments 35 replies
-
at a certain point, Apple’s ld64 was written to only build if llvm was available. That can be worked around, perhaps, with suitable effort applied. If you have time and skills, you might make progress. I believe Iain has done some of that, in his xtools repo, already. Good luck! |
Beta Was this translation helpful? Give feedback.
-
@kencu I thought that getting at least one old @iains Have you ever tried? To be clear, I talk about Leopard, of course. P. S. I tried building it on 10.5.8 installation where I already have complete Macports (though a mixture of universal and ppc32), using gcc7, and it still failed:
So yeah, it is not that I am stuck in dependency loop, the thing genuinely fails to build. |
Beta Was this translation helpful? Give feedback.
-
Someone else was interested to get LLVM onto PowerPC Macs: https://discourse.llvm.org/t/want-to-add-powerpc-apple-darwin-as-target-what-is-involved/4536 @catap Notice, in relation to Rust. |
Beta Was this translation helpful? Give feedback.
-
Here's one reference -- perhaps you might be the one to help Iain get it fixed up: http://personal.denison.edu/~bressoud/cs281-s07/MacOSXLowLevelABI.pdf There are a bunch more here, near the bottom of the page: https://personal.denison.edu/~bressoud/cs281-s07/examples.html |
Beta Was this translation helpful? Give feedback.
-
@kencu I decided to try another approach and build @iains By the way, your |
Beta Was this translation helpful? Give feedback.
-
The first attempt failed on the following:
Now trying to build without x86 and arm targets. |
Beta Was this translation helpful? Give feedback.
-
TBH, I am completely lost with what you are trying to achieve here. Unless you are trying to build a 64b toolchain, you do not need a 64b libLTO.dylib .. (and/or libtapi). There is merit in building a 64b ld64 (because the size of debug objects is getting silly with C++) but that is not something to try for a bootstrap-from-native-tools on 10.5 .. |
Beta Was this translation helpful? Give feedback.
-
He is trying to build any version of llvm with a ppc64 slice in it, to then use it to build ppc64 software on Leopard or SnowLeopard (Rosetta or PPC) with llvm. The first (of hundreds?) of bugs is here, llvm-3.4:
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, same
|
Beta Was this translation helpful? Give feedback.
-
@iains I was trying to get the whole Macports on 10.5.8 built as |
Beta Was this translation helpful? Give feedback.
-
@iains Same error with |
Beta Was this translation helpful? Give feedback.
-
should get you done. |
Beta Was this translation helpful? Give feedback.
-
Probably I missed this part. How do I build it without |
Beta Was this translation helpful? Give feedback.
-
I would still like to know the version(s) of the tools that are failing - that helps us build up a map of what works and what doesn't. |
Beta Was this translation helpful? Give feedback.
-
@kencu Here is what I get:
|
Beta Was this translation helpful? Give feedback.
-
@kencu Okay, after tweaking port file I was able to build it. Many thanks for this suggestion! (Hopefully now I can build
|
Beta Was this translation helpful? Give feedback.
-
@iains Could you advise me how to check version of For the linker, this one is
And this one is newly installed following @kencu advice:
|
Beta Was this translation helpful? Give feedback.
-
@iains @kencu Yeah,
|
Beta Was this translation helpful? Give feedback.
-
@iains Here is the output:
I will reboot into another installation of 10.5.8 to make sure everything matches. But yeah, tools should be from Xcode 3.1.4 + whatever Macports installs normally. This installation does not even have custom Port repo. |
Beta Was this translation helpful? Give feedback.
-
I sense an upcoming total purge of all of @barracuda156 's toolchains, and a likely starting over with incredible rigor about what is and what is not, exactly, installed and exactly where it is or is not installed. You learn this after the first hot bath in this stuff :> At least -- I did! |
Beta Was this translation helpful? Give feedback.
-
@iains System
Macports tools give this:
|
Beta Was this translation helpful? Give feedback.
-
@kencu @iains There is some problem with
Compare with the |
Beta Was this translation helpful? Give feedback.
-
my advice is - start out with the Xcode-3.1.4 tools + gcc-4.2 (which is part of those anyway) and I think you should be able to build powerpc64-apple-darwin9 from the gcc-7 branch (although TBH, it would make sense to wait for a back port of the various fixes, including the 64b code-gen one). It depends entirely on your overall objective. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Outside Macports I have your gcc10 and gcc11 which do build on 10.5.8 for ppc+ppc64. |
Beta Was this translation helpful? Give feedback.
-
By the way does this imply that ppc64 is simply broken with "Note 2: Code generation supported for 32-bit ABI only" |
Beta Was this translation helpful? Give feedback.
-
So the ranlib issue kinda sorted, it looks that specific failure happens in
|
Beta Was this translation helpful? Give feedback.
-
Ok, just to update:
The only problem is that they cannot be built with
|
Beta Was this translation helpful? Give feedback.
-
@iains I just noticed that the original patch was from you, and you seem to imply It looked odd that |
Beta Was this translation helpful? Give feedback.
-
I tried once again to set the whole of Macports on Leopard as
ppc64
(dropping+universal
, since that is hopelessly broken), however one obstacle remains: llvm-3.3 and llvm-3.4 fail to build as ppc64: https://trac.macports.org/ticket/64760The failure is identical for either:
The problem is that
llvm
is needed forld64
, which in turn is needed forgcc7
. (And usingld64_xcode
variant of linker fails to buildgcc7
, I tried.)Beta Was this translation helpful? Give feedback.
All reactions