From: Steve Peters Date: 2006-03-09T05:26:34+09:00 Subject: Re: Ruby c++ extension on intel mac --HG+GLK89HZ1zG0kk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 09, 2006 at 05:04:33AM +0900, Gareth Reeves wrote: > Hey, >=20 > I am having trouble building an extension on a new intel mac. The=20 > extension I have at the moment is simple, basically the example out of=20 > the big ruby book. >=20 > The error I get when building is >=20 > macbook:~/projects/extension_shared_ptr_test reevesg$ make > cc -bundle -L"/usr/lib" -o Extension.bundle extension.o -lruby=20 > -lpthread -ldl -lobjc > /usr/bin/ld: Undefined symbols: > ___gxx_personality_v0 > collect2: ld returned 1 exit status > make: *** [Extension.bundle] Error 1 > macbook:~/projects/extension_shared_ptr_test reevesg$ >=20 > I think i may need to build my ruby from scratch because this sounds=20 > like a gcc incompatibility to me. >=20 > Here is my gcc output >=20 > macbook:~/projects/extension_shared_ptr_test reevesg$ gcc -v > Using built-in specs. > Target: i686-apple-darwin8 > Configured with: /private/var/tmp/gcc/gcc-5250.obj~20/src/configure=20 > --disable-checking -enable-werror --prefix=3D/usr --mandir=3D/share/man= =20 > --enable-languages=3Dc,objc,c++,obj-c++=20 > --program-transform-name=3D/^[cg][^.-]*$/s/$/-4.0/=20 > --with-gxx-include-dir=3D/include/c++/4.0.0 --build=3Dpowerpc-apple-darwi= n8=20 > --with-arch=3Dpentium-m --with-tune=3Dprescott --program-prefix=3D=20 > --host=3Di686-apple-darwin8 --target=3Di686-apple-darwin8 > Thread model: posix > gcc version 4.0.1 (Apple Computer, Inc. build 5250) > macbook:~/projects/extension_shared_ptr_test reevesg$ >=20 > Anyone got any ideas on how to proceed? Is there a ruby extensions list= =20 > or IIRC channel somewhere. I could definitely use the help. >=20 On my iBook, ___gxx_personality_v0 is in libstdc++.dylib. Maybe you need to add an explicit -lstdc++ to compile it. Steve Peters steve@fisharerojo.org=20 --HG+GLK89HZ1zG0kk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFEDz4D9T8SSoPkrKIRAiXKAJ9SUm7GOFoW6W517coWbukX642eQgCgt/cM JmNmKslOzhX5aRL6SgDXxGc= =e57R -----END PGP SIGNATURE----- --HG+GLK89HZ1zG0kk--