View Single Post
  #1   (View Single Post)  
Old 10th May 2012
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
 
Join Date: Apr 2009
Location: California
Posts: 163
Default *** Error code 1 building OpenBSD 5.1-stable from source

After successfully installing 5.1, I had a lot of trouble building 5.1-stable from source.

I built the kernel ok in /usr/sys and rebooted fine.

But when I tried a "make build" of userland in /usr/src then this error
appeared:
Quote:
cc -c -O2 -pipe -I. -I/usr/src/gnu/usr.bin/binutils/gdb -I/usr/src/gnu/usr.bin/binutils/gdb/config -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I/usr/src/gnu/usr.bin/binutils/gdb/../include/opcode -I../bfd -I/usr/src/gnu/usr.bin/binutils/gdb/../bfd -I/usr/src/gnu/usr.bin/binutils/gdb/../include -I../intl -I/usr/src/gnu/usr.bin/binutils/gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral -Wunused-label -Wunused-function /usr/src/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c
/usr/src/gnu/usr.bin/binutils/gdb/observer.sh h /usr/src/gnu/usr.bin/binutils/gdb/doc/observer.texi observer.h
*** Error code 1

Stop in /usr/src/gnu/usr.bin/binutils/obj/gdb (line 1335 of Makefile).
*** Error code 1

Stop in /usr/src/gnu/usr.bin/binutils/obj (line 21479 of Makefile).
*** Error code 1

Stop in /usr/src/gnu/usr.bin/binutils (line 72 of /usr/src/gnu/usr.bin/binutils/Makefile.bsd-wrapper).
*** Error code 1

Stop in /usr/src/gnu/usr.bin (line 48 of /usr/share/mk/bsd.subdir.mk).
*** Error code 1

Stop in /usr/src/gnu (line 48 of /usr/share/mk/bsd.subdir.mk).
*** Error code 1

Stop in /usr/src (line 48 of /usr/share/mk/bsd.subdir.mk).
*** Error code 1

Stop in /usr/src (line 80 of Makefile).

After trying different things for several days, I came upon this thread in gmane which fixed the problem:

http://permalink.gmane.org/gmane.os.openbsd.tech/16531

I had to edit the /cvs/src/gnu/usr.bin/binutils/gdb/Makefile.in

and change the execution of observer.sh to have "sh -e" in front:

observer.h: observer.sh doc/observer.texi
- ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h
+ sh -e ${srcdir}/observer.sh h ${srcdir}/doc/observer.texi observer.h

observer.inc: observer.sh doc/observer.texi
- ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc
+ sh -e ${srcdir}/observer.sh inc ${srcdir}/doc/observer.texi observer.inc
Reply With Quote