View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014836 | CMake | CMake | public | 2014-03-25 13:10 | 2014-10-06 10:33 | ||||
Reporter | Michael Priestman | ||||||||
Assigned To | |||||||||
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.12 | ||||||||
Target Version | CMake 2.8.12.2 | Fixed in Version | CMake 2.8.12.2 | ||||||
Summary | 0014836: find_package(Threads) fails on Mac OS X with Xcode 5.1. | ||||||||
Description | When CMake tries to find the threading libraries using find_package(Threads), it will fail on Mac OS X and Xcode 5.1. It works fine with Xcode 5.0. | ||||||||
Steps To Reproduce | To reproduce, put the following in a basic CMakeLists.txt file: --- Begin CMakeLists.txt --- cmake_minimum_required(VERSION 2.8) project(Test) find_package(Threads REQUIRED) --- End CMakeLists.txt --- then run: cmake -G "Xcode" You get the following output: -- The C compiler identification is Clang 5.1.0 -- The CXX compiler identification is Clang 5.1.0 -- Looking for include file pthread.h CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:2 (PROJECT) CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Looking for include file pthread.h - not found CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindThreads.cmake:166 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred! | ||||||||
Additional Information | This was working fine for us up until we upgraded to Xcode 5.1. Could it be just looking in the wrong place for pthread.h? The strange thing is that if you just create a basic C file that includes <pthread.h>, it compiles fine in Xcode, so just sure what is going wrong here. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | CMakeTryCompileError.zip [^] (49,291 bytes) 2014-03-25 16:31 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0035507) Rolf Eike Beer (developer) 2014-03-25 15:12 |
I suspect that this is a deeper problem. Please put this in a CMakeLists.txt, run it with cmake --debug-trycompile and attach the whole build folder here: cmake_minimum_required(VERSION 2.8) include (CheckIncludeFiles) CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H) |
(0035511) Michael Priestman (reporter) 2014-03-25 16:32 |
Please find the output from the command attached to the bug. The CMake console output was: [priestm@shfc02h60mwdhjq build]$ cmake -G "Xcode" --debug-trycompile .. debug trycompile on -- The C compiler identification is Clang 5.1.0 -- The CXX compiler identification is Clang 5.1.0 -- Looking for include file pthread.h CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): CMakeLists.txt:2 (PROJECT) CMake Error: Internal CMake error, TryCompile configure of cmake failed -- Looking for include file pthread.h - not found -- Configuring incomplete, errors occurred! See also "/users/priestm/Git/temp/build/CMakeFiles/CMakeOutput.log". See also "/users/priestm/Git/temp/build/CMakeFiles/CMakeError.log". |
(0035520) Brad King (manager) 2014-03-26 08:49 |
Are you using CMake 2.8.12.2? It had this fix for Xcode 5.1 since 2.8.12.1: CMakeDetermineCompilerId: Fix compiler line match for Xcode 5.1 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65ee85d0 [^] |
(0035521) Michael Priestman (reporter) 2014-03-26 08:58 |
Ahh, no, I was using 2.8.12. Just upgraded to latest version, and all appears well. Cheers Brad. You can mark this bug as fixed. |
(0036955) Robert Maynard (manager) 2014-10-06 10:33 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-03-25 13:10 | Michael Priestman | New Issue | |
2014-03-25 15:12 | Rolf Eike Beer | Note Added: 0035507 | |
2014-03-25 16:31 | Michael Priestman | File Added: CMakeTryCompileError.zip | |
2014-03-25 16:32 | Michael Priestman | Note Added: 0035511 | |
2014-03-26 08:49 | Brad King | Note Added: 0035520 | |
2014-03-26 08:51 | Brad King | Relationship added | related to 0014635 |
2014-03-26 08:58 | Michael Priestman | Note Added: 0035521 | |
2014-03-26 09:41 | Rolf Eike Beer | Status | new => resolved |
2014-03-26 09:41 | Rolf Eike Beer | Resolution | open => fixed |
2014-03-26 09:41 | Rolf Eike Beer | Fixed in Version | => CMake 2.8.12.2 |
2014-03-26 09:41 | Rolf Eike Beer | Target Version | => CMake 2.8.12.2 |
2014-10-06 10:33 | Robert Maynard | Note Added: 0036955 | |
2014-10-06 10:33 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |