11-STABLE build failure in gnu/usr.bin/binutils/ld on recent -CURRENT
Don Lewis
truckman at FreeBSD.org
Sun Jul 26 08:25:47 UTC 2020
I ran into another problem updating my 11-STABLE poudriere jails on my
package build machine, which runs a fairly recent version of -CURRENT.
If I try to cross build:
-O2 -pipe -DBFD_DEFAULT_TARGET_SIZE=64 -I. -I/tmp/src11/gnu/usr.bin/binutils/l
d -I/tmp/src11/gnu/usr.bin/binutils/ld/../libbfd -I/usr/obj/tmp/src11/gnu/usr.bi
n/binutils/ld/../libbfd -I/tmp/src11/gnu/usr.bin/binutils/ld/../../../../contrib
/binutils/include -DTARGET=\"x86_64-unknown-freebsd\" -DDEFAULT_EMULATION=\"el
f_x86_64_fbsd\" -DSCRIPTDIR=\"/usr/libdata\" -DBFD_VERSION_STRING=\""2.17.50 [Fr
eeBSD] 2007-07-03"\" -DBINDIR=\"/usr/bin\" -DTARGET_SYSTEM_ROOT=\"/\" -DTOOLBIND
IR=\"//usr/bin/libexec\" -D_GNU_SOURCE -I/tmp/src11/gnu/usr.bin/binutils/ld/../.
./../../contrib/binutils/ld -I/tmp/src11/gnu/usr.bin/binutils/ld/../../../../con
trib/binutils/bfd -g -MD -MF.depend.ldlex.o -MTldlex.o -std=gnu99 -fstack-prote
ctor-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parame
ter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized
-Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variabl
e -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unu
sed-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-pack
ed-member -Qunused-arguments -c ldlex.c -o ldlex.o
ldlex.c:3216:3: error: incompatible pointer types passing 'int *' to parameter
of type 'yy_size_t *' (aka 'unsigned long *')
[-Werror,-Wincompatible-pointer-types]
...YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/src11/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldlex.l:64:54
: note:
expanded from macro 'YY_INPUT'
#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
^~~~~~~
/tmp/src11/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldlex.l:73:42
: note:
passing argument to parameter here
static void yy_input (char *, yy_size_t *, yy_size_t);
^
1 error generated.
*** Error code 1
The problem is that the skeleton defines yy_n_chars as type 'int'
instead of type 'yy_size_t'. That's a bit of a puzzle because it is
defined as 'yy_size_t' in usr.bin/lex/initskel.c.
If I force lex to always be built as a bootstrap tool, then I get a
successful build, so it looks like the host version of lex is getting
used by default.
I think this is a new problem when the build host is -CURRENT. This
commit:
------------------------------------------------------------------------
r362333 | jkim | 2020-06-18 11:09:16 -0700 (Thu, 18 Jun 2020) | 4 lines
MFV: r362286
Merge flex 2.6.4.
------------------------------------------------------------------------
changes the type of yy_size_t from 'yy_size_t' to 'int'.
I'm not sure what the best fix for this is.
More information about the freebsd-stable
mailing list