🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #377

bug in libg++?

#377
From: William Rosenkranz
Date: Sun, 13 Dec 1992 15:26
320 lines
16862 bytes
i have been having trouble compiling libg++ with gcc 2.3.2 on a convex C2
(BSD). i built gcc seemingly successfully - it compiled itself fine as
well as several GNU tools like flex which also passed its tests. i checked
the make log from gcc and did not find any warnings (beyond things like NULL
redefined). i am not using gas. i used GNU make 3.62 mostly.

i tried to build libg++ versions 1.39.0, 2.2, and 2.3, without success. below
are the make logs for each attempt. note that convex defines fpos_t as
a typedef in <stdio.h> so that libg++/iostream/streambuf.h had to be
modified in libg++ 2.2 and 2.3.

can u look at this (especially the 2.3 stuff) and let me know what i can
do about this to get it to compile? the 2.3 attempt bombed with an internal
error. i probably have additional info (configs, makefiles, etc) that i
can send if you need them.

thanx much...

-bill
rosenkra@convex.com

------------------------------------------------------------------------------

libg++-2.3:

[ i split this line for mailing... ]
rootme=`pwd`/ ; export rootme; \
CC="`if [ -f ${rootme}../gcc/gcc ] ; \
then echo ${rootme}../gcc/gcc\\ -B${rootme}../gcc/ ; \
else echo cc ; \
fi` `if [ -f ${rootme}../gcc/gcc ] ; \
then echo -I${rootme}../gcc/include ; else echo ; fi`"; \
export CC; CXX="`if [ -f ${rootme}../gcc/gcc ] ; \
then echo ${rootme}../gcc/gcc\\ -B${rootme}../gcc/ ; else echo gcc; \
fi` `if [ -f ${rootme}../gcc/gcc ] ; then echo -I${rootme}../gcc/include ; \
else echo ; fi` -nostdinc++"; \
export CXX; CONFIG_NM="`if [ -f ${rootme}../binutils/nm ] ; \
then echo ${rootme}../binutils/nm ; else echo nm ; fi`"; export CONFIG_NM; \
./utils/gen-params LIB_VERSION=2.3  >tmp-params.h
mv tmp-params.h _G_config.h
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c AllocRing.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Obstack.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c builtin.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c regex.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Regex.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c String.cc
In file included from ./../g++-include/stdio.h:69, from ./std.h:29, from String.cc:26:
/usr/include/stdio.h:77: conflicting types for `_G_fpos_t'
../_G_config.h:10: previous declaration of `_G_fpos_t'
gmake[1]: *** [String.o] Error 1
gmake: *** [in-src] Error 1

[ fix streambuf.h here... ]

gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c String.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Integer.cc
Integer.cc: In function `double  Itodouble (const struct IntRep*)':
Integer.cc:421: warning: floating point number exceeds range of `double'
Integer.cc:428: warning: floating point number exceeds range of `double'
Integer.cc:428: warning: floating point number exceeds range of `double'
Integer.cc: In function `int  Iisdouble (const struct IntRep*)':
Integer.cc:448: warning: floating point number exceeds range of `double'
Integer.cc: In function `double  ratio (const class Integer&, const class Integer&)':
Integer.cc:473: warning: floating point number exceeds range of `double'
Integer.cc:473: warning: floating point number exceeds range of `double'
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Rational.cc
Rational.cc: In method `int  Rational::fits_in_double ()const ':
Rational.cc:414: warning: floating point number exceeds range of `double'
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Complex.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Random.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c BitSet.cc
gcc -g -O -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c BitString.cc
BitString.cc: In method `int  BitString::search (int, int, const short unsigned int *, int, int)const ':
BitString.cc:1186: internal error--insn does not satisfy its constraints:
(insn/i:HI 528 1470 1469 (set (reg:SI 5 s5)
        (ashiftrt:SI (reg:SI 5 s5)
            (neg:SI (reg:SI 0 s0)))) 103 {ashrsi3+1} (insn_list 526 (nil))
    (nil))
gcc: Internal compiler error: program cc1plus got fatal signal 6
gmake[1]: *** [BitString.o] Error 1
gmake: *** [in-src] Error 1






-----------------------------------------------------------------------------

libg++-2.2:


'./configure -v c2-convex-bsd' output:

Created "Makefile" in /se1/rosenkra/libg++-2.2
Configuring autoconf...
Warning: source directory ./autoconf is missing.
Configuring libgcc...
Warning: source directory ./libgcc is missing.
Configuring mmalloc...
Warning: source directory ./mmalloc is missing.
Configuring libiberty...
Linked "alloca-conf.h" to "./alloca-norm.h".
Created "Makefile" in /se1/rosenkra/libg++-2.2
Configuring texinfo...
Warning: source directory ./texinfo is missing.
Configuring bfd...
Warning: source directory ./bfd is missing.
Configuring binutils...
Warning: source directory ./binutils is missing.
Configuring byacc...
Warning: source directory ./byacc is missing.
Configuring bison...
Warning: source directory ./bison is missing.
Configuring flex...
Warning: source directory ./flex is missing.
Configuring gcc...
Warning: source directory ./gcc is missing.
Configuring readline...
Warning: source directory ./readline is missing.
Configuring glob...
Warning: source directory ./glob is missing.
Configuring ld...
Warning: source directory ./ld is missing.
Configuring gas...
Warning: source directory ./gas is missing.
Configuring gdb...
Warning: source directory ./gdb is missing.
Configuring emacs...
Warning: source directory ./emacs is missing.
Configuring ispell...
Warning: source directory ./ispell is missing.
Configuring make...
Warning: source directory ./make is missing.
Configuring grep...
Warning: source directory ./grep is missing.
Configuring diff...
Warning: source directory ./diff is missing.
Configuring rcs...
Warning: source directory ./rcs is missing.
Configuring cvs...
Warning: source directory ./cvs is missing.
Configuring patch...
Warning: source directory ./patch is missing.
Configuring send_pr...
Warning: source directory ./send_pr is missing.
Configuring libg++...
No pre-existing host_makefile_frag config/c2.mh for .
Generating one in c2-convex-bsd.mh
checking for install
checking for ranlib
checking if -nostdinc++ flag works
Created "Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in genclass
Created "genclass/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in src
Created "src/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in iostream
Created "iostream/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in iostream/stdio
Created "iostream/stdio/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in iostream/test
Created "iostream/test/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in no-stream
Created "no-stream/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in old-stream
Created "old-stream/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in tests
Created "tests/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc
Created "etc/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/graph
Created "etc/graph/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/ADT-examples
Created "etc/ADT-examples/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/benchmarks
Created "etc/benchmarks/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/lf
Created "etc/lf/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/PlotFile3D
Created "etc/PlotFile3D/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in etc/trie-gen
Created "etc/trie-gen/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in gperf
Created "gperf/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in gperf/src
Created "gperf/src/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in gperf/tests
Created "gperf/tests/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in utils
Created "utils/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Building in test-install
Created "test-install/Makefile" in /se1/rosenkra/libg++-2.2 using "c2-convex-bsd.mh"
Configuring newlib...
Warning: source directory ./newlib is missing.
Configuring gprof...
Warning: source directory ./gprof is missing.
Configuring gdbtest...
Warning: source directory ./gdbtest is missing.




echo "# !Automatically generated from ./functions.def" "- DO NOT EDIT!" >needed2.awk
grep '^DEFVAR(' < ./functions.def | \
sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf \"#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' >>needed2.awk
grep '^DEFFUNC(' < ./functions.def | \
sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf \"#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' >>needed2.awk
cc -c -g -I. -I./../include  ./dummy.c
(cc  dummy.o  ) >errors 2>&1 || true
rm -f a.out dummy.o
echo "/* !Automatically generated from ./functions.def" "- DO NOT EDIT! */" >config.h
awk -f needed2.awk <errors >>config.h
cc -c -g -I. -I./../include  basename.c
cc -c -g -I. -I./../include  getopt.c
cc -c -g -I. -I./../include  getopt1.c
cc -c -g -I. -I./../include  obstack.c
cc -c -g -I. -I./../include  spaces.c
cc -c -g -I. -I./../include  concat.c
cc -c -g -I. -I./../include  fdmatch.c
cc -c -g -I. -I./../include  argv.c
cc -c -g -I. -I./../include  strerror.c
cc -c -g -I. -I./../include  strsignal.c
echo "# !Automatically generated from ./functions.def" "- DO NOT EDIT!" >needed.awk
grep '^DEF(' < ./functions.def | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf \"\1\.o " }|' >>needed.awk
awk -f needed.awk <errors >needed-list
echo  >>needed-list
rm -rf libiberty.a
ar qc libiberty.a basename.o getopt.o getopt1.o obstack.o spaces.o concat.o fdmatch.o argv.o strerror.o strsignal.o 
ranlib libiberty.a
rootme=`pwd` ; export rootme; CC="gcc `if [ -f ${rootme}/../gcc/gcc ] ; then echo -I${rootme}/../gcc/include ; else echo ; fi`"; export CC; ./utils/gen-params  >tmp-params.h
In file included from dummy.c:4:
/usr/include/stdio.h:17: warning: `NULL' redefined
/usr/local/lib/gcc-lib/convex-c2/2.3.2/include/stddef.h:187: warning: this is the location of the previous definition
mv tmp-params.h _G_config.h
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c AllocRing.cc
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Obstack.cc
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c builtin.cc
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c regex.cc
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c Regex.cc
Regex.cc: In method `Regex::Regex (const char *, int (=  0 ), int (=  40 ), const char * (=  0 ))':
Regex.cc:52: warning: ANSI C++ forbids implicit conversion from `void *' in assignment
Regex.cc:59: warning: ANSI C++ forbids implicit conversion from `void *' in assignment
gcc -g -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c String.cc
In file included from ./../iostream/iostream.h:25, from ./../iostream/stream.h:7, from ./String.h:26, from String.cc:25:
./../iostream/streambuf.h:359: warning: type specifier omitted for parameter
./../iostream/streambuf.h:359: parse error before `,'
./../iostream/streambuf.h:360: warning: type specifier omitted for parameter
./../iostream/streambuf.h:360: parse error before `)'
In file included from ./../iostream/stream.h:7, from ./String.h:26, from String.cc:25:
./../iostream/iostream.h:60: warning: type specifier omitted for parameter
./../iostream/iostream.h:60: parse error before `)'
./../iostream/iostream.h:152: warning: type specifier omitted for parameter
./../iostream/iostream.h:152: parse error before `)'
./../iostream/iostream.h:225: warning: type specifier omitted for parameter
./../iostream/iostream.h:225: parse error before `)'
./../iostream/iostream.h:247: warning: type specifier omitted for parameter
./../iostream/iostream.h:247: parse error before `)'
./../iostream/iostream.h: In method `class streambuf::istream& iostream::vscan (...)':
./../iostream/iostream.h:226: `format' undeclared (first use this function)
./../iostream/iostream.h:226: (Each undeclared identifier is reported only once
./../iostream/iostream.h:226: for each function it appears in.)
./../iostream/iostream.h:226: `args' undeclared (first use this function)
./../iostream/iostream.h:226: warning: control reaches end of non-void function
./../iostream/iostream.h: In method `class ostream& iostream::vform (...)':
./../iostream/iostream.h:248: `format' undeclared (first use this function)
./../iostream/iostream.h:248: `args' undeclared (first use this function)
./../iostream/iostream.h:248: warning: control reaches end of non-void function
gmake[2]: *** [String.o] Error 1
gmake[1]: *** [in-src] Error 1
gmake: *** [all-libg++] Error 1




----------------------------------------------------------------------------

libg++-1.39.0:

[ long lines split for mailing... ]

(cd src; gmake GXX="g++"  \
GXXFLAGS=" -I/se1/rosenkra/libg++-1.39.0/g++-include -g -O -fstrength-reduce \
-felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized  \
-Wall -DNO_GNULIB3 " GXXLDFLAGS="-L/se1/rosenkra/libg++-1.39.0/src -lg++ -lm "\
 LIBDIR="/usr/local/lib" SRCIDIR="/se1/rosenkra/libg++-1.39.0/g++-include" \
CC="gcc" CFLAGS=" -I/usr/local/lib/gcc-lib/convex-c2/2.3.2/include \
-I/usr/include -I/se1/rosenkra/libg++-1.39.0/g++-include -g -O \
-fstrength-reduce -fdelayed-branch  -Wall -DNO_GNULIB3 " RANLIB="ranlib" \
LDXX="ld" GXXCRT1="/usr/local/lib/crt1+.o" MAKE="gmake" prefix="/usr/local" \
VPATH="/se1/rosenkra/libg++-1.39.0/g++-include" AR="ar" \
PROTODIR="/se1/rosenkra/libg++-1.39.0/g++-include/gen" \
GENCLASS="/se1/rosenkra/libg++-1.39.0/genclass")
g++ -I/se1/rosenkra/libg++-1.39.0/g++-include -g -O -fstrength-reduce  \
-felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized  \
-Wall -DNO_GNULIB3  -c  AllocRing.cc
In file included from AllocRing.cc:27:
/se1/rosenkra/libg++-1.39.0/g++-include/std.h:27: warning: `#pragma once' is obsolete
In file included from /se1/rosenkra/libg++-1.39.0/g++-include/std.h:32, from AllocRing.cc:27:
/se1/rosenkra/libg++-1.39.0/g++-include/stddef.h:26: warning: `#pragma once' is obsolete
In file included from /se1/rosenkra/libg++-1.39.0/g++-include/std.h:33, from AllocRing.cc:27:
/se1/rosenkra/libg++-1.39.0/g++-include/stdio.h:54: warning: `#pragma once' is obsolete
In file included from AllocRing.cc:28:
/se1/rosenkra/libg++-1.39.0/g++-include/AllocRing.h:27: warning: `#pragma once' is obsolete
In file included from AllocRing.cc:29:
/se1/rosenkra/libg++-1.39.0/g++-include/new.h:3: warning: `#pragma once' is obsolete
cc1plus: warning: instruction scheduling not supported on this target machine
cc1plus: warning: this target machine does not have delayed branches
In file included from AllocRing.cc:27:
/se1/rosenkra/libg++-1.39.0/g++-include/std.h:139: declaration of `int  memcmp (const void *, const void *, int)'
<built-in>:0: conflicts with built-in declaration `int  memcmp (const void *, const void *, unsigned int)'
/se1/rosenkra/libg++-1.39.0/g++-include/std.h:140: declaration of `void * memcpy (void *, const void *, int)'
<built-in>:0: conflicts with built-in declaration `void * memcpy (void *, const void *, unsigned int)'
/se1/rosenkra/libg++-1.39.0/g++-include/std.h:197: declaration of `int  strlen (const char *)'
<built-in>:0: conflicts with built-in declaration `unsigned int  strlen (const char *)'
AllocRing.cc: In method `void * AllocRing::alloc (int)':
AllocRing.cc:102: warning: ordered comparison between signed and unsigned
AllocRing.cc:103: warning: ordered comparison between signed and unsigned
gmake[1]: *** [AllocRing.o] Error 1
gmake: *** [src] Error 1
Technical Details
Message-ID: <9212140126.AA16630@c2east.convex.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!c2east.convex.COM!rosenkra

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!c2east.convex.COM!rosenkra
From: rosenkra@c2east.convex.COM (William Rosenkranz)
Subject: bug in libg++?
Message-ID: <9212140126.AA16630@c2east.convex.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sun, 13 Dec 1992 15:26:56 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 323