List Info

Thread: Undefined symbol errors (repost)




Undefined symbol errors (repost)
user name
2007-01-24 17:46:38
_______________________________________________ p4ruby mailing list p4rubyperforce.com http://maillist.perforce.com/mailman/listinfo/p4ruby
Re: Undefined symbol errors (repost)
user name
2007-01-25 06:27:50
Hi Michael, > (I posted this to the mailing list about a week ago, but haven't see any > responses so I though I'd try one more time. Sorry for the double-post.) No problem - I didn't get your first post for some reason. > I'm getting undefined symbol errors when I try to use P4Ruby. It seems > like everything builds fine, but when I try to run a Ruby script, it > doesn't work. > > Here is some sample output of my whole build/install/run process: Much appreciated. > /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so: > /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so: undefined symbol: _Znwj - That symbol is usually the C++ new operator. If it's missing, it usually means that the C++ runtime library wasn't linked in as part of the build. Could you send me the output of: ldd /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so Thanks, Tony _______________________________________________ p4ruby mailing list p4rubyperforce.com http://maillist.perforce.com/mailman/listinfo/p4ruby
Re: Undefined symbol errors (repost)
user name
2007-01-25 13:06:06
_______________________________________________ p4ruby mailing list p4rubyperforce.com http://maillist.perforce.com/mailman/listinfo/p4ruby
Re: Undefined symbol errors (repost)
user name
2007-01-27 03:40:27
Hi Mike,

> Thanks for responding.  Here is the ldd output:
>
> $ ldd /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so
>         libruby.so.1.8 => /usr/lib/libruby.so.1.8
(0xf6e73000)
>         libdl.so.2 => /lib/libdl.so.2 (0xf6e6e000)
>         libcrypt.so.1 => /lib/libcrypt.so.1
(0xf6e40000)
>         libm.so.6 => /lib/tls/libm.so.6
(0xf6e1d000)
>         libc.so.6 => /lib/tls/libc.so.6
(0xf6cf6000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1
(0xf6cee000)
>         /lib/ld-linux.so.2 (0x0081c000)
>
Thanks for that. I'm not sure why not, but it hasn't linked
the c++
runtime in properly. I'd expect to see libstdc++.so.6 in
there
somewhere. Could you try a manual link and just add -lstdc++
to the link
command line and see if that does the trick?


Tony
_______________________________________________
p4ruby mailing list
p4rubyperforce.com

http://maillist.perforce.com/mailman/listinfo/p4ruby

Re: Undefined symbol errors (repost)
user name
2007-01-31 18:23:17
Hi Tony,
That fixed it.  Thanks!

My new ldd output:
$ ldd /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so
        libruby.so.1.8 => /usr/lib/libruby.so.1.8 (0xf6e73000)
       ; libdl.so.2 => /lib/libdl.so.2 (0xf6e6e000)
   ;     libcrypt.so.1 => /lib/libcrypt.so.1 (0xf6e40000)
       ; libm.so.6 => /lib/tls/libm.so.6 (0xf6e1d000)
       ; libc.so.6 => /lib/tls/libc.so.6 (0xf6cf6000)
       ; libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf6c2a000)
     ;   libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf6c22000)
       ; /lib/ld-linux.so.2 (0x0081c000)

I also tried adding a call to use_lib("stdc++") right after the call to use_platform_libs() in p4conf.rb.  That seems to work as well, but I don't know if it might break other platforms.  If you decide to try to fix this, and need any help with it, let me know.

Thanks,
Mike

On 1/27/07, Tony Smith < tonysmee.org">tonysmee.org&gt; wrote:
Hi Mike,

>; Thanks for responding. &nbsp;Here is the ldd output:
&gt;
> $ ldd /usr/lib/site_ruby/1.8/i386-linux-gnu/P4.so
  ; &nbsp; &nbsp;  libruby.so.1.8 => /usr/lib/libruby.so.1.8 (0xf6e73000)
>&nbsp; &nbsp; &nbsp; &nbsp;  libdl.so.2 => /lib/libdl.so.2 (0xf6e6e000)
>&nbsp; &nbsp; &nbsp; &nbsp;  libcrypt.so.1 => /lib/libcrypt.so.1 (0xf6e40000)
>&nbsp; &nbsp; &nbsp; &nbsp;  libm.so.6 => /lib/tls/libm.so.6 (0xf6e1d000)
>&nbsp; &nbsp; &nbsp; &nbsp;  libc.so.6 => /lib/tls/libc.so.6 (0xf6cf6000)
>&nbsp; &nbsp;   ; &nbsp; libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf6cee000)
>&nbsp; &nbsp; &nbsp; &nbsp;  /lib/ld-linux.so.2 (0x0081c000)
>
Thanks for that. I'm not sure why not, but it hasn't linked the c++
runtime in properly. I'd expect to see libstdc++.so.6 in there
somewhere. Could you try a manual link and just add -lstdc++ to the link
command line and see if that does the trick?


Tony

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )