MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0011844 | CMake | CMake | public | 2011-02-11 05:14 | 2011-11-11 10:45 |
Reporter | Matthew Bentham | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 |
Product Version | CMake 2.8.3 | ||||
Target Version | CMake 2.8.5 | Fixed in Version | CMake 2.8.5 | ||
Summary | 0011844: Xcode universal binary build interacts badly with Xcode depends helper | ||||
Description | CMake Xcode projects contain rules to delete out-of-date files during the build. When building more than one architecture, the rules are incorrect and, depending on timing and number of Xcode processes, delete up-to-date files as well, which causes build failures as Xcode tries to use them as inputs into later build stages. Xcode reports errors similar to this: CreateUniversalBinary Debug/prog4 normal "i386 x86_64" cd /Users/mjb67local/Documents/foo/xcode-depends-bug /usr/bin/lipo -create /Users/mjb67local/Documents/foo/xcode-depends-bug/test_xcode_depends.build/Debug/prog4.build/Objects-normal/i386/prog4 /Users/mjb67local/Documents/foo/xcode-depends-bug/test_xcode_depends.build/Debug/prog4.build/Objects-normal/x86_64/prog4 -output /Users/mjb67local/Documents/foo/xcode-depends-bug/Debug/prog4 /usr/bin/lipo: can't open input file: /Users/mjb67local/Documents/foo/xcode-depends-bug/test_xcode_depends.build/Debug/prog4.build/Objects-normal/i386/prog4 (No such file or directory) Command /usr/bin/lipo failed with exit code 1 It seems that the XCODE_DEPENDS_HELPER.make script contains rules like this: /Users/mjb67local/Documents/foo/xcode-depends-bug/RelWithDebInfo/prog4: /bin/rm -f /Users/mjb67local/Documents/foo/xcode-depends-bug/RelWithDebInfo/prog4 /bin/rm -f /Users/mjb67local/Documents/foo/xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/i386/prog4 /bin/rm -f /Users/mjb67local/Documents/foo/xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/x86_64/prog4 Which will delete both architecture-specific files during an Xcode IDE build (or an xcodebuild -parllelizeTargets build) if lipo has not yet written to the universal binary file. | ||||
Steps To Reproduce | This CMakeLists file: cmake_minimum_required(VERSION 2.8) project("test_xcode_depends") set(CMAKE_OSX_ARCHITECTURES "i386;x86_64") add_executable("prog1" foo1.c) add_executable("prog2" foo1.c) add_executable("prog3" foo1.c) add_executable("prog4" foo1.c) add_executable("prog5" foo1.c) add_executable("prog6" foo1.c) With commands: cmake -G Xcode cmake --build . --clean-first -- -parallelizeTargets Will produce the error pretty reliably. On machines with lots of cores a larger number of independent targets might be necessary. Basically the error occurs when the post-build steps of one of the targets gets run during the compilation steps of one of the other targets. | ||||
Additional Information | I suspect it would be fixed if XCODE_DEPENDS_HELPER.make looked something like this instead: xcode-depends-bug/RelWithDebInfo/prog4: xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/i386/prog4 xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/x86_64/prog4 /bin/rm -f xcode-depends-bug/RelWithDebInfo/prog4 xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/i386/prog4: /bin/rm -f xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/i386/prog4 xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/x86_64/prog4: /bin/rm -f xcode-depends-bug/test_xcode_depends.build/RelWithDebInfo/prog4.build/Objects-normal/x86_64/prog4 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | xcode-depends-bug.zip (750) 2011-02-11 05:14 https://public.kitware.com/Bug/file/3691/xcode-depends-bug.zip | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-02-11 05:14 | Matthew Bentham | New Issue | |||
2011-02-11 05:14 | Matthew Bentham | File Added: xcode-depends-bug.zip | |||
2011-02-11 06:31 | Johan Björk | Note Added: 0025389 | |||
2011-04-14 14:38 | David Cole | Assigned To | => David Cole | ||
2011-04-14 14:38 | David Cole | Status | new => assigned | ||
2011-04-14 14:38 | David Cole | Target Version | => CMake 2.8.5 | ||
2011-06-06 16:19 | Brad King | Note Added: 0026680 | |||
2011-06-06 18:06 | Brad King | Assigned To | David Cole => Brad King | ||
2011-06-06 18:06 | Brad King | Note Added: 0026681 | |||
2011-06-07 08:20 | Brad King | Status | assigned => resolved | ||
2011-06-07 08:20 | Brad King | Fixed in Version | => CMake 2.8.5 | ||
2011-06-07 08:20 | Brad King | Resolution | open => fixed | ||
2011-11-11 10:45 | David Cole | Note Added: 0027763 | |||
2011-11-11 10:45 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|