From: hjl@nynexst.com (H.J. Lu)
Newsgroups: comp.os.linux.announce
Subject: Libg++ 2.5.3l.1 was miscompiled.
Date: 10 Feb 1994 14:50:04 +0200
Approved: linux-announce@tc.cornell.edu (Lars Wirzenius)
Message-ID: <2jdahs$ldl@plootu.Helsinki.FI>

The binaries of libg++ 2.5.3l.1 on tsx-11.mit.edu under
pub/linux/packages/GCC were miscompiled. I just put a new
libg++-2.5.3l.1-p1.tar.gz on tsx-11.mit.edu under
pub/linux/packages/GCC. If you compile it yourself with the
latest gcc 2.5.8, it should be ok.

> 
> 
> >> to run executables that use the libg++ String class.  It dies on memset.c:63
> >> apparently.
> >Send me small piece code to show that.
> 
> 	The following errors are reproducible (IE, other linuxers
> running linux 0.99.15, libc 4.5.20, libg++ 2.5.3l.1, gcc 2.5.8 got the
> same errors).
> 
> The code: test.cc, breaks in more than one way on my machine
> 
> #include <stream.h>
> #include <String.h>
> #include <math.h>
> #include <assert.h>
> 
> static inline double log2(double x)
> {
>     register double lgx=log(x)*M_LOG2E;
> 
>     assert( !isnan(lgx) && !isinf(lgx));
>     return lgx;
> }
> 
> main()
> {
>     String foo="Test\n";
>     cout << foo;
>     cout << log2(5);
> }
> 
> when I compile with
> g++ -g -o new new.cc -lm
> gives me:
> new.cc:8 (new.o): Undefined symbol _log referenced from text segment
> /usr/lib/libm.a(isinf.o): Undefined symbol "___isinf" referenced
> /usr/lib/libm.a(isnan.o): Undefined symbol "___isnan" referenced

Please do

cd /usr/lib
ar -d libm.a __.SYMDEF
ranlib libm.a

>  
> Remove -g, and it compiles without errors.
> But then, it crashes without giving any output.  Using gdb, I traced it
> to memset.c:63.

Please try it with a new libg++-2.5.3l.1-p1.tar.gz.

H.J.

--
Mail submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
PLEASE remember Keywords: and a short description of the software.
