Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28651 Discussions

Incompatibility error compiling intel fortron on Ubuntu

fallschirmjaeger
Beginner
538 Views
Dear All

I have installed Intel Fortran 2011 for Linux and installed all necessary libraries and also made entries in .bashrc

yet I get these error messages when I compile my fortran code

ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libm.so when searching for -lm
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libm.a when searching for -lm
ld: skipping incompatible /usr/lib//libm.so when searching for -lm
ld: skipping incompatible /usr/lib//libm.a when searching for -lm
ld: skipping incompatible //usr/lib/libm.so when searching for -lm
ld: skipping incompatible //usr/lib/libm.a when searching for -lm
ld: cannot find -lm
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libc.so when searching for -lc
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libc.a when searching for -lc
ld: skipping incompatible /usr/lib//libc.so when searching for -lc
ld: skipping incompatible /usr/lib//libc.a when searching for -lc
ld: skipping incompatible //usr/lib/libc.so when searching for -lc
ld: skipping incompatible //usr/lib/libc.a when searching for -lc
ld: cannot find -lc
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5//libgcc_s.so when searching for -lgcc_s
ld: cannot find -lgcc_s
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5//libgcc.a when searching for -lgcc
ld: cannot find -lgcc
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libdl.so when searching for -ldl
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libdl.a when searching for -ldl
ld: skipping incompatible /usr/lib//libdl.so when searching for -ldl
ld: skipping incompatible /usr/lib//libdl.a when searching for -ldl
ld: skipping incompatible //usr/lib/libdl.so when searching for -ldl
ld: skipping incompatible //usr/lib/libdl.a when searching for -ldl
ld: cannot find -ldl
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libc.so when searching for -lc
ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../..//libc.a when searching for -lc
ld: skipping incompatible /usr/lib//libc.so when searching for -lc
ld: skipping incompatible /usr/lib//libc.a when searching for -lc
ld: skipping incompatible //usr/lib/libc.so when searching for -lc
ld: skipping incompatible //usr/lib/libc.a when searching for -lc
ld: cannot find -lc

Could anybody kindly help me fix this problem as I urgently need to compile this project.
0 Kudos
3 Replies
mecej4
Honored Contributor III
538 Views
Is your OS 32-bit or 64-bit? Are you running the 32-bit compiler or the 64-bit compiler? I suspect that you are trying to do a 64-bit compile but the paths are set such that only the 32-bit libraries are being seen, each twice; for example, libc.so is read twice and libc.a is also read twice..

To troubleshoot, try compiling and running a short C program to produce a 32-bit a.out, then a 64-bit a.out (if applicable). Until you can do this step without seeing errors, there is no point trying to run the Intel Fortran compiler.

Ascertain the type of the shared libraries being read from /usr/lib by using the file command on them.
0 Kudos
fallschirmjaeger
Beginner
538 Views
Thank you for your immediate feedback. I am running a 32bit compiler and installed lstdc++5 too. I will try to recheck on the points you mentioned.
0 Kudos
fallschirmjaeger
Beginner
538 Views
Thank you... i panicked as I was on a deadline and had to fix this issue. I tried this on a 32 bit machine and installed the 32/i86-64 bit combined intel fortran package. somewhere it didn't recognise the 32 bit library files i guess. I removed the whole thing and while reinstalling downloaded only ia32 package. Have followed the same installation procedure and set the environment variables too and it works great. Thanks for hinting the possible error.
0 Kudos
Reply