[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby c++ extension on intel mac

Gareth Reeves

3/8/2006 8:05:00 PM

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

--
Posted via http://www.ruby-....


2 Answers

Steve Peters

3/8/2006 8:27:00 PM

0

On Thu, Mar 09, 2006 at 05:04:33AM +0900, Gareth Reeves wrote:
> 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.
>

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

Ara.T.Howard

3/8/2006 8:35:00 PM

0