Current-Users archive

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

Building PCC for "tools" is broken (missing symbol __USE)- PCC bug or NetBSD source tree error?



Hello all, 

As some of you may know, I run NetBSD on a 50MHz 486 for 
experimentation/education for writing a simple driver. Although base.tgz, 
comp.tgz, and etc.tgz all fit comfortably on my 420MB (decimal) drive, I have 
found that building new software, starts to potentially exhaust the space when 
untarring, object files, and the tar archive are taken into account.

To free some space, I plan to rebuild and replace GCC with a PCC-built source 
tree (this should also speed up compilation, which is horrific on a 486, as 
some of you might remember :)...). According to the following mailing list 
post: http://mail-index.netbsd.org/tech-toolchain/2010/06/04/msg001298.html, 
the way to build a version of PCC in the "tools" directory is to set the 
HAVE_PCC variable in either MAKECONF or the command line. Incidentally, this 
will also build GCC in tools since it appears HAVE_GCC must also be set or 
./build.sh will choke. Likewise, to build only PCC for distribution, I need to 
set MKPCC=yes, and MKGCC=no (the other environment variables for PCC are not 
required).

However, when building pcc in ./build.sh tools with a CVS source tree, I 
receive the following error which prevents me from continuing: 
cc -O  -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -D
GCC_COMPAT -DPCC_DEBUG -D_ISOC99_SOURCE  -Dos_netbsd -Dmach_i386  -I/mnt/lfs/Net
BSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/cc/ccom -I. -I../.. -I/mnt
/lfs/NetBSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/mip -I/mnt/lfs/Net
BSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/arch/i386  -I/mnt/lfs/NetB
SD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/os/netbsd -c -o table.o /mn
t/lfs/NetBSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/arch/i386/table.c
cc -O  -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -D
GCC_COMPAT -DPCC_DEBUG -D_ISOC99_SOURCE  -Dos_netbsd -Dmach_i386  -I/mnt/lfs/Net
BSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/cc/ccom -I. -I../.. -I/mnt
/lfs/NetBSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/mip -I/mnt/lfs/Net
BSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/arch/i386  -I/mnt/lfs/NetB
SD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/os/netbsd -c -o trees.o /mn
t/lfs/NetBSD-CVS/src/tools/pcc/../../external/bsd/pcc/dist/pcc/cc/ccom/trees.c
cc  builtins.o cgram.o code.o common.o compat.o external.o               gcc_com
pat.o init.o inline.o local.o local2.o main.o            match.o optim.o optim2.
o order.o pftn.o reader.o                regs.o scan.o stabs.o symtabs.o table.o
 trees.o -o i486--netbsdelf-ccom
gcc_compat.o: In function `pragmas_gcc':
gcc_compat.c:(.text+0xb6f): undefined reference to `__USE'
collect2: ld returned 1 exit status

*** Failed target:  i486--netbsdelf-ccom
*** Failed command: cc builtins.o cgram.o code.o common.o compat.o external.o gc
c_compat.o init.o inline.o local.o local2.o main.o match.o optim.o optim2.o orde
r.o pftn.o reader.o regs.o scan.o stabs.o symtabs.o table.o trees.o -o i486--net
bsdelf-ccom
*** Error code 1

Stop.
nbmake[6]: stopped in /mnt/lfs/NetBSD-CVS/objdir/i386-pb/tools/pcc/build/cc/ccom
*** [all] Error code 1

nbmake[5]: stopped in /mnt/lfs/NetBSD-CVS/objdir/i386-pb/tools/pcc/build/cc
1 error

nbmake[5]: stopped in /mnt/lfs/NetBSD-CVS/objdir/i386-pb/tools/pcc/build/cc

*** Failed target:  all
*** Failed command: for subdir in cc; do _nextdir_=${_thisdir_+$_thisdir_/}$subd
ir; echo "===> $_nextdir_"; (_thisdir_=$_nextdir_; export _thisdir_; cd $subdir
&& exec /mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake -f /mnt/lfs/NetBSD-CVS/src/t
ools/pcc/../Makefile.gnuwrap -d e -m /mnt/lfs/NetBSD-CVS/src/share/mk -j 4 all)
|| exit $?; echo "<=== $_nextdir_"; done
*** Error code 2

Stop.
nbmake[4]: stopped in /mnt/lfs/NetBSD-CVS/objdir/i386-pb/tools/pcc/build
*** [.build_done] Error code 1

nbmake[3]: stopped in /mnt/lfs/NetBSD-CVS/src/tools/pcc
1 error

nbmake[3]: stopped in /mnt/lfs/NetBSD-CVS/src/tools/pcc
*** [dependall] Error code 2

nbmake[2]: stopped in /mnt/lfs/NetBSD-CVS/src/tools/pcc
1 error

nbmake[2]: stopped in /mnt/lfs/NetBSD-CVS/src/tools/pcc

*** Failed target:  dependall-pcc
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; 
case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; 
real="/mnt/lfs/NetBSD-CVS/src/tools" ;; *) this="${dir}/"; 
real="/mnt/lfs/NetBSD-CVS/src/tools/${dir}" ;; esac; show=${this:-.}; echo 
"${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && 
/mnt/lfs/NetBSD-CVS/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; 
}; _makedirtarget pcc dependall
*** Error code 2

Stop.
nbmake[1]: stopped in /mnt/lfs/NetBSD-CVS/src/tools
*** [build_install] Error code 1

nbmake: stopped in /mnt/lfs/NetBSD-CVS/src/tools
1 error

nbmake: stopped in /mnt/lfs/NetBSD-CVS/src/tools

ERROR: Failed to make build_install in "tools"
*** BUILD ABORTED ***


According to this build failure in Oct 2013: 
http://mail-index.netbsd.org/current-users/2013/10/19/msg023571.html, this 
error of missing symbol __USE is not unheard of in other parts of the source 
tree, but I'm unsure what it entails. I wanted to know whether a developer or 
someone who has experience building with PCC can tell me the nature of this 
error/a potential workaround before I file a problem report with NetBSD or PCC? 
Is PCC out of date because it has not been used by others to compile recently?

As usual, thanks for the help!
Sincerely,

William D. Jones


Home | Main Index | Thread Index | Old Index