public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems with gcc 3.2
@ 2002-10-22 21:16 Jeff Holle
  2002-10-23  3:31 ` Claudio Bley
  2002-10-23 10:17 ` Ricardo Anguiano
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Holle @ 2002-10-22 21:16 UTC (permalink / raw)
  To: gcc-help

I've just installed gcc 3.2 on my linux system (Mandrake 8.2).
Typing "gcc -v" from command line reports:

    Configured with: ./configure
    Thread model: posix
    gcc version 3.2

In compiling and running a simple boost.python extension module (which 
worked with gcc 2.96.0), I get:

     $python hello.py
    Traceback (most recent call last):
      File "hello.py", line 1, in ?
        import HELLO
    ImportError: libstdc++.so.5: cannot open shared object file: No such
    file or directory

This appears to be because libstdc++.so.5 is installed in /usr/local/lib 
instead of /usr/lib (where the 2.96.0 shared libraries seem to be).

What do I have to do to my environment to fix this?

Note:
I tried to define LD_LIBRARY_PATH (which was not previously defined) to 
"/usr/local/lib:/usr/lib:/lib", to no affect.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems with gcc 3.2
  2002-10-22 21:16 Problems with gcc 3.2 Jeff Holle
@ 2002-10-23  3:31 ` Claudio Bley
  2002-10-23 10:17 ` Ricardo Anguiano
  1 sibling, 0 replies; 5+ messages in thread
From: Claudio Bley @ 2002-10-23  3:31 UTC (permalink / raw)
  To: Jeff Holle; +Cc: gcc-help

>>>>> "Jeff" == Jeff Holle <jeff.holle@verizon.net> writes:
    Jeff>      $python hello.py Traceback (most recent call last):
    Jeff> File "hello.py", line 1, in ?  import HELLO ImportError:
    Jeff> libstdc++.so.5: cannot open shared object file: No such file
    Jeff> or directory

    Jeff> This appears to be because libstdc++.so.5 is installed in
    Jeff> /usr/local/lib instead of /usr/lib (where the 2.96.0 shared
    Jeff> libraries seem to be).

    Jeff> What do I have to do to my environment to fix this?

    Jeff> Note: I tried to define LD_LIBRARY_PATH (which was not
    Jeff> previously defined) to "/usr/local/lib:/usr/lib:/lib", to no
    Jeff> affect.

Did you export that variable? It should work then. (and you don't need
to specify paths already searched for, just /usr/local/lib)

On the other hand you might just add /usr/local/lib to /etc/ld.so.conf
and run ldconfig. Afterwards running ldd on HELLO.so all library
references should be resolved.

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems with gcc 3.2
  2002-10-22 21:16 Problems with gcc 3.2 Jeff Holle
  2002-10-23  3:31 ` Claudio Bley
@ 2002-10-23 10:17 ` Ricardo Anguiano
  2002-10-23 10:30   ` bjorn rohde jensen
  1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Anguiano @ 2002-10-23 10:17 UTC (permalink / raw)
  To: Jeff Holle; +Cc: gcc-help

Jeff Holle <jeff.holle@verizon.net> writes:

> I've just installed gcc 3.2 on my linux system (Mandrake 8.2).
> Typing "gcc -v" from command line reports:
> 
>     Configured with: ./configure
>     Thread model: posix
>     gcc version 3.2
> 
> In compiling and running a simple boost.python extension module (which
> worked with gcc 2.96.0), I get:
> 
>      $python hello.py
>     Traceback (most recent call last):
>       File "hello.py", line 1, in ?
>         import HELLO
>     ImportError: libstdc++.so.5: cannot open shared object file: No such
>     file or directory
> 
> This appears to be because libstdc++.so.5 is installed in
> /usr/local/lib instead of /usr/lib (where the 2.96.0 shared libraries
> seem to be).
> 
> What do I have to do to my environment to fix this?
> 
> Note:
> I tried to define LD_LIBRARY_PATH (which was not previously defined)
> to "/usr/local/lib:/usr/lib:/lib", to no affect.

That's the right environment variable, but I don't know why it isn't
working.  You can try either:

        0) printing the value of LD_LIBRARY_PATH from within the
           python script to make sure it is defined and has the right
           value.
        1) compiling the module statically (-static).
        2) copying libstdc++.so.5 into /usr/lib

HTH,
-- 
Ricardo Anguiano
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems with gcc 3.2
  2002-10-23 10:17 ` Ricardo Anguiano
@ 2002-10-23 10:30   ` bjorn rohde jensen
  2002-10-23 11:33     ` Ricardo Anguiano
  0 siblings, 1 reply; 5+ messages in thread
From: bjorn rohde jensen @ 2002-10-23 10:30 UTC (permalink / raw)
  To: Ricardo Anguiano; +Cc: Jeff Holle, gcc-help

Hi guys,

  How sure are you about the reliability of the

 >ImportError: libstdc++.so.5: cannot open shared object file: No such
 >file or directory

error message?
  Could this be a problem relating to the C++ ABI changes from gcc 2
to gcc 3? C++ libraries created with one probably wont work properly
or even link with a program compiled with the other. It sounds like, 
python likes dynamic loading of libraries, and i doubt, the runtime 
linker will be any more successful than the compile time linker.
  Just a thought;)

Yours sincererly,

Bjorn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems with gcc 3.2
  2002-10-23 10:30   ` bjorn rohde jensen
@ 2002-10-23 11:33     ` Ricardo Anguiano
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Anguiano @ 2002-10-23 11:33 UTC (permalink / raw)
  To: bjensen; +Cc: Jeff Holle, gcc-help

bjorn rohde jensen <bjensen@fastmail.fm> writes:
>   How sure are you about the reliability of the
> 
>  >ImportError: libstdc++.so.5: cannot open shared object file: No such
>  >file or directory
> 
> error message?  Could this be a problem relating to the C++ ABI
> changes from gcc 2 to gcc 3? C++ libraries created with one probably
> wont work properly or even link with a program compiled with the
> other. It sounds like, python likes dynamic loading of libraries,
> and i doubt, the runtime linker will be any more successful than the
> compile time linker.  Just a thought;)

Yes, it's true.  You can't mix libraries from different versions of
the compiler because the ABI changed.  Make sure you are using the
right library.  This doesn't sounds like that problem.

Another thought.  Compile a simple hello world C++ program with the
new compiler and try to run the executable.  If you get the same
error, then it's a problem with dynamic loading independent of what
python wants.

Presumably, Jeff knows where the fresh library file (libstdc++.so.5)
was installed and can set LD_LIBRARY_PATH accordingly.

-- 
Ricardo Anguiano
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-10-23 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 21:16 Problems with gcc 3.2 Jeff Holle
2002-10-23  3:31 ` Claudio Bley
2002-10-23 10:17 ` Ricardo Anguiano
2002-10-23 10:30   ` bjorn rohde jensen
2002-10-23 11:33     ` Ricardo Anguiano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).