2009
07.10

Some of you may be running into the same problem while trying to compile ruby 1.9 on OS X with iPhone SDK installed:

ld: in /usr/local/lib/libstdc++.6.dylib, file is not of required architecture
collect2: ld returned 1 exit status
make[1]: *** [.ext/i386-darwin9.6.0/enc/encdb.bundle] Error 1

This odd error is produced by iPhone SDK, which installs ARM libraries in /usr/local/lib.
You can easily work this around by specifying proper LDFLAGS for make:

$ make LDFLAGS="-L. -L/usr/lib"

1 comment so far

Add Your Comment
  1. Thank you, that was useful for installing libgd too.