[MacPorts] #64525: many ports fail to build for ppc on 10.6.8 (Rosetta) due to collect2: ld terminated with signal 6 [Abort trap]
MacPorts
noreply at macports.org
Thu Jan 27 08:16:38 UTC 2022
#64525: many ports fail to build for ppc on 10.6.8 (Rosetta) due to collect2: ld
terminated with signal 6 [Abort trap]
-------------------------------+-------------------------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords: powerpc, snowleopard, rosetta
Port: shared-mime-info |
-------------------------------+-------------------------------------------
Comment (by barracuda156):
Replying to [comment:8 kencu]:
> Replying to [comment:4 barracuda156]:
>
> You have, in MacPorts, the ld that comes with Xcode (which is usually
also the one installed in the system at /usr) although with 10.6.8 that
can be confused as there are several choices for Xcode.
>
> You have ld64-97, and ld64-127.
>
> After that, PowerPC support is not present in MacPorts linkers.
>
> We used to think that ld64-97 was best for Tiger, and ld64-127 was best
for Leopard PPC, but explorations over the past month that we have done,
as you know, show that ld64-97 is probably today the most reliable general
linker for PowerPC code.
>
> It is still not 100% clear if there are cases where certain things will
not build with ld64-97 but do build with ld64-127 that might mess that up,
for example rpath support, etc, etc, etc.
>
> > And how can I switch between these? `--with-ld=` works sometimes, but
often is not recognized by compiler or build system (or maybe I use it in
a wrong way).
>
> That is not always simple to say. Each compiler has a default linker
that it knows where to find. It can be hard to override that default
linker by using build or configure lines, so what MacPorts did instead is
change what that default linker points to by using the ld64 "shim" port
that installs symlinks to the desired linker.
>
> But that is default linker for the whole system, and it's not simple to
change on a build-by-build basis.
>
> If you want the compiler to use a linker other than a default linker,
you need to explore what environment variables and build arguments that
compiler is prepared to respond to. Some trial-and-error can be involved.
>
> See <https://stackoverflow.com/questions/40470931/how-to-specify-
alternate-linker-command-when-linking-with-cc> for example, and
<https://gcc.gnu.org/onlinedocs/gccint/Driver.html#Driver> and probably
many other google hits that might well be better.
--
Ticket URL: <https://trac.macports.org/ticket/64525#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list