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.

Problems with -g flag

jsaenz
Beginner
1,981 Views

Hi,

I am compiling some code. When I use the -g option to create debuging information in the object files, I get the following error message:

ifort -g -O0 -check all -traceback -warn all -fpe0 -c types.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c common_mod.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c interp.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c spatial.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c eos.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c io.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c source.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c init.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 -c main.f90
ifort -g -O0 -check all -traceback -warn all -fpe0 common_mod.o eos.o init.o interp.o io.o main.o source.o spatial.o types.o -o ../exe/hyperslv
ld: fatal error in /usr/bin/ld64
make: *** [../exe/hyperslv] Error 1

If I don't use the -g option, I get no error messages and the comilation is sucessfull. Any ideas on what might be the problem will be greatly appreciated.

Thanks

 

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,981 Views
Well, at first glance it suggests that the compiler is putting out bad debug info. Are you using a current 10.0 compiler?

I would suggest that you submit an issue to Intel Premier Support and attach a tar file of your sources and makefile.
0 Kudos
jsaenz
Beginner
1,981 Views
Yes, I am using the current 10.0 compiler.
0 Kudos
Ron_Green
Moderator
1,981 Views
Given that you're using /usr/bin/ld64 for the link, I take it you are on a Mac. Is this Tiger or Leopard? Make sure you list this in your bug report on Premier. It will help to have your source files attached to the Premier ticket. I'll watch for the bug report and take a look into it.

ron
0 Kudos
jazzquezz
Beginner
1,981 Views
hello,
i am having exactly the same problem... i am compiling a program with ifort
10.1.006 under macos (tiger). the optimized, non-debugger version compiles
and run perfectly. however, when i turn on the -g option, all the subroutines are
compiled well but at the linking moment i get:

ifort -o Alya.g Objects_g/*.o
ld: fatal error in /usr/bin/ld64

i am using no more option that -g, as you can see.

i have seen that this thread suddenly cuts with no solution given... is there any
solution????


regards and thanks a lot
jazzquezz

0 Kudos
Kevin_D_Intel
Employee
1,981 Views

The ld: fatal error in /usr/bin/ld64 discussed in this thread appears not to be an Intel compiler issue. The issue appears to involve the ld64 linker provided by Apple under their Tiger Release of Mac OS. Our compiler developer believes the issue was only addressed under Leopard as we are not aware of a fix provided for Tiger. If we become aware of a fix for Tiger we will post a reply here.

The test case provided in association with the original post compiles and links successfully using the Intel Fortran 10.1 compiler for IA-32 under Tiger. It fails to link under Tiger when using the Intel Fortran 10.1 compiler for Intel 64 which uses the ld64 linker. The test case also successfully compiles and links with the Intel Fortran 10.1 compiler for Intel 64 under Leopard which uses ld64.

Under Leopard, our developer determined the issue was addressed by this ld64 version: ld64-74.4 BUILT: May 22 2007 20:00:11

The version of ld64 is shown with: ld64 -v

We reproduced the issue with these ld64 versions:

ld64-62.1 BUILT: Sep 26 2006 21:31:14

ld64-63.1 BUILT: Oct 1 2006 00:26:06

Unfortunately, if you suffer this link failure using the Intel Fortran compiler for Intel 64 under Tiger, it appears the only resolutions under Tiger are to either compile without debug symbols (-g) when using the Intel 64 compiler with obvious limitations to debugging, or use the IA-32 compiler with -g.

Another possible option might be to upgrade to Leopard. You should consult Apple documentation for information about using Leopard on your system configuration.

0 Kudos
Reply