From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: martin.berger@orange.net Cc: gcc-help@gcc.gnu.org Subject: Re: problem with iostream Date: Sun, 26 Mar 2000 13:24:00 -0000 Message-id: <200003262120.XAA12368@loewis.home.cs.tu-berlin.de> References: <000801bf9760$9bd75ba0$e801bc3e@default> X-SW-Source: 2000-03/msg00094.html > i have overwritten my previous (2 year old) installation. i suspect > that your analysis is correct. alas i am not familiar enough with the > g++ library system to work out which files are the troublemakers. > (btw: is there an easily accessible description of the structure > of g++ and its libraries, or do i have to read the code/man pages to > get the picture?) There is no easy description, because the matter is not very easy. I noticed that a number of things have gone wrong. Could you please let me know what RPM packages related to g++ you have installed? You get a list by doing rpm -qa|grep gcc This won't print all, you also need rpm -qa|grep libstd You can use RPM to get a description of these packages, and to look what files they contain. *In particular*, you should have a libstdc++-devel package installed. Please make sure you do, and report its package name as well as the names of the other packages. Also, please report the exact location where you got the packages from (if you got them from a CD-ROM, please report the version numbers printed on the CD-ROM label). > libm.so.6 =3D> /lib/libm.so.6 (0x40018000) > libc.so.6 =3D> /lib/libc.so.6 (0x40035000) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x40000000) That is not right - your compiler should have linked a shared version of libstdc++ (unless you added -static). Please add -Wl,--verbose to the compiler line and report the output of the linker. In particular, look for the place where it gets libstdc++.a from, and check whether there is a libstdc++.so nearby - there should be. > #include <...> search starts here: > /usr/local/include/g++ This is also not right. Please do rpm -qf /usr/local/include/g++ and report which package this directory came from. For egcs 2.91.66, the include directory should be called g++-2. > /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include ??? Are you sure the gcc installation came from a redhat package??? RedHat never installed gcc into /usr/local, AFAIK. Where did this compiler come from? Please do rpm -qf /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/cc1plus and report its output. Regards, Martin From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin v. Loewis" To: martin.berger@orange.net Cc: gcc-help@gcc.gnu.org Subject: Re: problem with iostream Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <200003262120.XAA12368@loewis.home.cs.tu-berlin.de> References: <000801bf9760$9bd75ba0$e801bc3e@default> X-SW-Source: 2000-q1/msg00404.html Message-ID: <20000401000000.YvSV38PjjKCXWwm_hQTxqIPxiXkgvaYLK-nyOdgXBsM@z> > i have overwritten my previous (2 year old) installation. i suspect > that your analysis is correct. alas i am not familiar enough with the > g++ library system to work out which files are the troublemakers. > (btw: is there an easily accessible description of the structure > of g++ and its libraries, or do i have to read the code/man pages to > get the picture?) There is no easy description, because the matter is not very easy. I noticed that a number of things have gone wrong. Could you please let me know what RPM packages related to g++ you have installed? You get a list by doing rpm -qa|grep gcc This won't print all, you also need rpm -qa|grep libstd You can use RPM to get a description of these packages, and to look what files they contain. *In particular*, you should have a libstdc++-devel package installed. Please make sure you do, and report its package name as well as the names of the other packages. Also, please report the exact location where you got the packages from (if you got them from a CD-ROM, please report the version numbers printed on the CD-ROM label). > libm.so.6 =3D> /lib/libm.so.6 (0x40018000) > libc.so.6 =3D> /lib/libc.so.6 (0x40035000) > /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x40000000) That is not right - your compiler should have linked a shared version of libstdc++ (unless you added -static). Please add -Wl,--verbose to the compiler line and report the output of the linker. In particular, look for the place where it gets libstdc++.a from, and check whether there is a libstdc++.so nearby - there should be. > #include <...> search starts here: > /usr/local/include/g++ This is also not right. Please do rpm -qf /usr/local/include/g++ and report which package this directory came from. For egcs 2.91.66, the include directory should be called g++-2. > /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include ??? Are you sure the gcc installation came from a redhat package??? RedHat never installed gcc into /usr/local, AFAIK. Where did this compiler come from? Please do rpm -qf /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/cc1plus and report its output. Regards, Martin