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

Architecture problem while linking (macos)

snoo
Beginner
631 Views
Hi,

I'm compiling a f90 program in macos (10.4.10). If I use the g95 compiler everything compiles and runs smoothly. When I try ifort, the objects files are created correctly
but the compilation stops with an error while executing

ifort -o MFVneu -O MFVneu.o libSPheno.a

the error message is:

ipo: warning #11021: file format not recognized for /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//crt1.o
ipo: warning #11021: file format not recognized for /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libgcc_s.10.4.dylib
ipo: warning #11021: file format not recognized for /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../..//libSystemStubs.a
ld: unknown architecture specification flag: -arch x86_64
ld: Usage: ld [options] file [...]
make: *** [MFV] Error 1

the ipo stuff is related to the optimization and disappears if I use the -O0 flag.
The ld complaint seems serious. Hopefully it's just some environment variable.

If anybody as an idea on what's the problem I would appreciate some help.

Thanks in advance,
snoo

0 Kudos
2 Replies
Steven_L_Intel1
Employee
631 Views
I'm not a Mac expert, but it looks to me as if you somehow have a mix of 32 and 64-bit paths in use. Are you building for 32 or 64 bits? For more help, please submit an issue to Intel Premier Support.
0 Kudos
snoo
Beginner
631 Views
I solved the problem. I had the wrong gcc installed.
I had then another linking problem that required running
ranlib -c on the library.
0 Kudos
Reply