Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605152 - Upgrade to 10.3 on fresh install doesn't work => sys-freebsd/freebsd-share fails building with `lex`-related errors
Summary: Upgrade to 10.3 on fresh install doesn't work => sys-freebsd/freebsd-share fa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-09 08:36 UTC by Niklas Haas
Modified: 2017-01-09 08:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-freebsd/freebsd-share-10.3 build.log (build.log,23.55 KB, text/x-log)
2017-01-09 08:36 UTC, Niklas Haas
Details
emerge --info sys-freebsd/freebsd-share (emerge-info.txt,4.73 KB, text/plain)
2017-01-09 08:37 UTC, Niklas Haas
Details
generated lex.c (lex.c,54.95 KB, text/x-csrc)
2017-01-09 08:38 UTC, Niklas Haas
Details
generated yacc.c (yacc.c,31.44 KB, text/x-csrc)
2017-01-09 08:48 UTC, Niklas Haas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niklas Haas 2017-01-09 08:36:08 UTC
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.
Comment 1 Niklas Haas 2017-01-09 08:37:38 UTC
Created attachment 459282 [details]
emerge --info sys-freebsd/freebsd-share
Comment 2 Niklas Haas 2017-01-09 08:38:15 UTC
Created attachment 459286 [details]
generated lex.c
Comment 3 Niklas Haas 2017-01-09 08:48:29 UTC
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.
Comment 4 Niklas Haas 2017-01-09 08:48:42 UTC
Created attachment 459302 [details]
generated yacc.c
Comment 5 Niklas Haas 2017-01-09 08:54:23 UTC
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.