MantisBT - CMake
View Issue Details
0013798CMakeCMakepublic2012-12-16 00:242013-05-06 09:32
CharlesH 
 
urgentmajoralways
closedsuspended 
MacOS X10.7
CMake 2.8.10.2 
 
0013798: CMake Fails to build makefiles
I was attempting to build Allegro 5 and got this error message:

  It fails with the following output:

   Change Dir: /Users/hardnett/Downloads/allegro/build/CMakeFiles/CMakeTmp

  

  Run Build Command:/usr/bin/make "cmTryCompileExec1015337934/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec1015337934.dir/build.make
  CMakeFiles/cmTryCompileExec1015337934.dir/build

  "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E
  cmake_progress_report
  /Users/hardnett/Downloads/allegro/build/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec1015337934.dir/testCCompiler.c.o

  /usr/bin/gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk -o
  CMakeFiles/cmTryCompileExec1015337934.dir/testCCompiler.c.o -c
  /Users/hardnett/Downloads/allegro/build/CMakeFiles/CMakeTmp/testCCompiler.c


  Linking C executable cmTryCompileExec1015337934

  "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E cmake_link_script
  CMakeFiles/cmTryCompileExec1015337934.dir/link.txt --verbose=1

  /usr/bin/gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk
  -Wl,-search_paths_first -Wl,-headerpad_max_install_names
  CMakeFiles/cmTryCompileExec1015337934.dir/testCCompiler.c.o -o
  cmTryCompileExec1015337934

  ld: library not found for -lcrt1.10.6.o

  collect2: ld returned 1 exit status

  make[1]: *** [cmTryCompileExec1015337934] Error 1

  make: *** [cmTryCompileExec1015337934/fast] Error 2

I then tried a stripped down version of CMakeLists.txt and got the same error:

  /usr/bin/make -f CMakeFiles/cmTryCompileExec4200036634.dir/build.make
  CMakeFiles/cmTryCompileExec4200036634.dir/build

  "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E
  cmake_progress_report
  /Users/hardnett/Downloads/cmake/build/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object
  CMakeFiles/cmTryCompileExec4200036634.dir/testCCompiler.c.o

  /usr/bin/gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk -o
  CMakeFiles/cmTryCompileExec4200036634.dir/testCCompiler.c.o -c
  /Users/hardnett/Downloads/cmake/build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTryCompileExec4200036634

  "/Applications/CMake 2.8-10.app/Contents/bin/cmake" -E cmake_link_script
  CMakeFiles/cmTryCompileExec4200036634.dir/link.txt --verbose=1

  /usr/bin/gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk
  -Wl,-search_paths_first -Wl,-headerpad_max_install_names
  CMakeFiles/cmTryCompileExec4200036634.dir/testCCompiler.c.o -o
  cmTryCompileExec4200036634

  ld: library not found for -lcrt1.10.6.o

  collect2: ld returned 1 exit status

  make[1]: *** [cmTryCompileExec4200036634] Error 1

  make: *** [cmTryCompileExec4200036634/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


-- Configuring incomplete, errors occurred!
You can reproduce this with the attached CMakeLists.txt file and main.c file:

1. unzip into a folder
2. type "cmake ."

or you can:
1. unzip into a folder
2. cd build
3. cmake ..
No tags attached.
zip cmake.zip (11,249) 2012-12-16 00:24
https://public.kitware.com/Bug/file/4595/cmake.zip
Issue History
2012-12-16 00:24CharlesHNew Issue
2012-12-16 00:24CharlesHFile Added: cmake.zip
2012-12-16 00:26CharlesHNote Added: 0031902
2012-12-17 09:35Brad KingNote Added: 0031906
2012-12-17 09:35Brad KingStatusnew => resolved
2012-12-17 09:35Brad KingResolutionopen => suspended
2013-05-06 09:32Robert MaynardNote Added: 0032987
2013-05-06 09:32Robert MaynardStatusresolved => closed

Notes
(0031902)
CharlesH   
2012-12-16 00:26   
I am using Xcode 4.5
(0031906)
Brad King   
2012-12-17 09:35   
CMake is extensively tested on many platforms including OS X. It is known to work with Xcode 4.5 both for Makefile generation and Xcode IDE projects. The sample project has nothing special and is easily covered by the standard test suite. There must be something about your local system configuration, environment, and command line. Please post on the mailing list to ask for help:

 http://www.cmake.org/mailman/listinfo/cmake [^]

(0032987)
Robert Maynard   
2013-05-06 09:32   
Closing resolved issues that have not been updated in more than 4 months.