[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about your new upload of libg++



Rob Browning <rlb@cs.utexas.edu> writes:

> Still segfaults when run, but only if I include the -lpthread.  It
> doesn't for you?  I thought maybe it was the kernel version (long
> shot), since I was running 2.1.57, but I backed off to 2.1.26 and had
> the same result.  Any ideas about things I might try, or how I might
> be able to get libg++ to build?

$ cat dummy.cc 
  #include <iostream.h>

  int
  main(int argc, char ** argv) {
    char foo[80] = "<uninitialized>\n";
    cout << foo << endl;
  }
$   g++ -o dummy -D_REENTRANT -lpthread dummy.cc 
$ ./dummy 
<uninitialized>

$ ldd ./dummy
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x4000f000)
        libg++.so.2.7.2 => /usr/lib/libg++-dbg/libg++.so.2.7.2 (0x4001e000)
        libstdc++.so.2.7.2 => /usr/lib/libg++-dbg/libstdc++.so.2.7.2 (0x40056000)
        libm.so.6 => /lib/libm.so.6 (0x40093000)
        libc.so.6 => /lib/libc.so.6 (0x400ac000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ LD_LIBRARY_PATH=/usr/lib ldd ./dummy
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x4000c000)
        libg++.so.2.7.2 => /usr/lib/libg++.so.2.7.2 (0x4001b000)
        libstdc++.so.2.7.2 => /usr/lib/libstdc++.so.2.7.2 (0x40053000)
        libm.so.6 => /lib/libm.so.6 (0x40093000)
        libc.so.6 => /lib/libc.so.6 (0x400ac000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ LD_LIBRARY_PATH=/usr/lib ./dummy
<uninitialized>

I thought it might work differently without the dbg libraries, but no
change.

Check the binary with ldd.  Do you have local libs that it's linking
with?  Try -static also.


Guy


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: