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

Bizarre response from compilation of fortran code.

Paul_B_
Beginner
559 Views

Hi, 

I am receiving an error upon attempting to compile a fortran test code: "ld: library not found for -lgcc_s". I cannot seem to find any information on this particular issue. Any help regarding this peculiar error will be greatly appreciated. Thanks! :-D

0 Kudos
3 Replies
Martyn_C_Intel
Employee
559 Views

The Intel C and Fortran compilers both make use of the gcc runtime libraries (glibc).

libgcc_s.so is typically there in /usr/lib or /usr/lib64, according to whether you need the 32 bit or 64 bit version. There's no static version. What OS are you running, and what gcc versions do you have installed?

0 Kudos
Paul_B_
Beginner
559 Views

Mr. Corden, 

Thank you for the quick reply. I am running OS X Yosemite version 10.10.1 with gcc version 4.2.1 x86_64-apple-darwin14.0.0 as provided by Apple. 

0 Kudos
Martyn_C_Intel
Employee
559 Views

Ahhh!   My previous response assumed Linux.

Apple no longer distributes gcc (since OS X 10.9), only its clang compiler. What was the source of your gcc version 4.2.1?  The Intel compiler that supports OS X 10.10 is version 15, update 1 (15.0.1.108). It does not link to gcc libraries, but to clang libraries.

Which Intel compiler are you using? Are you linking to libraries built with significantly older compilers?

If possible, try to build your whole application using the latest Intel compiler, which supports OS X 10.10  (available from https://www.registrationcenter.intel.com if you have an up-to-date subscription). Whilst you should be able to find a libgcc_s.dylib if you have obtained gcc from other sources, I can't predict what other compatibility issues you might encounter.

0 Kudos
Reply