Bug 689480 - Compilation using gfortran44 fails with (Error: unknown pseudo-op: `.cfi_lsda')
Summary: Compilation using gfortran44 fails with (Error: unknown pseudo-op: `.cfi_lsda')
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc44
Version: 5.5
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-21 16:06 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2013-03-21 20:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-21 20:04:32 UTC
Target Upstream Version:


Attachments (Terms of Use)
parallel cp2k build configuration (598 bytes, application/octet-stream)
2011-03-21 16:06 UTC, Dominik 'Rathann' Mierzejewski
no flags Details
serial cp2k build configuration (588 bytes, text/plain)
2011-03-21 16:07 UTC, Dominik 'Rathann' Mierzejewski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
CentOS 4763 0 None None None Never

Description Dominik 'Rathann' Mierzejewski 2011-03-21 16:06:40 UTC
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.

Comment 1 Dominik 'Rathann' Mierzejewski 2011-03-21 16:07:54 UTC
Created attachment 486635 [details]
serial cp2k build configuration

Comment 2 Dominik 'Rathann' Mierzejewski 2011-03-21 16:12:45 UTC
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

Comment 3 Jakub Jelinek 2011-03-21 16:24:36 UTC
-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.

Comment 4 Dominik 'Rathann' Mierzejewski 2011-03-22 12:18:05 UTC
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.

Comment 5 Jeff Law 2013-03-21 20:04:32 UTC
There are no plans to fix this bug in Red Hat Enterprise Linux 5.


Note You need to log in before you can comment on or make changes to this bug.