Ruby c++ extension on intel mac

G

Gareth Reeves

Hey,

I am having trouble building an extension on a new intel mac. The
extension I have at the moment is simple, basically the example out of
the big ruby book.

The error I get when building is

macbook:~/projects/extension_shared_ptr_test reevesg$ make
cc -bundle -L"/usr/lib" -o Extension.bundle extension.o -lruby
-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$

I think i may need to build my ruby from scratch because this sounds
like a gcc incompatibility to me.

Here is my gcc output

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
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --build=powerpc-apple-darwin8
--with-arch=pentium-m --with-tune=prescott --program-prefix=
--host=i686-apple-darwin8 --target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5250)
macbook:~/projects/extension_shared_ptr_test reevesg$

Anyone got any ideas on how to proceed? Is there a ruby extensions list
or IIRC channel somewhere. I could definitely use the help.

Thanks

Gareth
 
S

Steve Peters

--HG+GLK89HZ1zG0kk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
(e-mail address removed)=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--
 
A

ara.t.howard

Hey,

I am having trouble building an extension on a new intel mac. The
extension I have at the moment is simple, basically the example out of
the big ruby book.

The error I get when building is

macbook:~/projects/extension_shared_ptr_test reevesg$ make
cc -bundle -L"/usr/lib" -o Extension.bundle extension.o -lruby
-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$

I think i may need to build my ruby from scratch because this sounds
like a gcc incompatibility to me.

try

CC=g++ make

-a
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top