How do I compile GCC on OS X?
March 4, 2006 8:10 AM
Subscribe
When compiling gcc-3.4.4 on OS X 10.4.5 I get an error about an undefined symbol,
_fprintf$LDBLStub. How do I make this go away?
Google shows that this is a really common problem. However, I can't seem to find a solution that works for me.
The two suggestions I see the most are to use GCC 3.3 (
gcc_select 3.3) and/or to include
-lSystemStubs for linking. I've tried with both the GCC 3.3 and GCC 4.0.1 compilers on my system, same results with either. I'm a bit wary about the
-lSystemStubs suggestion since this is GCC (I find it more intimidating than most programs). Also, it takes a long time to build and I'm not exactly sure how to make sure it uses that library (just set
LDFLAGS?).
I need to compile this for myself and I do need GCC 3.4.4. So I'm not looking for binaries or different versions of GCC. I know other OS X users have gotten this to build but I'm not sure exactly how, but I do know it's possible.
posted by mto to computers & internet (7 comments total)
It will look in your LD_LIBRARY_PATH for it, or you can type -L(specific directory where SystemStubs lives). if you do:
find . -name "*SystemStubs*"
at the top level of your computer, you should find where it lives on your machine (if it does). If it's in a normal place (like /usr/lib or /usr/local/lib or something) then your LD_LIBRARY_PATH should find it when you try to compile.
If it doesn't, you need to install the library.
(Note: I am not an OS X user, just a linux/unix user, but I've fussed around with OS X and these commands should work the same on both)
posted by j at 8:29 AM on March 4, 2006