[CMake] Problems/bugs with intel compilers and CMAKE_OSX_{ARCHITECTURES, DEPLOYMENT_TARGET}

Zaak Beekman zbeekman at gmail.com
Mon Aug 5 17:48:22 EDT 2013


Hi,
I'm not sure if I should submit a bug report about this or not, but there
are two issues with building distributable binaries with the Intel
compilers on Mac OS X.


   1. I think that '-Wl,-macosx_version_min,${CMAKE_OSX_DEPLOYMENT_TARGET}'
   should be added to all the linker flags. Without this, using Unix Makefiles
   as the generator, this flag doesn't get passed to the linker and as a
   result the executable only runs on systems with the same OS as the
   executable was built on. (Possibly newer OSes too, but I haven't tested
   this.) If I build a binary on 10.8 and try to run it on my wife's computer
   without passing this flag, even though CMAKE_OSX_DEPLOYMENT_TARGET is set
   to 10.6, I get the following error: 'Illegal instruction: 4' I have no idea
   whether this issue applies to the XCode generator as well. See
   http://software.intel.com/en-us/articles/running-an-intel-compiled-binary-on-older-mac-os-x-system-gives-dyld-unknown-required-load
   2. While ifort, icc and icpc provide -arch=i386 and -arch=x86_64
   compatibility options (for compatibility with GCC) the prefered flags are
   -m 32 and -m 64 respectively. Furthermore, CMake tries to pass all the
   architecture flags at once to the compilers, whereas to build a universal
   binary with the Intel compilers one must first build the intel 64 and intel
   32 versions separately and then combine them with the lipo tool. See
   http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-mac/GUID-8C316F3A-4F41-4F08-8A94-789BA2CBBA48.htm

Should I submit a bug report? Am I missing something?

Thanks,
Zaak
Izaak Beekman
===================================
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman at princeton.edu

UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman at umiacs.umd.edu
ibeekman at umd.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130805/b6e42b49/attachment.htm>


More information about the CMake mailing list