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

ld: library not found for -lgcc_s

donald-s-dunbar
初學者
1,556 檢視
I am trying to useintel64/ifort (vs. 11.0) to compile Fortran code under Mac Os 10.5.8. For any attempted compile and link I get the message:

"ld: library not found for -lgcc_s."

There is no C code involved so I'm not sure why gcc pops up. I've made certain to run "ifortvars.csh intel64" before the compile and the error occurs whether or not the options include "-L/usr/lib -lgcc." I've had no issues like this using the 32 bit compiler but would now like to try using the 64 bit compiler.

Any suggestions?

- Don
0 積分
6 回應
Ron_Green
主席
1,556 檢視
Quoting - donald-s-dunbar
I am trying to useintel64/ifort (vs. 11.0) to compile Fortran code under Mac Os 10.5.8. For any attempted compile and link I get the message:

"ld: library not found for -lgcc_s."

There is no C code involved so I'm not sure why gcc pops up. I've made certain to run "ifortvars.csh intel64" before the compile and the error occurs whether or not the options include "-L/usr/lib -lgcc." I've had no issues like this using the 32 bit compiler but would now like to try using the 64 bit compiler.

Any suggestions?

- Don


Which Xcode version do you have? And when you go to the Apple menu, About This Mac, you do have a "Core 2 Duo" and not an older "Core Duo", correct?
donald-s-dunbar
初學者
1,556 檢視


Which Xcode version do you have? And when you go to the Apple menu, About This Mac, you do have a "Core 2 Duo" and not an older "Core Duo", correct?
I'm not using Xcode; I'm compiling the old-fashioned way - using make. I get the same error on both a "Core Duo" (a laptop) and a "2 x 3.2 GHz Quad-core Intel Xeon" (a Mac Pro).
Ron_Green
主席
1,556 檢視
Quoting - donald-s-dunbar
I'm not using Xcode; I'm compiling the old-fashioned way - using make. I get the same error on both a "Core Duo" (a laptop) and a "2 x 3.2 GHz Quad-core Intel Xeon" (a Mac Pro).

I see I didn't explain myself well. The Intel Fortran Compiler for Mac OS X requires a compatible Xcode installation. This is because we use the linker and libraries that are included in Xcode in order to maintain compatibility.

The list of supported Xcode versions for your version of the compiler is listed in the ReleaseNotes document, /opt/intel/Compiler/11.0/0xx/Documentation/ ... etc. You MUST have a compatible Xcode installed. With 11.0 these may be older Xcode versions - it may not work with newer ones so carefully check the ReleaseNotes documentation for the necessary versions of Xcode.

This is why I asked for your Xcode version, not because I assumed you were using Xcode over the command line.

ron
donald-s-dunbar
初學者
1,556 檢視

I see I didn't explain myself well. The Intel Fortran Compiler for Mac OS X requires a compatible Xcode installation. This is because we use the linker and libraries that are included in Xcode in order to maintain compatibility.

The list of supported Xcode versions for your version of the compiler is listed in the ReleaseNotes document, /opt/intel/Compiler/11.0/0xx/Documentation/ ... etc. You MUST have a compatible Xcode installed. With 11.0 these may be older Xcode versions - it may not work with newer ones so carefully check the ReleaseNotes documentation for the necessary versions of Xcode.

This is why I asked for your Xcode version, not because I assumed you were using Xcode over the command line.

ron
I see. My Xcode version is 3.1.1 which is listed under system requirements in ReleaseNotes.pdf for the compiler I'm using: vs. 11.0 (Build 059)
Ron_Green
主席
1,556 檢視
Quoting - donald-s-dunbar
I see. My Xcode version is 3.1.1 which is listed under system requirements in ReleaseNotes.pdf for the compiler I'm using: vs. 11.0 (Build 059)

OK, I'm building up a sandbox with this Mac OS X, Xcode and compiler combo. It might take me several hours to get everything installed.

ron
Ron_Green
主席
1,556 檢視

OK, I'm building up a sandbox with this Mac OS X, Xcode and compiler combo. It might take me several hours to get everything installed.

ron

I can't reproduce what you are seeing. Here is the output on my older Core Duo 32bit system with 10.5.8 and Xcode 3.1.1, Ifort 11.0.059

source /opt/intel/Compiler/11.0/059/bin/ifortvars.sh ia32
ifort -o hello hello.f90
file hello
hello: Mach-O executable i386
./hello
hello

source /opt/intel/Compiler/11.0/059/bin/ifortvars.sh intel64
ifort -o hello hello.f90
file hello
hello: Mach-O executable x86_64
./hello
bash: ./hello: Bad CPU type in executable

the above is expected on a 32bit OS and 32bit processor.

Now, I did install Xcode in the default location, /Developer. We have in the past had issues with non-default installation directories. Is your Xcode in /Developer OR can you symbolically link it to /Developer?

Another thing that might help is if you can show your Makefile. And you invoke the makefile directly, right? In other words, you are not using 'sudo' in any way shape or form.

ron
回覆