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 have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

ifc 8.1 on Opteron (RH FC2)

mqk
Beginner
1,160 Views
Is it possible to use the version 8.1 Fortran and C++ compilers on a 64bit Opteron system?

I'm having a problem similar to what was described in the past
"ifc with SuSE 8.2 64bits" thread, however the solution described there doesn't work for me.


$ ifort -c hello_world.f

$ ifort -v hello_world.o -o hello_world
Version 8.1
ld /usr/lib/crt1.o /usr/lib/crti.o /usr/local/intel/intel_fc_80/lib/crtxi.o
-dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o hello_world
/usr/local/intel/intel_fc_80/lib/for_main.o hello_world.o -Qy
-L/usr/local/intel/intel_fc_80/lib -L/usr/lib -Bstatic -lifport -lifcore -limf
-Bdynamic -lm -lcxa -Bstatic -lirc -Bdynamic -lunwind -lc -Bstatic -lirc_s
/usr/local/intel/intel_fc_80/lib/crtxn.o /usr/lib/crtn.o
ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
ld: skipping incompatible /usr/lib64/libm.a when searching for -lm
ld: cannot find -lm


Note that the "-m elf_i386" was automatically passed to the linker, no need to specify it with -Wl.

Here's what I tried so far:

I have on my system a file called /lib/libm.so.6, which is a symlink to /lib/libm-2.3.3.so.
When I created a link to this file at /usr/lib/libm.so, the above error message was
replaced with a complaint about "incompatible /usr/lib64/libc.so". So then I created a
symlink from /lib/libc.so.6 to /usr/lib/libc.so, but then I get the following error:


ld: /usr/lib/crtn.o: No such file: No such file or directory


Creating a symlink from /usr/lib64/crtn.o to /usr/lib/crtn.o caused these errors:


ld: warning: i386:x86-64 architecture of input file `/usr/lib/crt1.o' is
incompatible with i386 output
ld: warning: i386:x86-64 architecture of input file `/usr/lib/crti.o' is
incompatible with i386 output
ld: warning: i386:x86-64 architecture of input file `/usr/lib/crtn.o' is
incompatible with i386 output
/usr/lib/crt1.o(.text+0x13): In function `_start':
: undefined reference to `__libc_csu_fini'
/usr/lib/crt1.o(.text+0x1a): In function `_start':
: undefined reference to `__libc_csu_init'


At this point I gave up. :(


Here's info about my set-up, a fedora core 2 box:


$ uname -a
Linux habanero.ucolick.org 2.6.8-1.521smp #1 SMP Mon Aug 16 09:32:47
EDT 2004 x86_64 x86_64 x86_64 GNU/Linux

$ ifort -V
Intel Fortran Compiler for 32-bit applications, Version 8.1
Build 20040803Z Package ID: l_fc_p_8.1.018
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.


Thanks for any help you might have.

mike
0 Kudos
2 Replies
TimP
Honored Contributor III
1,160 Views
Did you verify that you have a working 32-bit gcc installation, by running something compiled by gcc -m32? I haven't seen FC2 installation, but with EL3 there are "legacy" and compatibility compilers and libraries which have the required 32-bit support required by the Intel 32-bit compilers. If you use the 64-bit compilers, you won't need the 32-bit support.
0 Kudos
mqk
Beginner
1,160 Views
Hey thanks for pointing me in the right direction!

It turned out I indeed did not have a working 32-bit gcc installation. This was remedied by installing glibc-devel.i386.
Now I have all the required libraries for "gcc -m32" to work, and icc/ifort also work now.
0 Kudos
Reply