NetBSD-Bugs archive

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

toolchain/39837: binutils compilation failure



>Number:         39837
>Category:       toolchain
>Synopsis:       binutils compilation failure
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 31 06:20:00 +0000 2008
>Originator:     Jeremy Huddleston
>Release:        netbsd-3 and netbsd-4
>Organization:
UC Berkeley
>Environment:
System being used to build netbsd/sparc
Linux cloud.cs.berkeley.edu 2.6.25-hardened-r8 #1 Sun Oct 26 11:23:37 PDT 2008 
x86_64 AMD Athlon(tm) 64 Processor 2800+ AuthenticAMD GNU/Linux

>Description:
I have tried both the netbsd-3 and netbsd-4 cvs branches, and both give me the 
same problem while compiling binutils.  I use the following:

ROOT_DIR="$(pwd)"
cd ${ROOT_DIR}/src
./build.sh -X ${ROOT_DIR}/xsrc -m sparc -O ${ROOT_DIR}/obj.sparc -T 
${ROOT_DIR}/obj.sparc/tooldir.linux-amd64 -u tools

...

/home/cloud/jeremy/src/netbsd/netbsd-4/obj.sparc/tooldir.linux-amd64/bin/nbmake 
 -f 
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../Makefile.gnuwrap  
all-recursive
Making all in doc
Making all in po
cc -DHAVE_CONFIG_H -I. 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils
 -I. -D_GNU_SOURCE  -I. 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils
 -I../bfd 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../bfd
 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../include
   
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../intl
 -I../intl  
-DLOCALEDIR="\"/home/cloud/jeremy/src/netbsd/netbsd-4/obj.sparc/tooldir.linux-amd64/share/locale\""
  -Dbin_dummy_emulation=bin_vanilla_emulation  -D_LARGEFILE64_SOURCE -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -O -c 
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c:
 In function 'set_default_bfd_target':
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c:106:
 error: 'TARGET' undeclared (first use in this function)
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c:106:
 error: (Each undeclared identifier is reported only once
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c:106:
 error: for each function it appears in.)

*** Failed target:  bucomm.o
*** Failed command: cc -DHAVE_CONFIG_H -I. 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils
 -I. -D_GNU_SOURCE -I. 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils
 -I../bfd 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../bfd
 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../include
 
-I/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/../intl
 -I../intl 
-DLOCALEDIR="\"/home/cloud/jeremy/src/netbsd/netbsd-4/obj.sparc/tooldir.linux-amd64/share/locale\""
 -Dbin_dummy_emulation=bin_vanilla_emulation -D_LARGEFILE64_SOURCE -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -O -c 
/home/cloud/jeremy/src/netbsd/netbsd-4/src/tools/binutils/../../gnu/dist/binutils/binutils/bucomm.c
*** Error code 1

From the code:

void
set_default_bfd_target (void)
{
  /* The macro TARGET is defined by Makefile.  */
  const char *target = TARGET;

...
>How-To-Repeat:
Checkout netbsd-3 or netbsd-4 and try building it for sparc on a linux x86_64 
box using:

ROOT_DIR="$(pwd)"
cd ${ROOT_DIR}/src
./build.sh -X ${ROOT_DIR}/xsrc -m sparc -O ${ROOT_DIR}/obj.sparc -T 
${ROOT_DIR}/obj.sparc/tooldir.linux-amd64 -u tools

>Fix:



Home | Main Index | Thread Index | Old Index