cmake . makes a Makefile but it does nothing

Discuss any Chipmunk bugs here.
Post Reply
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

cmake . makes a Makefile but it does nothing

Post 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
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

Re: cmake . makes a Makefile but it does nothing

Post by RDX »

Seriously? This is the support for this software? Nothing at all? Wow
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cmake . makes a Makefile but it does nothing

Post by slembcke »

I tried reproducing the problem the other day but couldn't. Not sure what else to say at the moment.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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.
Last edited by RDX on Tue Nov 24, 2015 7:34 am, edited 1 time in total.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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)
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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.
Last edited by RDX on Tue Nov 24, 2015 7:35 am, edited 1 time in total.
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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)

^
RDX
Posts: 6
Joined: Wed Nov 18, 2015 11:21 am
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: cmake . makes a Makefile but it does nothing

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests