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

Re: c++ problems



On Tue, May 15, 2001 at 11:05:13AM +1000, Craig Sanders wrote:
> On Mon, May 14, 2001 at 07:45:19PM -0500, Gordon Sadler wrote:
> > If galeon makes use of libtool, I believe I know the problem and a
> > possible solution.
> 
> AFAICT, it's got nothing to do with galeon or libtool. the error is
> happening during the ./configure stage of compiling when it's testing to
> find out if i have a working C++ compiler.
> 
> at first cc1plus wasn't in the path then when i "fixed" that, crtbegin.o
> couldn't be found. for some reason, the c++ compiler is not looking in
> the right directory/directories for the files it needs.
> 
> i don't know yet whether that means there is something wrong with the
> packages or with my system.
> 
> i have no idea how long it has been like this as i don't usually have
> any need/use for a C++ compiler...i only discovered it because i wanted
> to compile the latest galeon against the latest mozilla-dev.
> 
I'm a little confused at this point.
ls -l /etc/alternatives/c++
lrwxrwxrwx    1 root     root           12 Apr 28 16:59
/etc/alternatives/c++ -> /usr/bin/g++
ls -l /usr/bin/g++
lrwxrwxrwx    1 root     root            8 Apr 28 16:59 /usr/bin/g++ ->
g++-2.95

If this is correct so far, so good.

g++ -print-search-dirs
install: /usr/lib/gcc-lib/i386-linux/2.95.4/
programs:
/usr/lib/gcc-lib/i386-linux/2.95.4/:/usr/lib/gcc-lib/i386-linux/:/usr/lib/gcc/i386-linux/2.95.4/:/usr/lib/gcc/i386-linux/:/usr/i386-linux/bin/i386-linux/2.95.4/:/usr/i386-linux/bin/
libraries:
/usr/lib/gcc-lib/i386-linux/2.95.4/:/usr/lib/gcc/i386-linux/2.95.4/:/usr/i386-linux/lib/i386-linux/2.95.4/:/usr/i386-linux/lib/:/usr/lib/i386-linux/2.95.4/:/usr/lib/:/lib/i386-linux/2.95.4/:/lib/:/usr/lib/i386-linux/2.95.4/:/usr/lib/

If those all match, which may not, since your's could not find cc1plus,
you should be fine.
> 
> > libstdc++3-dev installs /usr/lib/libstdc++.la with information
> > specific to building for v3. It will cause your package to try to use
> > both 2.95.x and 3.x. Bad mixup, Ben C is aware of this and I believe
> > he plans to rectify it.
> 
> i don't have libstdc++3-dev installed.  i have:
> 
> ii  libstdc++2.10  2.95.2-14      The GNU stdc++ library
> ii  libstdc++2.10- 2.95.4-0.01050 The GNU stdc++ library (development files)
> ii  libstdc++2.10- 2.95.4-0.01050 The GNU stdc++ library
> ii  libstdc++2.8   2.90.29-2      The GNU stdc++ library (old egcs version)
> ii  libstdc++2.9-g 2.91.66-4      The GNU stdc++ library (old egcs version)
> ii  libstdc++3     3.0-0pre010427 The GNU stdc++ library version 3
> 
> the only libstdc++  -dev package installed is libstdc++2.10-dev
> 
However, this seems wrong.
apt-cache show g++-3.0|grep Depends
Depends: gcc-3.0-base, libc6 (>= 2.2.2-2), gcc-3.0 (>= 1:3.0), gcc-3.0
(<< 1:3.1), libstdc++3-dev (>= 1:3.0)

So if you have one, you should have the other?

> 
> > Simple solution, remove/move /usr/lib/lib{supc++,stdc++}.la if your
> > are building a libtool using c++ package intended for gcc 2.95.x and
> > you have libstdc++3-dev installed.
> 
> just on the off-chance that i was completely mistaken about what's going
> on here, i tried this - i moved them out of /usr/lib and tried compiling
> again. it made no difference at all:
> 
> 
> configure:1411: checking whether the C++ compiler (c++  ) works
> configure:1427: c++ -o conftest    conftest.C  1>&5
> cpp: -lang-c++: linker input file unused since linking not done
> ld: cannot open crtbegin.o: No such file or directory
> configure: failed program was:
> 
> #line 1422 "configure"
> #include "confdefs.h"
> 
> int main(){return(0);}
> 
I'm still at a loss here, but if your search-dirs are wrong, and you
have the compiler without the development libs, I think something is
amiss.
> 
> 
> FYI, there are two instances of crtbegin.o on my system:
> 
> # dlocate crtbegin.o
> gcc-3.0: /usr/lib/gcc-lib/i386-linux/3.0/crtbegin.o
> gcc-2.95: /usr/lib/gcc-lib/i386-linux/2.95.4/crtbegin.o
> 
> # ls -l /usr/lib/gcc-lib/i386-linux/3.0/crtbegin.o /usr/lib/gcc-lib/i386-linux/2.95.4/crtbegin.o
> -rw-r--r--    1 root     root         1912 May  6 23:45 /usr/lib/gcc-lib/i386-linux/2.95.4/crtbegin.o
> -rw-r--r--    1 root     root         1864 May  1 22:15 /usr/lib/gcc-lib/i386-linux/3.0/crtbegin.o
> 
Same here.

-- 


Gordon Sadler



Reply to: