failure to link most programs on Leopard

Riccardo Mottola riccardo.mottola at
Sun Nov 29 11:48:18 UTC 2020


after some days with the "head under water" I had time to resume work on MacPorts upgrades.

I restarted and the error I pasted below happened for me e.g. in gcc 48 and gcc6 upgrade. 

On 2020-11-14 20:31:40 +0000 Ken Cunningham <ken.cunningham.webuse at> wrote:

>> 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.

While what you proposed makes sense to me, it didn't help in my case. Strange, gcc 4.8 gets rebuild trarely, but gcc6 built without issues just somemonths ago, I believe.
I just pasted your snipped into the port...

What helped was deactivating all clangs, then both gcc48 and gcc6 were happy, then reactivating.

This "proves" that the issue is the AS going through clang. 


More information about the macports-users mailing list