Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Dwarf Error

Jay_B_
Beginner
3,023 Views

I am linking Intel Fortran version 15.0 code with gcc code compiled with gcc version 4.1.2 (yes, it's old!) on Red Hat Enterprise Linux version 5.10 (kernel 2.6.18-398.el5).  I get the following link error:

ld: Dwarf Error: found dwarf version '3', this reader only handles version 2 information

I suspect that this is due to my gcc version being too old.  Is there a "not older than" version of gcc that is compatible with ifort 15?

Alternatively, can I specify an option in ifort to be backward-compatible with this older C compiler?

Thanks.

0 Kudos
4 Replies
pbkenned1
Employee
3,023 Views

RHEL 5 is supported for the 15.0 compilers.  Try compiling with -gdwarf-2

Patrick

0 Kudos
Jay_B_
Beginner
3,023 Views

Thank you.  That eliminated the Dwarf errors.

Jay

0 Kudos
jayb
Beginner
3,023 Views

Helllo.  Follow-up on my question from October.  Our application will be built for RHELv5, RHELv6, and eventually RHELv7.  I would like to write a generalized script to build Intel Fortran components such that they use the same DWARF version as the few gcc components.  

Is there a way of finding out which DWARF version is in effect by default?  (I must admit that I do not know if this is a gcc feature or a distribution feature.)  I am thinking of something similar to 'cat /etc/redhat-release' which I can parse.  So far, what comes to mind is using 'gcc --version' and translating that into a DWARF version e.g., gcc 4.4 uses dwarf-3.  But can I get at the DWARF version directly?

Thanks,
JayB

0 Kudos
TimP
Honored Contributor III
3,023 Views

I found a comment indicating that current gcc default is dwarf-4.  -gdwarf-2 appears to be still supported, but it doesn't work 100% for me in the context where it was recommended for VTune for Windows, although that's not necessarily relevant to linux.

I don't find gdwarf option documented in the usual places.  Maybe one needs to know where to look in source code.

The question you asked might get an answer on gcc-help mail list.

I haven't found it totally satisfactory to rely on red hat supplied versions of compilers and binutils.  It's not at all difficult to build and install current versions.  The fact that many people need to update components is among the apparent reasons for popularity of CentOS.

0 Kudos
Reply