Users, Please use old version of sys-devel/flex until it is resolved. x86_64-gentoo-freebsd11.0-gcc -O2 -pipe -I. -I/var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin/mklocale -I/var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin/mklocale/../../lib/libc/locale -std=gnu99 -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address -o mklocale yacc.o lex.o lex.o: In function `input': lex.c:(.text+0x9d5): undefined reference to `yywrap' lex.o: In function `yylex': lex.c:(.text+0x1b19): undefined reference to `yywrap' collect2: error: ld returned 1 exit status *** [mklocale] Error code 1 make[1]: stopped in /var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin/mklocale 1 error make[1]: stopped in /var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin/mklocale *** [all_subdir_mklocale] Error code 2 make: stopped in /var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin 1 error make: stopped in /var/tmp/portage/sys-freebsd/freebsd-ubin-11.0-r1/work/usr.bin * ERROR: sys-freebsd/freebsd-ubin-11.0-r1::gentoo failed (compile phase): * make failed
A walkaround is to export the LEX variable: export LEX="lex --noyywrap"
Fixed in sys-devel/flex-2.6.4. closing.