- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I'm trying to compile a f90 program in 32bits with ifort v8.1 (Intel Fortran Compiler for 32-bit applications, Version 8.1 Build 20051007Z Package ID: l_fc_pc_8.1.031) on a x86-64 system (redhat 4.1.2-44).
I link statically with the libc using the following options:
LIBRI = $(MY_LIBS) -Xlinker -melf_i386 -static -Vaxlib, where MY_LIBS is the set of in-house libraries I'm linking with.
On of my library contains a routine written in C. I have compiled this routine using gcc (x86-64, version 3.4.6-4). The object is then archived with other F90-written modules to build a static library.
Then, at the link when buidling my final executable, I get the following error:
/usr/lib/libc.a(iofclose.o): In function `fclose':
(.text+0x1b3): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(iofclose.o):(.eh_frame+0x166): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(iofflush.o): In function `fflush':
(.text+0xd2): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(iofflush.o):(.eh_frame+0xde): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(iofgets.o): In function `fgets':
(.text+0x164): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(iofgets.o):(.eh_frame+0xde): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(iofputs.o): In function `fputs':
(.text+0x102): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(iofputs.o):(.eh_frame+0xde): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(iofread.o): In function `fread':
(.text+0x107): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(iofread.o):(.eh_frame+0xde): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(ioftell.o): In function `ftell':
(.text+0x1b0): undefined reference to `_Unwind_Resume'
/usr/lib/libc.a(ioftell.o):(.eh_frame+0xde): undefined reference to `__gcc_personality_v0'
/usr/lib/libc.a(iofwrite.o): In function `fwrite':
[....]
GNU ld version 2.17.50.0.6-9.cgvel5 20061020
Supported emulations:
elf_x86_64
elf_i386
i386linux
I'm used to compile this program on another OS: RH 3.4 with gcc version 3.4.5 20051201 (Red Hat 3.4.5-2) and Ifort 8.1 and the build works fine.
I reckon that I should include some more option in my link. Any ideas?
Thanks very much in advance,
Ingrid
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think ifort 8.1 could work reliably with gcc 4.1, nor could .o files built with gcc-3 work reliably with gcc 4.1. Did you try rebuilding the gcc .o files, using gcc -m32?
Within limits, it is reasonable to build on the oldest of the systems you intend to run on, but there comes a time to upgrade. In any case, you need a consistent set of tools on the build system. For running on x86_64, it's usually advantageous to use the ifort intel64 and the default 64-bit gcc.
Even binutils 2.17.5, which is supported in some current linux versions, is old enough (over 3 years, according to your post) to have some difficulties with current releases of gcc and ifort, but this may not be a factor if you don't use any components less than 3 years old.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ingrid,
I came across this recently and was able to resolve the reference to __gcc_personality_v0 but adding -lstdc++ to the ifort command that linked the final executable.
Regards,
Steve D.
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very Tim and Steve for your inputs. I moved on by using intel 9.1 which corresponds to our current compilation level. As I still have to support older versions of my program, I'll still keep an eye on this and post something as soon as I found a workaround. Thanks again,
Regards,
Ingrid

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page