#20933: gcc42, gcc43 on snow leopard: in libmpfr.dylib, libgmp.dylib, libiconv.dylib, file is not of required architecture ------------------------------+--------------------------------------------- Reporter: ram@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: snowleopard | Port: gcc42, gcc43 ------------------------------+--------------------------------------------- Comment(by epimetheus314@…): Replying to [comment:1 ryandesign@…]: {{{ ld: warning: in /opt/local/lib/libmpfr.dylib, file is not of required architecture ld: warning: in /opt/local/lib/libgmp.dylib, file is not of required architecture ld: warning: in /opt/local/lib/libiconv.dylib, file is not of required architecture }}}
I see the same with gcc43. These libraries are x86_64 on my system. Perhaps gcc doesn't realize it's supposed to be building x86_64 things.
I had the same problem. Since my iMac with Core 2 Duo is an old model, the kernel runs in a 32bit mode while Apple's gcc produces x86_64 executables. I found the problem is that 'config.guess' in gcc's source directory returns 'i386-apple-darwin10.0.0' based on the output of `uname -p`. So I took the following procedure, which worked fine for me: 1) Add three lines to 'configure.args' section in Portfile like: {{{ 80,81c80,84 < --with-mpfr=${prefix} < # do NOT use MacPorts binutils -- they do not work ---
--with-mpfr=${prefix} \ --build=x86_64-apple-darwin10 \ --host=x86_64-apple-darwin10 \ --target=x86_64-apple-darwin10 # do NOT use MacPorts binutils -- they do not work
}}} 2) Install gcc43. This time it does not yield dylibs incompatibilities mentioned above, but yields the same error with #20816. 3) cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc43/work/gcc-4.3.4/gcc/cp/ 4) Edit line 76 of 'Make-lang.in' and remove 'tree-inline.o' from CXX_C_OBJS. 5) Resume compiling. -- Ticket URL: <http://trac.macports.org/ticket/20933#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS