icpc 13U1 on Mac OS X ML, Xcode 4.5.1, Linking error

icpc 13U1 on Mac OS X ML, Xcode 4.5.1, Linking error

I have recently updated to Intel C++ Composer XE 2013 Update 1 on Mac OS X Mountain Lion, Xcode 4.5.1 The following simplest C++ program

int main () {}

when compiled with

icpc icpc -g -o foo foo.cpp

The following error was emitted

final section layout:

__TEXT/__text addr=0x100000F40, size=0x0000004C, fileOffset=0x00000F40, type=1

__TEXT/__stubs addr=0x100000F8C, size=0x00000006, fileOffset=0x00000F8C, type=27

__TEXT/__stub_helper addr=0x100000F94, size=0x0000001A, fileOffset=0x00000F94, type=31

__TEXT/__eh_frame addr=0x100000FB0, size=0x00000050, fileOffset=0x00000FB0, type=18

__DATA/__program_vars addr=0x100001000, size=0x00000028, fileOffset=0x00001000, type=29

__DATA/__got addr=0x100001028, size=0x00000008, fileOffset=0x00001028, type=28

__DATA/__nl_symbol_ptr addr=0x100001030, size=0x00000010, fileOffset=0x00001030, type=28

__DATA/__la_symbol_ptr addr=0x100001040, size=0x00000008, fileOffset=0x00001040, type=26

__DATA/__debug_frame addr=0x100001048, size=0x00000048, fileOffset=0x00001048, type=0

__DATA/__common addr=0x100001090, size=0x00000020, fileOffset=0x00000000, type=24

__DWARFA/__debug_info addr=0x100002000, size=0x000000F7, fileOffset=0x00002000, type=0

__DWARFA/__debug_line addr=0x1000020F7, size=0x00000044, fileOffset=0x000020F7, type=0

__DWARFA/__debug_abbrev addr=0x10000213B, size=0x00000040, fileOffset=0x0000213B, type=0

ld: 32-bit absolute address out of range (0x10000213B max is 4GB): from .debug_info_seg + 0x00000006 (0x100002000) to anon@0x0000014B (0x10000213B) in .debug_info_seg from foo.o for architecture x86_64 When removing the -g flag, everything works fine.

4 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

I cannot reproduce what you are seeing. Did you install Xcode 4.5.1 in the default directory AND did you install the command line tools:

Here is what I see:
$ source /opt/intel/bin/compilervars.sh intel64
$ more foo.cpp

int main () {}

$ icpc -g -o foo foo.cpp
$ ld -v
@(#)PROGRAM:ld PROJECT:ld64-133.3
configured to support archs: armv6 armv7 i386 x86_64
LTO support using: LLVM version 3.1svn, from Apple Clang 4.0 (build 421.0.57)

I have found the problem. It is not because of icpc but a homebrew installation of gdb, which strangely interfere with the linking of icpc. Removing that solves the problem.

I ran into exactly this same issue when any component was compiled with -g. I upgraded from OS X 10.6 to 10.9, and had to install gdb. I found that simply renaming gdb to something else solved the problem (I called mine "gdb-7.7" and created an alias). It almost seems that having an executable named "gdb" causes this issue. I'm using ifort version 13.0.3 20130606. I also installed gcc version 4.8.1, which I am using instead of the XCode version, but I'm not sure that it matters.

Melden Sie sich an, um einen Kommentar zu hinterlassen.