Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222143 - net-irc/ircd-hybrid-7.2.3 fails to build on amd64 because of prebuilt lex.yy.c
Summary: net-irc/ircd-hybrid-7.2.3 fails to build on amd64 because of prebuilt lex.yy.c
Status: RESOLVED DUPLICATE of bug 212255
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Packages in net-irc
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-14 20:29 UTC by Dan Stephans II
Modified: 2008-06-25 08:38 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 Dan Stephans II 2008-05-14 20:29:21 UTC
ircd-hybrid fails to build when emerged on amd64 with the following error:

x86_64-pc-linux-gnu-gcc -I../include -I../lib/pcre   -Wall -O2 -g -O2 -march=k8 -pipe -mno-tls-direct-seg-refs -c memory.c
In file included from /usr/include/bits/stat.h:8,
                 from /usr/include/gentoo-multilib/amd64/sys/stat.h:107,
                 from /usr/include/sys/stat.h:8,
                 from ../include/stdinc.h:123,
                 from ircd_lexer.l:31:
/usr/include/gentoo-multilib/amd64/bits/stat.h:103: error: expected identifier or '(' before '[' token
make[1]: *** [lex.yy.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/net-irc/ircd-hybrid-7.2.3/work/ircd-hybrid-7.2.3/src'
make: *** [build] Error 2

This is because lex.yy.c is pregenerated and has the following __unused define:

#if defined(__FreeBSD__)
#include <sys/cdefs.h>
#else
#define __unused
#endif


that conflicts with the following in /usr/include/gentoo-multilib/amd64/bits/stat.h:

#if __WORDSIZE == 64
    long int __unused[3];
#else
# ifndef __USE_FILE_OFFSET64
    unsigned long int __unused4;
    unsigned long int __unused5;
# else

The solution is to package the ebuild without the prebuilt lex.yy.c and generate it with flex (which, unfortunately, is not taken care of by the built makefile).  If flex is run on ircd_lexer.l a working lex.yy.c is created.

Reproducible: Always

Steps to Reproduce:
1. have a 64 bit install
2. unmask net-irc/ircd-hybrid
3. emerge ircd-hybrid

Actual Results:  
As described in the description.

Expected Results:  
Ebuild should not pre-package the lex.yy.c and instead should generate it locally.
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-25 08:38:52 UTC

*** This bug has been marked as a duplicate of bug 212255 ***