[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFH] Loki bug #409370: missing 64-bit executablex



On Mon, Mar 24, 2008 at 06:05:20PM +0100, Andreas Tille wrote:
Hi,

is anybody able to solve this problem that seems to occure only on 64bit
archs.  I compared the build logs and found:


make[2]: Entering directory `/build/buildd/loki-2.4.7.4/lokisrc'
cc -g -Wall -O2 -W -Wall -pedantic -ffloat-store -Wno-long-long -I../include     -c -o param_parse.o param_parse.c
cc -c -g -Wall -O2 -W -Wall -pedantic -ffloat-store -Wno-long-long -I../include   -DYY_NO_UNPUT param_lex.c
In file included from /usr/include/sys/stat.h:107,
                 from param_lex.l:25:
/usr/include/bits/stat.h:65: error: expected identifier or '(' before '[' token
make[2]: *** [param_lex.o] Error 1
make[2]: Leaving directory `/build/buildd/loki-2.4.7.4/lokisrc'

Here's the difference: in <sys/stat.h>, the following occurs:

#if __WORDSIZE == 64
    long int __unused[3];
#else
# ifndef __USE_FILE_OFFSET64
    unsigned long int __unused4;
    unsigned long int __unused5;
# else
    __ino64_t st_ino;                   /* File serial number.  */
# endif
#endif

So on 64-bit platforms, a field called __unused is defined. But in param_lex.c, the following code exists:

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

So that code in <sys/stat.h> comes out to:
  long int [3];
which isn't valid. The solution is not to define things that aren't in your namespace, so flex shouldn't #define __unused, or use it, for that matter.

HTH.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


Reply to: