# libstdc++.so.4: cannot open shared object file

## CHerzog

Hi,

ich bekomme seit Tagen beim emergen bei verschiedenen Paketen (zuletzt KBrain) Fehlermeldungungen.

Nun bekomme ich Sie auch bei Aufruf von Programmen:

cherzog@gentoo Cherzog $ man mount

/usr/bin/gtbl: error while loading shared libraries: libstdc++.so.4: cannot open shared object file: No such file or directory

groff: error while loading shared libraries: libstdc++.so.4: cannot open shared object file: No such file or directory

Kann mir jemand sagen, woran das liegen könnte? Ich habe das Problem seit dem ich  KDE3.0.3 kompiliert habe (mit der neuen qt)

Danke für Tipps 

Christian

----------

## dad

ich gehe mal davon aus, dass die libstdc++.so.4 irgendwo vorhanden ist!

wenn ein einfaches 

ldconfig

als root nicht reicht, solltest du prüfen in welchem verzeichnis die lib liegt.  anschliessend

export LD_LIBRARY_PATH=path_to_lib

und das emerge sollte wieder funktionieren. U.U die /etc/ld.so.conf ergaenzen.

----------

## CHerzog

Hi,

now I got another error and I hope that anybody ahs an Idea:

root@gentoo Cherzog # emerge kbrain

Calculating dependencies ...done!

>>> emerge app-misc/kbrain-0.1.3 to /

>>> md5  :Wink:  kbrain-0.1.3.tar.gz

>>> Unpacking source...

>>> Unpacking kbrain-0.1.3.tar.gz

>>> Source unpacked.

qtmt

configure: WARNING: If you wanted to set the --build type, don't use --host.

    If a cross compiler is detected then cross compile mode will be used.

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking target system type... i686-pc-linux-gnu

checking for a BSD compatible install... /bin/install -c

checking for -p flag to install... yes

checking whether build environment is sane... yes

checking whether make sets ${MAKE}... yes

checking for working aclocal... found

checking for working autoconf... found

checking for working automake... found

checking for working autoheader... found

checking for working makeinfo... found

checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc

checking for C compiler default output... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for executable suffix...

checking for object suffix... o

checking whether we are using the GNU C compiler... yes

checking whether i686-pc-linux-gnu-gcc accepts -g... yes

checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E

checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++

checking whether we are using the GNU C++ compiler... yes

checking whether i686-pc-linux-gnu-g++ accepts -g... yes

checking whether i686-pc-linux-gnu-g++ supports -fno-exceptions... yes

checking whether i686-pc-linux-gnu-g++ supports -fno-check-new... yes

checking whether i686-pc-linux-gnu-g++ supports -fexceptions... yes

checking how to run the C++ preprocessor... i686-pc-linux-gnu-g++ -E

checking whether i686-pc-linux-gnu-g++ supports -frepo... yes

checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld

checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes

checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r

checking for BSD-compatible nm... nm

checking for a sed that does not truncate output...

checking whether ln -s works... yes

checking how to recognise dependant libraries... pass_all

checking for dlfcn.h... yes

checking the maximum length of command line arguments... 32768

checking command to parse nm output from i686-pc-linux-gnu-gcc object... ok

checking for objdir... .libs

checking for i686-pc-linux-gnu-ranlib... no

checking for ranlib... ranlib

checking for i686-pc-linux-gnu-strip... no

checking for strip... strip

checking if i686-pc-linux-gnu-gcc static flag  works... yes

checking if i686-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... yes

checking for i686-pc-linux-gnu-gcc option to produce PIC... -fPIC

checking if i686-pc-linux-gnu-gcc PIC flag -fPIC works... yes

checking if i686-pc-linux-gnu-gcc supports -c -o file.o... yes

checking whether the i686-pc-linux-gnu-gcc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking for shl_load... no

checking for shl_load in -ldld... no

checking for dlopen... no

checking for dlopen in -ldl... yes

checking whether a program can dlopen itself... yes

checking whether a statically linked program can dlopen itself... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no

configure: creating libtool

appending configuration tag "CXX" to libtool

checking whether the i686-pc-linux-gnu-g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes

checking for i686-pc-linux-gnu-g++ option to produce PIC... -fPIC

checking if i686-pc-linux-gnu-g++ PIC flag -fPIC works... yes

checking if i686-pc-linux-gnu-g++ supports -c -o file.o... yes

checking whether the i686-pc-linux-gnu-g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... yes

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking for shl_load... (cached) no

checking for shl_load in -ldld... (cached) no

checking for dlopen... (cached) no

checking for dlopen in -ldl... (cached) yes

checking whether a program can dlopen itself... (cached) yes

checking whether a statically linked program can dlopen itself... (cached) yes

appending configuration tag "GCJ" to libtool

checking if gcj supports -fno-rtti -fno-exceptions... (cached) yes

checking for gcj option to produce PIC... -fPIC

checking if gcj PIC flag -fPIC works... no

checking if gcj supports -c -o file.o... no

checking whether the gcj linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... yes

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking dynamic linker characteristics... GNU/Linux ld.so

checking for shl_load... (cached) no

checking for shl_load in -ldld... (cached) no

checking for dlopen... (cached) no

checking for dlopen in -ldl... (cached) yes

checking whether a program can dlopen itself... (cached) yes

checking whether a statically linked program can dlopen itself... (cached) yes

checking for msgfmt... /usr/bin/msgfmt

checking for gmsgfmt... /usr/bin/msgfmt

checking for xgettext... /usr/bin/xgettext

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for main in -lutil... yes

checking for main in -lcompat... no

checking for crypt in -lcrypt... yes

checking for socklen_t... socklen_t

checking for dnet_ntoa in -ldnet... no

checking for dnet_ntoa in -ldnet_stub... no

checking for inet_ntoa... yes

checking for connect... yes

checking for remove... yes

checking for shmat... yes

checking for res_init... no

checking for killpg in -lucb... no

checking for int... yes

checking size of int... 4

checking for long... yes

checking size of long... 4

checking for char *... yes

checking size of char *... 4

checking for char... yes

checking size of char... 1

checking for dlopen in -ldl... (cached) yes

checking for shl_unload in -ldld... no

checking for X... libraries /usr/X11R6/lib, headers .

checking for IceConnectionNumber in -lICE... yes

checking for libXext... yes

checking for Xinerama... yes

checking for pthread_create in -lpthread... yes

checking for extra includes... no

checking for extra libs... no

checking for libz... -lz

checking for libpng... -lpng -lz -lm

checking for libjpeg6b... no

checking for libjpeg... -ljpeg

checking for Qt... libraries /usr/qt/3/lib, headers /usr/qt/3/include using -mt

checking if Qt compiles without flags... no

checking for moc... /usr/qt/3/bin/moc

checking for uic... /usr/qt/3/bin/uic

checking whether uic supports -L ... yes

checking whether uic supports -nounload ... yes

checking if Qt needs -ljpeg... no

checking for rpath... yes

checking for KDE... libraries /usr/kde/3/lib, headers /usr/kde/3/include

checking for KDE paths... defaults

checking for dcopidl... /usr/kde/3/bin/dcopidl

checking for dcopidl2cpp... /usr/kde/3/bin/dcopidl2cpp

checking for mcopidl... /usr/kde/3/bin/mcopidl

checking for artsc-config... /usr/kde/3/bin/artsc-config

checking for kde-config... /usr/kde/3/bin/kde-config

checking for meinproc... /usr/kde/3/bin/meinproc

checking if doc should be compiled... yes

checking if kbrain should be compiled... yes

checking if po should be compiled... yes

configure: creating ./config.status

fast creating ./Makefile

fast creating doc/Makefile

fast creating doc/en/Makefile

fast creating kbrain/Makefile

fast creating po/Makefile

config.status: creating config.h

make  all-recursive

make[1]: Entering directory `/var/tmp/portage/kbrain-0.1.3/work/kbrain-0.1.3'

Making all in kbrain

make[2]: Entering directory `/var/tmp/portage/kbrain-0.1.3/work/kbrain-0.1.3/kbrain'

/usr/qt/3/bin/uic -L /usr/kde/3/lib/kde3/plugins/designer -nounload -o kbrainconnectdlg.h ./kbrainconnectdlg.ui

/usr/qt/3/bin/uic -L /usr/kde/3/lib/kde3/plugins/designer -nounload -o kbrainconfigdlg.h ./kbrainconfigdlg.ui

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

fcntl: Bad file descriptor

/usr/qt/3/bin/moc ./kbrainconfig.h -o kbrainconfig.moc.cpp

/usr/qt/3/bin/moc ./kbrainedit.h -o kbrainedit.moc.cpp

/usr/qt/3/bin/moc ./kbrainconnect.h -o kbrainconnect.moc.cpp

/usr/qt/3/bin/moc ./kbrainmain.h -o kbrainmain.moc.cpp

/usr/qt/3/bin/moc ./kbraineditor.h -o kbraineditor.moc.cpp

/usr/qt/3/bin/moc ./kbraingraph.h -o kbraingraph.moc.cpp

/usr/qt/3/bin/moc ./kbrainsystemtray.h -o kbrainsystemtray.moc.cpp

/usr/qt/3/bin/moc kbrainconnectdlg.h -o kbrainconnectdlg.moc

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainconfig.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainedit.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainconnect.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainmain.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbraineditor.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbraingraph.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainsystemtray.moc.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainsystemtray.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainmain.cpp

In file included from /usr/include/g++-v31/backward/stream.h:31,

                 from kbrainmain.cpp:18:

/usr/include/g++-v31/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbraingraph.cpp

In file included from /usr/include/g++-v31/backward/stream.h:31,

                 from kbraingraph.cpp:18:

/usr/include/g++-v31/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbraineditor.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainedit.cpp

In file included from /usr/include/g++-v31/backward/stream.h:31,

                 from kbrainedit.cpp:18:

/usr/include/g++-v31/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbraindrag.cpp

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fno-exceptions -fno-check-new  -c kbrainconnect.cpp

kbraindrag.cpp:21: default argument given for parameter 2 of `KBrainDrag::KBrainDrag(const char*, QWidget* = 0, const char* = 0)'

kbraindrag.h:39: after previous specification in `KBrainDrag::KBrainDrag(const char*, QWidget* = 0, const char* = 0)'

kbraindrag.cpp:21: default argument given for parameter 3 of `KBrainDrag::KBrainDrag(const char*, QWidget* = 0, const char* = 0)'

kbraindrag.h:39: after previous specification in `KBrainDrag::KBrainDrag(const char*, QWidget* = 0, const char* = 0)'

make[2]: *** [kbraindrag.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** Waiting for unfinished jobs....

make[2]: Leaving directory `/var/tmp/portage/kbrain-0.1.3/work/kbrain-0.1.3/kbrain'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/kbrain-0.1.3/work/kbrain-0.1.3'

make: *** [all-recursive-am] Error 2

!!! ERROR: The ebuild did not complete successfully.

!!! Function kde_src_compile, Line -6654, Exitcode 2

!!! died running emake, kde_src_compile:make

!!! emerge aborting on  /usr/portage/app-misc/kbrain/kbrain-0.1.3.ebuild .

----------

## Tommex

Kann es sein, dass du dir auch eine neue Version von gcc gezogen hast?

----------

## CHerzog

 *Tommex wrote:*   

> Kann es sein, dass du dir auch eine neue Version von gcc gezogen hast?

 

root@gentoo Cherzog # emerge -s gcc

Searching...

[ Results for search key : gcc ]

[ Applications found : 1 ]

*  sys-devel/gcc

      Latest version Available: 3.1.1-r1

      Latest version Installed: 3.1.1-r1

      Homepage: http://www.gnu.org/software/gcc/gcc.html

      Description: Modern GCC C/C++ compiler

Hilf das weiter? 

Christian

----------

## Tommex

Leider bin ich da selbst nicht so fit ...aber ich hatte ein ähnliches Problem ... ich hab bei mir eine neue Version von gcc 3.2 gezogen.

Daraufhin musste ich alle Programme neu backen.  :Wink: 

Hat bei mir fast 24h gedauert .... (gut es hätten glaube ich auch die cpp Programme gereicht. Aber alles per Hand zu machen ist lästig. Es gibt ein kleines Skrip rmerge .... mit dem kannst du alle vorhanden Pakete neucompilieren (vorher emerge rsync machen ... und du hast von allem das neuerste)

Versuch das doch mal mit einem kleinen Programm ... z.B. vi oder irgend so was ...  einfach neu compilieren ... 

Gruß,

Tommex

----------

## CHerzog

 *Tommex wrote:*   

> Leider bin ich da selbst nicht so fit ...aber ich hatte ein ähnliches Problem ... ich hab bei mir eine neue Version von gcc 3.2 gezogen.
> 
> Daraufhin musste ich alle Programme neu backen. 
> 
> Hat bei mir fast 24h gedauert .... (gut es hätten glaube ich auch die cpp Programme gereicht. Aber alles per Hand zu machen ist lästig. Es gibt ein kleines Skrip rmerge .... mit dem kannst du alle vorhanden Pakete neucompilieren (vorher emerge rsync machen ... und du hast von allem das neuerste)
> ...

 

Hi. Ich wollte eh umstellen, sobald 1.4 komplett vorhanden ist. Na ja. Es müsste ja schon alles funktionieren. Dann werde ich es wohl mal versuchen...

Danke

Christian

P.S.: Gibt es böse überraschungen bei emerge -e system ?

----------

