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

linking error

stefanke
Beginner
579 Views
I am trying to create a fortran library using the Intel Fortran Compiler (9.0)

The compilation runs fine but at the linking stage the following error shows up:

.../gcc-4.1.0/bin/ld: /usr/tmp/gcc-4.1.0/lib/gcc/i686-pc-linux-gnu/4.1.0/crtbegin.o: No such file: No such file or directory

The missing file is located in "/home/me/gcc-4.1.0/lib/gcc/i686-pc-linux-gnu/4.1.0/crtbegin.o: No such file: No such file or directory" and not in "/usr/tmp/...".

- So why does the linker needs this file?
- Why does the linker search in the wrong directory?

Any hints how to fix the problem are very appreciated.

Cheers,
Stefan


0 Kudos
1 Reply
TimP
Honored Contributor III
579 Views
Intel linux 9.x compilers assume that you have a working copy of gcc on PATH when you compile. This copy of gcc is consulted (gcc -print-search-dirs) to find the libraries required. gcc does it this way in order to be able to coexist with other compilers. So, you would need to make these files appear in one of the directories which gcc searches. It seems a poor idea to set up gcc so that it expects to find libraries in /usr/tmp, unless you will be doing all your work prior to the next cleanup on your system. If this is not the copy of gcc you meant to be compatible with, fix PATH so that the correct one is in use.
0 Kudos
Reply