Hello everyone,

I’m using cmake 3.3.1 on Mac 10.10.4. I’m building an executable target on Mac 
with the following settings:

  CMAKE_OSX_ARCHITECTURES = i386;x86_64
  CMAKE_OSX_DEPLOYMENT_TARGET = 10.5
  CMAKE_OSX_SYSROOT = .../MacOSX10.10.sdk

Right after build, executable is runnable (from inside the binary dir) and 
everything’s fine. But once I do `make install`, the executable in the install 
prefix starts giving out errors:

  % otool -L /install/prefix/myexecutable
  ...
  Inconsistent sizeofcmds

Adding INSTALL_RPATH target property (the executable depends on a number of 
shared libraries) results in another error during `make install`, although the 
command isn’t failing:

  % make install
  ...
  -- Installing: /tmp/prefix/usr/local/rmmagent/rmmagentd
  .../install_name_tool: for architecture x86_64 object: 
/install/prefix/myexecutable malformed object (inconsistent sizeofcmds field in 
mach header)
  ...

What helps is either a) setting BUILD_WITH_INSTALL_RPATH target property to ON 
(with obvious inconvenience while debugging) or b) making the executable 
non-fat (i.e. setting architecture to either i386 or x86_64, but not both; 
which is not what I want in the end).

Is this a defect in cmake? Is there anything I can do to work this around?

Regards,
Mike

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to