MantisBT - CMake
View Issue Details
0008272CMakeCMakepublic2008-12-09 17:372016-06-10 14:30
Hartmut Seichter 
Bill Hoffman 
normalmajoralways
closedmoved 
CMake-2-6 
 
0008272: CMake 2.6.3 RC5 breaks on Mac OS X
This might be two things

- Makefile and Xcode generator do not honour CMAKE_OSX_ARCHITECTURES, thus setting it to i386 or ppc will always end up

"Undefined symbols for architecture i386:
  "_main", referenced from:
      __start in crt1.o
"
for setting to ppc or vice versa

- similar compiling libraries it seems that twice an architecture is build - lipo complains that both temporary versions are of the same architecture (here i386)




- Mac OS X 10.5.5 on a MBP
- Xcode / Developer Tools with iPhone support v 3.1.2

No tags attached.
has duplicate 0007917closed Miguel Figueroa CMake 2.6.2 generating Xcode project with wxWidgets depency does not work 
Issue History
2008-12-09 17:37Hartmut SeichterNew Issue
2008-12-09 21:20Bill HoffmanNote Added: 0014316
2008-12-09 21:20Bill HoffmanStatusnew => assigned
2008-12-09 21:20Bill HoffmanAssigned To => Bill Hoffman
2008-12-10 15:56Hartmut SeichterNote Added: 0014328
2008-12-29 06:12Hartmut SeichterNote Added: 0014447
2008-12-29 06:13Hartmut SeichterNote Edited: 0014447
2008-12-29 06:15Hartmut SeichterNote Edited: 0014447
2009-01-02 23:53Miguel FigueroaRelationship addedhas duplicate 0007917
2016-06-10 14:27Kitware RobotNote Added: 0041481
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0014316)
Bill Hoffman   
2008-12-09 21:20   
Did this work with 2.6.2? If the answer is yes, please provide the exact commands that work in 2.6.2 and do not work in 2.6.3.

Thanks.
(0014328)
Hartmut Seichter   
2008-12-10 15:56   
I just checked - it seems this is more related to some problems in the FindwxWidgets.cmake handling of universal builds (somehow all my current projects relate to wxWidgets). Plain C/C++ programs work fine. It seems that wx-config is pulling in a few compiler settings that are upsetting the way cmake sets up the build. It should be possible to compile/link i386 even if wxWidgets is universal (i386;ppc).

I need to investigate this in more detail. Thus, I would suggest to close this report as non-issue - sorry for the noise.
(0014447)
Hartmut Seichter   
2008-12-29 06:12   
(edited on: 2008-12-29 06:15)
Found the actual problem: FindwxWidgets copies the -arch flags from wxconfig when creating the Xcode projects. AFAICS Xcode does not accept these. The following snippet demonstrates a workaround.

set(Apple_wxWidgets_LIBRARIES)
    foreach(LIB ${wxWidgets_LIBRARIES})
        #message(STATUS "Checking ${LIB}")
        if(${LIB} MATCHES "-arch")
            message(STATUS "Skipping ${LIB}")
        else()
            #message(STATUS "Added ${LIB}")
            list(APPEND Apple_wxWidgets_LIBRARIES ${LIB})
        endif()
    endforeach()
    
    set(wxWidgets_LIBRARIES ${Apple_wxWidgets_LIBRARIES})


Thus, I think this issue is the same as in Issue 0007917

(0041481)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.