Date: Fri, 19 Mar 2004 09:45:22 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: Kris Kennaway <kris@obsecurity.org> Cc: current@FreeBSD.org Subject: Re: Upgrade broken by getopt_long_only() Message-ID: <20040319074522.GB18091@ip.net.ua> In-Reply-To: <20040319034850.GA1157@xor.obsecurity.org> References: <20040319034850.GA1157@xor.obsecurity.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Thu, Mar 18, 2004 at 07:48:50PM -0800, Kris Kennaway wrote:
> I'm attempting to update from a 5.2-CURRENT system last built on Feb
> 9, and buildworld is failing with this:
>
> cc -O -pipe -D_GNU_SOURCE -I. -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../libbfd/i386 -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../../../../contrib/binutils/include -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../../../../contrib/binutils/gas -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../../../../contrib/binutils/gas/config -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/../../../../../contrib/binutils -I/usr/src/gnu/usr.bin/binutils/as/i386-freebsd/.. -DVERSION=\""2.13.2 [FreeBSD] 2002-11-27"\" -DBFD_VERSION_STRING=\""2.13.2 [FreeBSD] 2002-11-27"\" -I/usr/obj/usr/src/i386/legacy/usr/include -static -L/usr/obj/usr/src/i386/legacy/usr/lib -o as app.o as.o atof-generic.o atof-ieee.o bignum-copy.o cond.o dwarf2dbg.o ecoff.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o sb.o stabs.o subsegs.o symbols.o write.o depend.o ehopt.o obj-elf.o tc-i386.o ../../libbfd/libbfd.a ../../libiberty/libiberty.a ../../libopcodes/libopcodes.a /usr/obj/usr/src/i386/legacy/usr/lib/libegacy.a -legacy
> as.o: In function `parse_args':
> as.o(.text+0x388): undefined reference to `getopt_long_only'
> *** Error code 1
>
> Stop in /usr/src/gnu/usr.bin/binutils/as/i386-freebsd.
> *** Error code 1
>
> It looks like ache's getopt changes are causing continued problems.
>
tools/build/Makefile correctly bootstraps getopt_long*() functions,
and it works nicely for upgrading RELENG_4 hosts:
: # Lot of tools need <getopt.h> and getopt_long(3).
: .if !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104
: INCS+= getopt.h
: .PATH: ${.CURDIR}/../../lib/libc/stdlib
: SRCS+= getopt_long.c
: .endif
__FreeBSD_version is <sys/param.h> was set to 502104 in rev. 1.181:
: revision 1.181
: date: 2004/02/25 01:27:32; author: ache; state: Exp; lines: +1 -1
: Bump FreeBSD_version for getopt_long_only() adding
So it looks rather like your build environment is broken. What's the
value of __FreeBSD_version in your installed /usr/include/osreldate.h?
cd /usr/src && make -f Makefile.inc1 -V OSRELDATE
If it doesn't correspond to your real OS version, pass the correct
value to the buildworld, like this:
make buildworld OSRELDATE=`sysctl -n kern.osreldate`
Assuming the latter is correct. If not, set it back to 502103 or,
if you are paranoid, you may even set it to 0.
P.S. I wonder how people manage to screw up their <osreldate.h> so
often... :-(
Cheers,
--
Ruslan Ermilov
FreeBSD committer
ru@FreeBSD.org
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFAWqUSUkv4P6juNwoRAitRAJ9TV1IyHyMRmMmGwQnZ/OwDiDCNcgCdG9ZR
mg1H6TOjXkA2Y/HLEedpzHw=
=P9uC
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040319074522.GB18091>
