Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36233 - modutils-2.4.26 fails to compile with newer flex
Summary: modutils-2.4.26 fails to compile with newer flex
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-21 05:47 UTC by Stephane Loeuillet
Modified: 2003-12-22 15:44 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Loeuillet 2003-12-21 05:47:26 UTC
emerge development-sources (and so, emerge module-init-tools)

gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wno-uninitialized -I. -I. -I./../include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DCONFIG_ROOT_CHECK_OFF=0   -c -o parse.o parse.c
flex -olex.c -d lex.l parse.h
gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wno-uninitialized -I. -I. -I./../include -D_GNU_SOURCE -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DCONFIG_ROOT_CHECK_OFF=0   -c -o lex.o lex.c
In file included from lex.l:33:
../include/util.h:42: warning: built-in function `log' declared as non-function
lex.l: In function `yylex':
lex.l:429: error: `yytext_ptr' undeclared (first use in this function)
lex.l:429: error: (Each undeclared identifier is reported only once
lex.l:429: error: for each function it appears in.)
make[1]: *** [lex.o] Error 1
make[1]: Leaving directory `/usr/portage/tmp/portage/module-init-tools-0.9.15_pre4/work/modutils-2.4.26/genksyms'
make: *** [all] Error 2


for information, i use flex v2.5.31 (April 1, 2003)
but because of a versionning problem, most gentoo users use flex v2.5.4 which is 7 years old (see bug #33477 at http://bugs.gentoo.org/show_bug.cgi?id=33477)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 2.4.23)
=================================================================
System uname: 2.4.23 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache digest sandbox strict userpriv"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/usr/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X accessibility acpi alsa apache2 apm avi berkdb bonobo cdr crypt
cups doc dvd dvdr encode esd ethereal evo flash foomaticdb gd gdbm gif gnome
gnomedb gphoto2 gstreamer gtk gtk2 gtkhtml innodb ipv6 java joystick jpeg ldap
libg++ libgda libwww mad mikmod mmx mozilla mpeg mysql ncurses nls oggvorbis
opengl pam pda pdflib perl plotutils png postgres ppds python quicktime readline
samba sasl sdl slang snmp spell sse ssl svga tcpd tetex threads tiff truetype
usb videos x86 xml xml2 xv zlib"
Comment 1 Stephane Loeuillet 2003-12-21 05:50:41 UTC
the warning/line :
../include/util.h:42: warning: built-in function `log' declared as non-function
is not part of the problem as it is present all over the compilation process

the only other warning i can see is :
parse.y: conflicts: 6 shift/reduce, 5 reduce/reduce

but it is far away from the compilation error so probably not related
Comment 2 Stephane Loeuillet 2003-12-21 19:12:37 UTC
seems it is in the modutils part.

quote from a mail i had with rusty russel :

"It's actually a modutils problem.
Looks like the gentoo module-init-tools package included the modutils source.

I had the same problem, though, and IIRC it was fairly trivial to fix.  Unfortunately, I can't find the diff 8("

so, using my friend google :
http://www.google.fr/search?q=yytext_ptr+undeclared&ie=UTF-8&oe=UTF-8&hl=fr&btnG=Recherche+Google&meta=

i found pointers to similar bugs in LFS and debian, including this one :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=189695&archive=yes

it contains the fix for modutils 2.4.21 but it should be easy to port to 2.4.26

Comment 3 Stephane Loeuillet 2003-12-22 15:22:50 UTC
LFS patches :

http://linuxfromscratch.org/pipermail/patches/2003-September/000258.html
http://lfs.crash404.com/patches/downloads/modutils/modutils-2.4.25-flex-1.patch

seems this fix is shorter and smarter.


i found this bug was triggered by both modutils (2.4.2[1-6] at least) and xfree (4.3) since flex-2.5.[28-31]
Comment 4 Stephane Loeuillet 2003-12-22 15:33:45 UTC
another LFS page, with a summary about what flex 2.5.31 breaks :

http://www.linuxfromscratch.org/~matthew/lfs_packages.html

"flex-2.5.31 is known to cause compilation of certain packages (modutils and xfree86 to name but 2) to fail. flex-2.5.27 has been reported to work correctly, although as it is classed as an experimental release the CVS book is sticking to 2.5.4a for now. The patch linked to here should allow compilation of modutils to succeed but YMMV."

http://www.linuxfromscratch.org/~matthew/lfs-patches/flex-2.5.31-yytext_ptr-1.patch.bz2

but it is a fix for flex, not modutils itself !!!
Comment 5 Stephane Loeuillet 2003-12-22 15:42:18 UTC
argh, i hate it

seems Martin Holzer already included LFS patch for flex 2.5.31 (in -r1) in order to make modutils to compile but as 2.5.4 is still in portage, emerge -up flex won't show me that a -r1 version is present (for portage, 2.5.4 is newer than 2.5.31)

so, for people who can't compile modutils because of your current flex, update at least to flex-2.5.31-r1 or stay with 2.5.27 or lower

Comment 6 Stephane Loeuillet 2003-12-22 15:44:27 UTC
seems it was a dupe of 
http://bugs.gentoo.org/show_bug.cgi?id=31240