View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011627 | CMake | CMake | public | 2010-12-18 10:57 | 2011-01-18 11:39 | ||||
Reporter | Christian Convey | ||||||||
Assigned To | Brad King | ||||||||
Priority | high | Severity | block | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Apple Mac | OS | OS X | OS Version | 10.5 | ||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011627: Wrong target-architecture flags for stock version of gfortran on OS X | ||||||||
Description | I set CMAKE_OSX_ARCHITECTURES to "x86_64", because I want to produce a 64-bit executable. When I do this, gfortran ends up being invoked with "-arch x86_64", which isn't valid for the compiler. There are some OS X fortran compilers for which "-arch" *is* appropriate. Apparently Apple used to maintain a port of gfortran for which that flag was valid, but they seem to not do that any longer. "-arch" is also valid for the Intel fortran compiler on OS X. The problem is that the stock GCC fortran compiler does not support "-arch". Here's what a gfortran developer told me: "The GCC option for specifying an architecture is of the form '-march=XYZ' where you can a complete list of XYZ in the GCC manual. http://gcc.gnu.org/onlinedocs/gcc-4.5.1/gcc/ [^] " | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0024278) Brad King (manager) 2010-12-20 08:48 edited on: 2010-12-20 08:49 |
CMAKE_OSX_ARCHITECTURES is meant for building universal binaries, typically with multiple architectures listed. The "-arch" flag is documented by Apple's port of GCC. Most importantly the "-arch" flag can be repeated multiple times on the same command line and the compiler target all the specified architectures to build a universal binary. AFAIK Apple has halted work on GCC and ports of it in favor of their new llvm/clang effort. How does the GNU upstream gcc build universal binaries? The solution to your original problem is to set CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 in your environment before running CMake. Don't use CMAKE_OSX_ARCHITECTURES unless you want universal binaries and have a toolchain capable of building them. |
(0024867) David Cole (manager) 2011-01-18 11:27 |
So, then... based on the report and the note 0011627:0024278 is this an issue at all? Seems like this one should be resolved as "no change required" because this is the expected behavior here. Any problems with that resolution? |
(0024870) Brad King (manager) 2011-01-18 11:39 |
This is not a CMake issue. Christian, if you have further questions please post to the mailing list for help: http://www.cmake.org/mailman/listinfo/cmake [^] Thanks. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-12-18 10:57 | Christian Convey | New Issue | |
2010-12-20 08:48 | Brad King | Note Added: 0024278 | |
2010-12-20 08:49 | Brad King | Note Edited: 0024278 | |
2010-12-20 08:50 | Brad King | Assigned To | => Brad King |
2010-12-20 08:50 | Brad King | Status | new => feedback |
2011-01-18 11:27 | David Cole | Note Added: 0024867 | |
2011-01-18 11:39 | Brad King | Note Added: 0024870 | |
2011-01-18 11:39 | Brad King | Status | feedback => closed |
2011-01-18 11:39 | Brad King | Resolution | open => no change required |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |