Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2002 16:26:01 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Rob <rob@pythonemproject.com>
Cc:        Current <freebsd-current@FreeBSD.org>
Subject:   Re: make buildworld fails at gperf 
Message-ID:  <20020725232601.6DE3E2A7D6@canning.wemm.org>
In-Reply-To: <3D4038A9.36B0B706@pythonemproject.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Rob wrote:
> With a fresh cvsup and rm -r /usr/obj, I then get the following error in
> gperf when typing make buildworld:
> 
> Am I doing something wrong?   Thanks,  Rob.
> 
> -----------------------------------
> uname -a output:
> 
> FreeBSD c888746-a.attbi.com 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat May
> 25 19:42:56 PDT 2002    
> rob@c888746-a.attbi.com:/usr/src/sys/i386/compile/LAPTOP  i386
> 
> -----------------------------------------------
> make buildworld output:
> 
> cd /usr/src/gnu/usr.bin/gperf;  make DIRPRFX=gnu/usr.bin/gperf/ obj; 
> make DIRPRFX=gnu/usr.bin/gperf/ depend;  make DIRPRFX=gnu/usr.bin/gperf/
> all;  make DIRPRFX=gnu/usr.bin/gperf/ DESTDIR=/usr/obj/usr/src/i386
> install
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/gperf created for
> /usr/src/gnu/usr.bin/gperf
> ===> gnu/usr.bin/gperf/doc
> /usr/obj/usr/src/i386/usr/src/gnu/usr.bin/gperf/doc created for
> /usr/src/gnu/usr.bin/gperf/doc
> rm -f .depend
> mkdep -f .depend -a    -D__FBSDID=__RCSID 
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/getopt.c
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/getopt1.c
> mkdep -f .depend -a    -D__FBSDID=__RCSID
> -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf 
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/bool-array.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/gen-perf.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/hash-table.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/iterator.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/key-list.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/list-node.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/main.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/new.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/options.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/read-line.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/trace.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/vectors.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/version.cc
> /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib/hash.cc   
> echo gperf: /usr/lib/libc.a  >> .depend
> echo gperf: /usr/lib/libstdc++.a >> .depend
> ===> gnu/usr.bin/gperf/doc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/bool-array.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/gen-perf.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/hash-table.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/iterator.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/key-list.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/list-node.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/main.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/new.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/options.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/read-line.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/trace.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/vectors.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/src/version.cc
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf -c /usr/src/contrib/gperf/lib/hash.cc
> cc -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -c
> /usr/src/contrib/gperf/lib/getopt.c
> cc -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -c
> /usr/src/contrib/gperf/lib/getopt1.c
> c++  -O -pipe -march=pentiumpro     -D__FBSDID=__RCSID -fmemoize-lookups
> -fsave-memoized -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib
> -I/usr/src/gnu/usr.bin/gperf  -static -o gperf bool-array.o gen-perf.o
> hash-table.o iterator.o key-list.o list-node.o main.o new.o options.o
> read-line.o trace.o vectors.o version.o hash.o getopt.o getopt1.o 
> gen-perf.o: In function `Gen_Perf::change(List_Node*, List_Node*)':
> gen-perf.o(.text+0x374): undefined reference to `operator
> new[](unsigned)'
> gen-perf.o(.eh_frame+0x12): undefined reference to
> `__gxx_personality_v0'
> hash-table.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> key-list.o: In function `Key_List::get_special_input(char)':
> key-list.o(.text+0xf3): undefined reference to `operator
> new[](unsigned)'
> key-list.o(.text+0x15c): undefined reference to `operator
> new[](unsigned)'
> key-list.o: In function `Key_List::set_output_types()':
> key-list.o(.text+0x2a7): undefined reference to `operator
> new[](unsigned)'
> key-list.o(.text+0x2ce): undefined reference to `operator
> new[](unsigned)'
> key-list.o: In function `parse_line(char const*, char const*)':
> key-list.o(.text+0x32e): undefined reference to `operator
> new[](unsigned)'
> key-list.o(.gnu.linkonce.d._ZTV14Output_Compare+0x8): undefined
> reference to `__cxa_pure_virtual'
> key-list.o(.gnu.linkonce.d._ZTV11Output_Expr+0x8): undefined reference
> to `__cxa_pure_virtual'
> key-list.o(.gnu.linkonce.d._ZTV16Output_Constants+0x8): undefined
> reference to `__cxa_pure_virtual'
> key-list.o(.gnu.linkonce.d._ZTV16Output_Constants+0xc): undefined
> reference to `__cxa_pure_virtual'
> key-list.o(.gnu.linkonce.d._ZTV16Output_Constants+0x10): undefined
> reference to `__cxa_pure_virtual'
> key-list.o(.gnu.linkonce.d._ZTI21Output_Compare_Memcmp+0x0): undefined
> reference to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI22Output_Compare_Strncmp+0x0): undefined
> reference to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI21Output_Compare_Strcmp+0x0): undefined
> reference to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI14Output_Compare+0x0): undefined
> reference to `vtable for __cxxabiv1::__class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI12Output_Expr1+0x0): undefined reference
> to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI11Output_Expr+0x0): undefined reference
> to `vtable for __cxxabiv1::__class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI11Output_Enum+0x0): undefined reference
> to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI14Output_Defines+0x0): undefined
> reference to `vtable for __cxxabiv1::__si_class_type_info'
> key-list.o(.gnu.linkonce.d._ZTI16Output_Constants+0x0): undefined
> reference to `vtable for __cxxabiv1::__class_type_info'
> key-list.o(.eh_frame+0x12): undefined reference to
> `__gxx_personality_v0'
> list-node.o: In function `List_Node::List_Node(char const*, int, char
> const*)':
> list-node.o(.text+0x49): undefined reference to `operator
> new[](unsigned)'
> list-node.o: In function `List_Node::List_Node(char const*, int, char
> const*)':
> list-node.o(.text+0x17d): undefined reference to `operator
> new[](unsigned)'
> list-node.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> main.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
> options.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
> read-line.o: In function `Read_Line::readln_aux(int)':
> read-line.o(.text+0x9c): undefined reference to `operator
> new[](unsigned)'
> read-line.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> *** Error code 1

The problem is that you do not have a viable libstdc++.so.4 with the builtin
new/delete/etc operators.  gcc-3.x moved stuff from libgcc.a to libstdc++.

The easiest way out of this is:
mv /usr/include/g++ /usr/include/g++.old
mkdir -p /usr/include/g++/bits /usr/include/g++/ext /usr/include/g++/backward
cd src/gnu/lib/libstdc++
make obj
make includes
cd ../libsupc++
make obj
make includes
cd ../libstdc++
make depend 
make all install
cd ../libsupc++
make depend
make all install

This should build you a fresh libstdc++.so.4, libsupc++.a and a matching
/usr/include/g++/*

The resulting /usr/include/g++ should look roughly like this:
peter@overcee[3:52pm]~src/gnu/lib/libsupc++-105> /bin/ls -F /usr/include/g++
FlexLexer.h             cstdlib                 list
algorithm               cstring                 locale
backward/               ctime                   map
bits/                   cwchar                  memory
bitset                  cwctype                 new
cassert                 cxxabi.h                numeric
cctype                  deque                   ostream
cerrno                  exception               queue
cfloat                  exception_defines.h     set
ciso646                 ext/                    sstream
climits                 fstream                 stack
clocale                 functional              stdexcept
cmath                   iomanip                 streambuf
complex                 ios                     string
csetjmp                 iosfwd                  typeinfo
csignal                 iostream                utility
cstdarg                 istream                 valarray
cstddef                 iterator                vector
cstdio                  limits

If you are really stuck, or do not have time to mess around, you might
prefer to fetch and extract this:
  http://people.freebsd.org/~peter/c++fixit.tgz
Move your old /usr/include/g++ out of the way before extracting it
and save a copy of your /usr/lib/libstdc++* files as well.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020725232601.6DE3E2A7D6>