Buck417 / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

cmake fails to build makefile because of missing source in sourcetree #332

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. checkout source code of v2.3.1 from svn
2. run "cmake ." in v2.3.1/Box2D
3. See it fail

What is the expected output? What do you see instead?

cmake should generate a functional makefile for make to build the project

What version of the product are you using? On what operating system?

v2.3.1 Fedora 20 x86_64, with glui-devel and freeglut-devel installed.

Please provide any additional information below.

The build fails because it depends on having source code in the source tree 
which isn't part of the project -- this includes freeglut, glui and 
Framework/Render.cpp (at least).

Original issue reported on code.google.com by frederik...@gmail.com on 6 Apr 2014 at 6:29

GoogleCodeExporter commented 8 years ago
Running cmake on Box2D with no modifications provide the following output:

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - 
found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so  
CMake Error at CMakeLists.txt:29 (add_subdirectory):
  add_subdirectory given source "freeglut" which is not an existing
  directory.

CMake Error at CMakeLists.txt:30 (add_subdirectory):
  add_subdirectory given source "glui" which is not an existing directory.

-- Configuring incomplete, errors occurred!
See also "/home/frederik/v2.3.1/CMakeFiles/CMakeOutput.log".

After having removed the add_subdiretory entries in CMakeLists.txt for glui and 
freeglut, running cmake on Box2D, it outputs the following:
-- Configuring done
CMake Error at Testbed/CMakeLists.txt:80 (add_executable):
  Cannot find source file:

    Framework/Render.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

-- Build files have been written to: /home/frederik/v2.3.1/Box2D

Original comment by frederik...@gmail.com on 6 Apr 2014 at 6:31

GoogleCodeExporter commented 8 years ago
I'm not supporting CMake anymore. Would you be willing to provide a patch?

Original comment by erinca...@gmail.com on 9 Apr 2014 at 4:59

GoogleCodeExporter commented 8 years ago
I'm having the same trouble. Fresh svn checkout of 2.3.1, running cmake in the 
build directory:

-- The CXX compiler identification is Clang 5.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
CMake Error at CMakeLists.txt:29 (add_subdirectory):
  add_subdirectory given source "freeglut" which is not an existing
  directory.

CMake Error at CMakeLists.txt:30 (add_subdirectory):
  add_subdirectory given source "glui" which is not an existing directory.

-- Configuring incomplete, errors occurred!
See also 
"/Users/botsko/Downloads/v2.3.1/Box2d/Build/CMakeFiles/CMakeOutput.log".

If cmake isn't supported anymore, how are we supposed to build the files? 

I tried adding the box2d files to my project anyway and xcode errors out with 
dozens of language syntax errors: 
http://box2d.org/forum/viewtopic.php?f=7&t=9762

Original comment by bot...@gmail.com on 16 May 2014 at 6:27