Compile error on RHEL4/ia64
CC to mailing list also ...
Quoted 35 lines · Girish Shilamkar
Hi Ted,
While building e2fsprogs on ia64/rhel4 the following compile error was
flagged:Error messages:
make[4]: Leaving directory `/cache/build/BUILD/e2fsprogs-1.40.7.sun1/lib/uuid'
CCclear.c
CCcompare.c
CCcopy.c
CCgen_uuid.cgen_uuid.c: In function `uuid__generate_time':
gen_uuid.c:493: internal compiler error: inia64_expand_load_address, atconfig/ia64/ia64.c:1184
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into/tmp/ccYkSBN6.outfile, please attach this to your bugreport.
make[3]: *** [gen_uuid.o] Error 1e2fsprogs, if supported, sets TLS to appropriate TLS type, which happens to be '
__thread' for Linux. And henceTHREAD_LOCALis defined as 'static__thread' inuuid_gen.c. But it seems that RHEL4 glibc is incompatible with TLS on ia64, though e2fsprogs detected that '__thread' is usable.Further investigation revealed that, With '-O' option it is ok on all (rhel4, rhel5, sles9 & sles10) distros but with optimization level >=2(-O2, -O3, ...) the problem occurs on RHEL4.
https://bugzilla.lustre.org/show_bug.cgi?id=15514
has more details about the tests run to verify the above findings, comments # 9 and 10.Regards,
Girish
Quoted 4 lines · Girish Shilamkar
Hi Ted,
While building e2fsprogs on ia64/rhel4 the following compile error was
flagged:
Quoted 15 lines
Error messages:
make[4]: Leaving directory `/cache/build/BUILD/e2fsprogs-1.40.7.sun1/lib/uuid'
CCclear.c
CCcompare.c
CCcopy.c
CCgen_uuid.cgen_uuid.c: In function `uuid__generate_time':
gen_uuid.c:493: internal compiler error: inia64_expand_load_address, atconfig/ia64/ia64.c:1184
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into/tmp/ccYkSBN6.outfile, please attach this to your bugreport.
make[3]: *** [gen_uuid.o] Error 1
Well, as stated above, this is very clearly an IA64 optimizer bug in GCC where it's not able to handle __thread with a pretty specific piece of code.
It's also on a relatively ancient distribution and GCC version. You could try reportig the bug to Red Hat to see if they are willing to provide a fix. Failing that, probably the best thing to do is just to use configure --disable-tls on a RHEL4/ia64 system. The main purpose of the use of thread local storage is to avoid duplicate UUID's on SMP systems when you have multiple threads generating UUID's at a very high rate.
Certain database-driven applications will have a problem here, but it's not clear it will matter for most users of Lustre.
Regards,
- Ted