Hide Forgot
Created attachment 486634 [details] parallel cp2k build configuration Description of problem: On CentOS 5.5, when compiling cp2k (2_1 stable branch) in smp configuration (with -fopenmp) using gfortran44, compilation fails with {standard input}: Assembler messages: {standard input}:48: Error: unknown pseudo-op: `.cfi_lsda' Configurations for Linux-x86-64-gfortran44.ssmp (parallel) and Linux-x86-64-gfortran44.sopt (serial) are attached. Version-Release number of selected component (if applicable): gcc44-gfortran-4.4.0-6.el5 How reproducible: Always Steps to Reproduce: 1. put the attached files in cp2k/arch/ 2. cd cp2k/makefiles 3. export FORT_C_NAME=gfortran44 4. make OPTFLAGS="%{optflags} -L%{_libdir}/atlas" %{?_smp_mflags} sopt ssmp Actual results: [...] gfortran44 -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -L/usr/lib64/atlas -ffree-form -fopenmp -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__COMPILE_ARCH="\"Linux-x86-64-gfortran44\"" -D__COMPILE_DATE="\"Fri Mar 11 09:02:52 EST 2011\"" -D__COMPILE_HOST="\"kitsune.icm.edu.pl\"" -D__COMPILE_LASTCVS="\"D/lib////\"" /home/guests/rathann/build/BUILD/cp2k/makefiles/../src/lib/dbcsr_machine.F {standard input}: Assembler messages: {standard input}:48: Error: unknown pseudo-op: `.cfi_lsda' make[2]: *** [dbcsr_machine.o] Error 1 make[2]: Leaving directory `/home/guests/rathann/build/BUILD/cp2k/obj/Linux-x86-64-gfortran44/ssmp' make[1]: *** [build] Error 2 make[1]: Leaving directory `/home/guests/rathann/build/BUILD/cp2k/makefiles' make: *** [ssmp] Error 2 Expected results: Should compile successfully. Additional info: The same command without -fopenmp succeeds.
Created attachment 486635 [details] serial cp2k build configuration
It seems I copied and pasted commands from my specfile (http://pkgs.fedoraproject.org/gitweb/?p=cp2k.git;a=blob;f=cp2k.spec;h=deed774de48ff0b01d0baa6714ff89747fa708cd;hb=el6/master) for cp2k in EL-6 branch, so of course they won't work as-is, so let's make it 4. make OPTFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -L/usr/lib64/atlas" sopt ssmp
-fexceptions for Fortran doesn't make much sense. 4.4 still defaulted to using gas .cfi_* even when .cfi_personality/.cfi_lsda wasn't supported when eh_personality_libfunc was NULL and as nothing in Fortran ever said it because Fortran doesn't support exceptions, it will get through. Either drop -fexceptions, add -fno-exceptions afterwards or use -fno-dwarf2-cfi-asm.
Indeed, removing -fexceptions from OPTFLAGS makes the compilation succeed. Thanks for the tip. I'm downgrading severity to low, since there's a workaround. Still, if it doesn't make sense, passing -fexceptions to gfortran should fail immediately, not at the asm level with cryptic error message.
There are no plans to fix this bug in Red Hat Enterprise Linux 5.