How to build on Linux (Ubuntu)

Official forum for the Chipmunk2D Physics Library.
Post Reply
cuthbert
Posts: 1
Joined: Sat Jun 05, 2010 6:40 pm
Contact:

How to build on Linux (Ubuntu)

Post by cuthbert »

Hi

I really would like to try out this physics library with the Ruby bindings, however I have one major problem. I never can seem to get Chipmunk installed properly! I gave it a go now again on my fresh Linux Mint 64-bit install (based on Ubuntu), and after some rounds of installing required packages, I finally got the "cmake ." command to perform successfully. However, when trying to follow up with the "make" command, I get a lot of errors which I don't really understand how to tackle.

It would be really nice if you could give some more detailed instructions on how to install Chipmunk on Linux/Ubuntu.

Or alternatively, is there another easier way of getting started with Chipmunk and Ruby without compiling it from scratch (like a pre-compiled gem)?

The last lines of output from my failed make attempt:
/home/chris/Downloads/Chipmunk-5.2.0/src/._cpArbiter.c:1:204: error: invalid suffix "D03E69B4FCB" on integer constant
/home/chris/Downloads/Chipmunk-5.2.0/src/._cpArbiter.c:1:233: warning: null character(s) ignored
make[2]: *** [src/CMakeFiles/chipmunk.dir/._cpArbiter.c.o] Error 1
make[1]: *** [src/CMakeFiles/chipmunk.dir/all] Error 2
make: *** [all] Error 2
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: How to build on Linux (Ubuntu)

Post by slembcke »

Oh weird. It looks like I've spilled some hidden resource fork files into the distribution... I wonder why those were even generated. The quick fix is to delete any of the files starting with "._". I'll have to clean that up though.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
maximinus
Posts: 1
Joined: Tue Jun 08, 2010 9:06 am
Contact:

Re: How to build on Linux (Ubuntu)

Post by maximinus »

I ran into this problem. You can fix by doing the following:

Open a terminal, go to the Chipmunk-5.2.0 directory and enter this command:

find . -type f -name "._*" -exec rm -rvf {} \;

Then we can easily build and test the basic engine with:

cmake .
make
./Demo/chipmunk_demos


This works on Ubuntu 10.04. Hope it helps 8-)
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: How to build on Linux (Ubuntu)

Post by slembcke »

The reason why the "._" files exist is legacy support in OS X for old Mac OS resource forks. (resource forks were basically a second file that contained structured binary data) I'm not sure why they would have gotten created to be honest. Their use has been deprecated for almost 10 years, and I can't think of a program that I would have that would still create them... Weird.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
danger89
Posts: 1
Joined: Fri Jul 09, 2010 9:37 pm
Contact:

Re: How to build on Linux (Ubuntu)

Post by danger89 »

Finally that solved this strange error indeed, because the combi of the Mac files -,-

They could make 2 downloads OR they need to tell it at least in the readme...
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: How to build on Linux (Ubuntu)

Post by slembcke »

Blah. I finally fixed this. Sorry that it has taken me so long. I've had a lot going on lately.

So it turns out this is what happened:
I updated the README at some point a while back. Instead of rebuilding the archive from scratch, I just downloaded the latest, edited the README and tarred it back up. When you decompress files from the OS X Finder, it adds an extended metadata flag to the files marking them as being downloaded from the internet. (a reasonable security measure when running unsigned code) When I went back and recompressed the archive, it added the "._*" files to the archive containing the extended metadata. -_-

Annoying for sure. I'll have to be more careful about this in the future.
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 29 guests