Created attachment 459278 [details] sys-freebsd/freebsd-share-10.3 build.log Hello. I have a fresh stage3 that I'm installing using this guide: https://wiki.gentoo.org/wiki/Gentoo_FreeBSD Because the 9.x profiles are deprecated, I decided to upgrade to 10.x as soon as possible, specifically right after setting up the base system but before installing a kernel. (I am still inside a chroot environment) To upgrade, I am following the guide here: https://wiki.gentoo.org/wiki/Gentoo_FreeBSD/Upgrade_Guide I am stuck on the step that reads “The first emerge the core library:”, specifically this command: CC=gcc CXX=g++ CXXFLAGS="-O2 -pipe" USE=build MAKEOPTS="-j1" emerge --nodeps sys-freebsd/freebsd-lib sys-freebsd/freebsd-share The problematic ebuild is sys-freebsd/freebsd-share, which fails with the following error: /var/tmp/portage/sys-freebsd/freebsd-share-10.3/work/usr.bin/mkcsmapper_static/../mkcsmapper/yacc.y: In function ‘main’: /var/tmp/portage/sys-freebsd/freebsd-share-10.3/work/usr.bin/mkcsmapper_static/../mkcsmapper/yacc.y:727:3: warning: implicit declaration of function ‘yyparse’ [-Wimplicit-function-declaration] yyparse(); ... yacc.c: At top level: yacc.c:925:1: warning: no previous prototype for ‘yyparse’ [-Wmissing-prototypes] yyparse (YYPARSE_PARAM_ARG) ^ ... lex.o: In function `yylex': lex.c:(.text+0xca4): undefined reference to `yywrap' collect2: error: ld returned 1 exit status It seems like it has something to do with `lex` generating incompatible output (missing yyparse), maybe a bad `lex` version? sys-devel/flex-2.6.3 is the newest available, though. # lex --version lex 2.6.3 I've attached the build log, generated lex.c and emerge --info outputs.
Created attachment 459282 [details] emerge --info sys-freebsd/freebsd-share
Created attachment 459286 [details] generated lex.c
Also, since I just realized that the yacc.c which interacts with lex.c is also generated by a tool called `yacc`, here is the generated output of that. I can't find out what yacc version I'm on (it takes no --version), but since it's part of freebsd-ubin, I imagine it would be on 9.1 like the rest of my system.
Created attachment 459302 [details] generated yacc.c
Okay, a few observations: 1. The missing function “yyparse” is actually part of yacc.c, it's just declared after it's used, which causes warnings but no serious errors. The actual error is the missing function “yylex”. Since my `yacc` version was so old, and I couldn't upgrade it individually, I decided to try downgrading `lex` to the only previous version available (2.5.39-r1) instead. This seems to have fixed the `yylex` issue, and the file + the next few files compile without any warnings. Now I'm stuck on a different error, namely: make: don't know how to make /var/tmp/portage/sys-freebsd/freebsd-share-10.3/work/share/doc/legal/realtek/../../../../sys/contrib/dev/urtwn/LICENSE. Stop I'll work around it using USE="-doc" for the time being, and open a new issue if it persists after upgrading the rest of the system.