Page 1 of 1

cmake . makes a Makefile but it does nothing

PostPosted: Wed Nov 18, 2015 11:41 am
by RDX
This is too simple to be happening. The docs page says just do this:
cmake -D CMAKE_BUILD_TYPE=Debug .
make


Okay, cmake runs and makes a Makefile but when I run it, nothing gets done, no compiling, just nothing at all.
I tried adding -G "Unix Makefiles" but I see no difference. I don't normally use cmake so I am stuck.

cmake vewrsion 2.8.12
gcc version 4.8.2
Linux Slackware64 vers. 14.1

Re: cmake . makes a Makefile but it does nothing

PostPosted: Fri Nov 20, 2015 4:29 pm
by RDX
Seriously? This is the support for this software? Nothing at all? Wow

Re: cmake . makes a Makefile but it does nothing

PostPosted: Sat Nov 21, 2015 12:24 pm
by slembcke
I tried reproducing the problem the other day but couldn't. Not sure what else to say at the moment.

Re: cmake . makes a Makefile but it does nothing

PostPosted: Sun Nov 22, 2015 2:15 pm
by RDX
slembcke wrote:I tried reproducing the problem the other day but couldn't. Not sure what else to say at the moment.


Okay, what can I do to help? I will go back and start over and see if it makes a diff.
I just downloaded "ChipmunkLatest.tgz" from "http://chipmunk-physics.net/downloads.php".
next I will tar -xf ChipmunkLatest.tgz ... I got a directory called Chipmunk-7.0.1 .
cd to it ... now cmake . and here's something ...
CMake Error at CMakeLists.txt:3 (cmake_policy):
Policy "CMP0042" is not known to this version of CMake.

... finding a bunch of stuff ...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLFW_INCLUDE_DIR
used as include directory in directory .../Chipmunk-7.0.1/demo
GLFW_LIBRARIES
linked by target "chipmunk_demos" in directory .../Chipmunk-7.0.1/demo

... and this time no Makefile. Hope that helps.

Re: cmake . makes a Makefile but it does nothing

PostPosted: Mon Nov 23, 2015 1:14 pm
by slembcke
I can look into the policy thing. You can comment it out on Linux, it's an OS X build rule. I'll have to double check the cmake version I have on my linux VM. Maybe the policy was removed or something?

As for GLFW, you'll need to install that if you want to build the demos. (The lib itself doesn't need it though)

Re: cmake . makes a Makefile but it does nothing

PostPosted: Mon Nov 23, 2015 11:35 pm
by RDX
Okay, I think I have it. I commented out line 3 (the policy thing) and the last 3 lines (the demo thing) and ran
cmake -D CMAKE_INSTALL_PREFIX=/usr/local .
... it responded with ...
Configuring Chipmunk2D version 7.0.1
-- Configuring done
-- Generating done
-- Build files have been written to: .../Chipmunk-7.0.1

... then I ran make and it appears to have built the libraries (static and dynamic).
I haven't tried anything out yet but that is definitely progress. Thanks.

Re: cmake . makes a Makefile but it does nothing

PostPosted: Tue Nov 24, 2015 12:12 am
by RDX
Ok, seems I also have to run make install. I'd really like to see all this in a README. Next I turn to demos.
cd demos ; cmake -D GLFW_INCLUDE_DIR=/usr/local/include -D GLFW_LIBRARIES=../src/libchipmunk.so .
... gets some complaining but it makes the Makefile.
make ... reveals another problem ...
.../Chipmunk-7.0.1/demo/Shatter.c:87:2: error: 'for' loop initial declarations are only allowed in C99 mode
for(int j=0, i=count-1; j<count; i=j, j++){
^

... I get a lot of these errors, my gcc does not like the declaration of j there.
... It also doesn't like ...
.../demo/Shatter.c:87:15: error: 'i' redeclared as different kind of symbol
for(int j=0, i=count-1; j<count; i=j, j++){
^
.../demo/Shatter.c:71:45: note: previous definition of 'i' was here
ClipCell(cpShape *shape, cpVect center, int i, int j, struct WorleyContex *context, cpVect *verts, cpVect *clipped, int count)

^

Re: cmake . makes a Makefile but it does nothing

PostPosted: Wed Nov 25, 2015 7:03 am
by RDX
Okay, never mind. It appears that the level of difficulty in getting something to work exceeds the effort I am willing to devote to it. I found pymunk while playing with pygames and I thought chipmunk would be fun but I really don't have an immediate use for it, I was just curious. From pymunk I get the idea that it is really impressive but the game I have in mind has less kinematics and more AI.

Re: cmake . makes a Makefile but it does nothing

PostPosted: Wed Nov 25, 2015 1:04 pm
by slembcke
Sorry. Not sure what to tell you. I installed a brand new Debian VM and wasn't able to reproduce the errors. Without being able to replicate your build environment I'm not sure how to fix it.