- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile a sample program with ifort a I get the error :
ld: unknown architecture specification flag: -arch x86_64
ld: Usage: ld [options] file [...]
The version of gcc that I've installed is gcc 4.0.
Can anybody help me?
Thanks!!!
ld: unknown architecture specification flag: -arch x86_64
ld: Usage: ld [options] file [...]
The version of gcc that I've installed is gcc 4.0.
Can anybody help me?
Thanks!!!
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may be attempting (unintentionally?) to cross compile 64-bit code on a 32-bit system. That is not supported with a stock gnu binutils and library installation, and the resulting code would not run on a 32-bit OS. If you are running a 32-bit OS (the only possibility, if you have a Core, as opposed to Core 2 CPU), you must use the 32-bit ifort.
The message produced by the command "ifort -V" would tell which architecture, e.g. "running on Intel 64" for the 64-bit compiler. The default installation directories are distinguished by /fc/ for 32-bit and /fce/ for 64-bit.
The message produced by the command "ifort -V" would tell which architecture, e.g. "running on Intel 64" for the 64-bit compiler. The default installation directories are distinguished by /fc/ for 32-bit and /fce/ for 64-bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!!
I'm running on Intel 64 architecture, but now I don't have any idea how to change to 32 bit configuration. I would be very pleased if you could help me!!!
Thanks
Jorge
I'm running on Intel 64 architecture, but now I don't have any idea how to change to 32 bit configuration. I would be very pleased if you could help me!!!
Thanks
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even if you have 64-bit hardware, if you have installed a 32-bit OS, you must use 32-bit compilers. If you have 64-bit OS, but haven't installed the corresponding combined 32- and 64-bit gcc/g++ development system, you would need either to change your gcc installation or use the 32-bit Fortran compiler.
Intel Fortran comes in both 32- and 64-bit versions. There should be an installer package available which includes both, as well as separate packages, all working with the same license.
Intel Fortran comes in both 32- and 64-bit versions. There should be an installer package available which includes both, as well as separate packages, all working with the same license.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Mac we don't have separate installers - one installer gets you both 32 and 64-bit. Make sure that you have used the "source" command specifying the "fce" install folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the 32-bit compiler is required, shouldn't the ifortvars be sourced from the fc folder? If there is no 64-bit binutils on the system, shouldn't the installer so indicate when attempting to install?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding is that a 64-bit Mac system has both 32 and 64 bit gcc installed, so everything should be there. You can use the source command to specify the /fc/ folder to get the 32-bit compiler, or, I think, you can use -m32 to specify the 32-bit compiler. I'll admit that I have never done this on a Mac so I am not sure of the exact details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using the compiling option -m32 was perfect!!! I was able also to change the gcc version, so I can use the 64 bit gcc configuration.
Thank you very much for your help!!!
Jorge Arrieta
Thank you very much for your help!!!
Jorge Arrieta
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page