| Summary: | >=net-irc/ircd-hybrid-7.1.0 has problems with AMD64 multilib | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Alan LeVee <alan.levee> |
| Component: | New packages | Assignee: | Packages in net-irc <net-irc> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gentoo |
| Priority: | High | ||
| Version: | 2005.1 | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
patch to fix amd64 header bits/stat.h
7.2.1-amd64-multilib.patch |
||
not even masked testing on amd64. feel free to reopen with a working patch Looks like a headers problem to me. Reopening in order to attach a patch. Created attachment 67953 [details, diff]
patch to fix amd64 header bits/stat.h
Toolchain: This patch to gentoo-multilib/amd64/bits/stat.h seems to fix the
problem for me. Does it look sane to you?
Comment on attachment 67953 [details, diff]
patch to fix amd64 header bits/stat.h
i havent looked at the issue at all but i'm 99% sure that patch is wrong
My first guess as to the cause was a rogue macro definition of '__unused' - did a quick grep and found one in src/lex.yy.c (from ircd-hybrid-7.1.1.tgz) the following: #if defined(__FreeBSD__) #include <sys/cdefs.h> #else #define __unused #endif I'd guess that leads to the 'long int __unused[3]' being replaced with 'long int [3]' in bits/stat,h which is syntatically invalid and would cause the error shown. I suggest it would be better to do: #if defined(__FreeBSD__) #include <sys/cdefs.h> #define REALLOC_SUFFIX __unused #else #define REALLOC_SUFFIX #endif and then later on in the same file (src/lex.yy.c): static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) REALLOC_SUFFIX; rather than: static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused; however I haven't actually tried it. Also a better name than REALLOC_SUFFIX may be appropriate; I don't know what it's trying to achieve, as I don't run FreeBSD. thanks kevin bug is clearly in ircd-hybrid I have a slightly different result that seems to be the same issue:
In file included from /usr/include/bits/stat.h:8,
from /usr/include/gentoo-multilib/amd64/sys/stat.h:105,
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: syntax error before '[' token
x86_64-pc-linux-gnu-gcc -I../include -I../lib/pcre -Wall -O2 -g -march=opteron -msse3 -O3 -pipe -c listener.c
make[1]: *** [lex.yy.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/ircd-hybrid-7.2.1/work/ircd-hybrid-7.2.1/src'
make: *** [build] Error 2
!!! ERROR: net-irc/ircd-hybrid-7.2.1 failed.
Call stack:
ebuild.sh, line 1540: Called dyn_compile
ebuild.sh, line 940: Called src_compile
ircd-hybrid-7.2.1.ebuild, line 89: Called die
Created attachment 90048 [details, diff]
7.2.1-amd64-multilib.patch
Please test with this patch if it works for you
(In reply to comment #8) > Created an attachment (id=90048) [edit] > 7.2.1-amd64-multilib.patch > > Please test with this patch if it works for you Yeps. This patch works for me. Cheers, guid0 Okay, thanks for testing :) |
The software ircd-hybrid-7.1.0 and above has compiling issues on the AMD64 problem that seem to be related to the multilib that is used by Gentoo/AMD64. This error occurs during the lexer generation and can be seen here: In file included from /usr/include/bits/stat.h:7, from /usr/include/gentoo-multilib/amd64/sys/stat.h:105, from /usr/include/sys/stat.h:7, from ../include/stdinc.h:123, from ircd_lexer.l:31: /usr/include/gentoo-multilib/amd64/bits/stat.h:103: error: parse error before '[' token make[1]: *** [lex.yy.o] Error 1 make[1]: Leaving directory `/home/trelane/ircd-hybrid-7.2beta1/src' make: *** [build] Error 2 However I cannot provide you with an 'emerge info' as this problem was reported to the ircd-hybrid development (me and others) by a Gentoo user trying to compile ircd-hybrid on AMD64. If you manage to get this resolved that would be great because as far as I can tell, this is not related to our code but to the multilib itself. Reproducible: Always Steps to Reproduce: 1. emerge net-irc/ircd-hybrid 2. 3. Actual Results: ircd-hybrid fails to build due to parse errors in AMD64 multilib Expected Results: ircd-hybrid should have built successfully.