Note that there are some explanatory texts on larger screens.

plurals
  1. POBuilding gcc 4.5.2 on snow leopard fails linking with unsupported file format
    text
    copied!<p>I'm working on OS X 10.6.6 to build a gcc cross-compiler and gnu java for an embedded system. gcc native and cross need to be the same version, so I want to get everything up to the latest gcc version. After building gmp, mpfr, mpc, and binutils with no problem, building native gcc is failing with what I think is the first link step. The specific step that fails is:</p> <pre><code>fixincludes$ gcc -g -O2 -o fixincl fixincl.o fixtests.o fixfixes.o server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a ld: warning: in ../libiberty/libiberty.a, file was built for unsupported file format which is not the architecture being linked (x86_64) </code></pre> <p>Lots of undefined symbol errors follow this warning. libiberty.a and the .o files appear to be the same architecture:</p> <pre><code>fixincludes$ lipo -info ../libiberty/libiberty.a input file ../libiberty/libiberty.a is not a fat file Non-fat file: ../libiberty/libiberty.a is architecture: x86_64 fixincludes$ lipo -info *.o Non-fat file: fixfixes.o is architecture: x86_64 Non-fat file: fixincl.o is architecture: x86_64 Non-fat file: fixlib.o is architecture: x86_64 Non-fat file: fixopts.o is architecture: x86_64 Non-fat file: fixtests.o is architecture: x86_64 Non-fat file: procopen.o is architecture: x86_64 Non-fat file: server.o is architecture: x86_64 </code></pre> <p>I suspect this has to do with 32-bit vs 64-bit, but I don't know what else to check and can't find a specific solution anywhere. Can anyone tell me what's going on here or just nudge me in the right direction?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload