Re: c++ problems
On Mon, 14 May 2001 21:15:22 -0500
Gordon Sadler <firstname.lastname@example.org> wrote:
> On Tue, May 15, 2001 at 11:05:13AM +1000, Craig Sanders wrote:
> 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++ ->
On my system, `c++' and `g++' are two different binaries:
[bash/2.05.0] vulture@cornerstone:~ $ ls -l /usr/bin/c++ /usr/bin/g++
-rwxr-xr-x 1 root root 69456 Oct 25 1999 /usr/bin/c++
lrwxrwxrwx 1 root root 8 Apr 4 17:46 /usr/bin/g++ -> g++-2.95
[bash/2.05.0] vulture@cornerstone:~ $ ls -l /usr/bin/g++-2.95
-rwxr-xr-x 1 root root 71644 May 6 07:44 /usr/bin/g++-2.95
I have the same problem with regards to autoconf disliking `c++' and saying
it doesn't work. My workaround was to `ln -s /usr/bin/g++ /usr/local/bin/c++'.
That way, `/usr/local/bin/c++' is before `/usr/bin/c++' in $PATH, and `g++'
works perfectly, according to autoconf.
I think the problem is an old, stale binary from some ancient version of the
[bash/2.05.0] vulture@cornerstone:~ $ dpkg -S /usr/bin/c++
dpkg: /usr/bin/c++ not found.
In my opinion, the g++ preinst needs to check for and remove this file if it
exists and isn't a symlink, like so:
cxxname=`dpkg-divert --truename /usr/bin/c++`;if test -f $cxxname; \
then rm -f $cxxname; fi
If that's not the correct usage of `dpkg-divert --truename', then adjust
accordingly -- I don't use dpkg-divert as a maintainer (since I'm not a
maintainer anyway), so I wouldn't know.