failure to link most programs on Leopard
Ken Cunningham
ken.cunningham.webuse at gmail.com
Sat Nov 14 20:31:40 UTC 2020
> ld: illegal text-relocation to '___cpu_indicator_init' in cpuinfo_s.o
> from 'anon' in cpuinfo_s.o for architecture i386
This is a fairly common error when linking 32 bit software
You fix it with something like this, from the x265 Portfile
========
if {[variant_exists universal] && [variant_isset universal]} {
lappend merger_configure_ldflags(i386) -Wl,-read_only_relocs,suppress
} else {
if {${build_arch} eq "i386"} {
configure.ldflags-append -Wl,-read_only_relocs,suppress
}
}
===========
I notice that block ignores “ppc” which also tends to throw the same error, being 32bit as well.
I’m not positive, but I think at one point in time macports base added this flag to most or all builds, but that went by the wayside when most builds became 64bit intel.
Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20201114/018adfc7/attachment.htm>
More information about the macports-users
mailing list