FS#14632 - gcc fails to compile hdf5 version 1.8.2
Attached to Project:
Arch Linux
Opened by Giuseppe Borzi (gborzi) - Friday, 08 May 2009, 13:16 GMT
Last edited by Allan McRae (Allan) - Friday, 08 May 2009, 16:58 GMT
Opened by Giuseppe Borzi (gborzi) - Friday, 08 May 2009, 13:16 GMT
Last edited by Allan McRae (Allan) - Friday, 08 May 2009, 16:58 GMT
|
Details
Description: after upgrading gcc to 4.4.0 I tried to
recompile hdf5 from AUR, which is currently at version 1.8.2
(AUR page
http://aur.archlinux.org/packages.php?ID=9939) on an Athlon 64 XP 3000+ machine running x86_64 Arch
version. The compilation failed with an error message
suggesting to report a bug to gcc developers.
The CFLAGS used in the Athlon PC are the safe CFLAGS suggested in the wiki, i.e. CFLAGS="-march=k8 -O2 -pipe", but it shouldn't be a problem due to the CFLAGS, these are unset in the PKGBUILD. Then I tried to recompile the package on two different laptops, a Turion 64 X2 and a Core 2 Duo, both running x86_64 Arch version, and both using the wiki's safe CFLAGS. On the Turion the compilation hanged the machine, I saw memory usage going up until Xorg crashed and I was left with a nonworking console. On the Core 2 Duo I succeeded in stopping the compilation before the crash could happen, I saw the memory usage on this laptop going up like the Turion. I "solved" the problem upgrading the hdf5 PKGBUILD to version 1.8.3 released on May 4th. To me this looks like a gcc bug rather than an hdf5 bug. Compilation may fail, but it shouldn't crash you PC. Additional info: * package version(s) gcc 4.4.0, hdf5 1.8.2 from AUR * config and/or log files etc. Sorry, no log file at the moment. I'm unwilling to reproduce the bug on the laptops (for obvious reasons!) and I have no access to the Athlon 64 at the moment, I can post the error message on Monday. hdf5's configure is called as F9X=gfortran ./configure --prefix=/usr \ --enable-hl \ --enable-linux-lfs \ --enable-production \ --enable-hdf5v1_4 \ --enable-hdf5v1_6 \ --enable-cxx \ --enable-fortran \ --enable-shared \ --with-pic \ --docdir=/usr/share/doc/hdf5/ \ --with-pthread=/usr/lib/ \ --with-ssl=/usr/lib/ Steps to reproduce: Download hdf5 PKGBUILD from AUR and run makepkg. |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 08 May 2009, 16:58 GMT
Reason for closing: Upstream
Additional comments about closing: well, somewhere upstream...
Friday, 08 May 2009, 16:58 GMT
Reason for closing: Upstream
Additional comments about closing: well, somewhere upstream...
gcc-4*)
# Be optimistic about future versions of gcc.. :-) - QAK - 2003/10/20
PROD_CFLAGS="-O3"
Then the same for hdf5 1.8.3:
gcc-4.[34]*)
# The optimization level is reduced for gcc 4.[34] due to problems
# with code generation for src/H5Tconv.c with the -O (same -O1)
# optimization levels (which shows up as failures for long double
# types -> signed char conversion in the test/dt_arith test).
# There's either a bug in gcc or our code. Need further investigation.
# Turn off all optimizations to allow the tests to pass for now.
# - AKC - 2009/04/19
PROD_CFLAGS="-O0"
GCC is known to produce bad code or having bugs when using -O3 optimization. In fact, it runs into a loop when trying to optimize with -O3 with hdf5. You might want to file a bug upstream about this issue, in case it isn't known yet, but I don't see this as a critical bug that has to be fixed ASAP, as compiling with -O3 isn't the smartest thing to do and produces bad code in many cases anyways.