Page 1 of 2

Halp with love (now solved)

Posted: Fri Jun 20, 2008 9:26 pm
by Vadi
Hiya,

I'm trying to compile love (not because I'm masochistic, but because I'm on 64bit and there is no .deb), but I get this error:

Code: Select all

vadi@ubuntu-laptop:~/Programs/love$ make
Making liblove ...
Making love ...
Making love_chipmunk ...
src/chipmunk/chipmunk/cpCollision.c: In function ‘int findVerts(cpContact**, cpPolyShape*, cpPolyShape*, cpVect, cpFloat)’:
src/chipmunk/chipmunk/cpCollision.c:171: error: cast from ‘cpPolyShape*’ to ‘unsigned int’ loses precision
src/chipmunk/chipmunk/cpCollision.c:177: error: cast from ‘cpPolyShape*’ to ‘unsigned int’ loses precision
src/chipmunk/chipmunk/cpCollision.c: In function ‘void findPointsBehindSeg(cpContact**, int*, int*, cpSegmentShape*, cpPolyShape*, cpFloat, cpFloat)’:
src/chipmunk/chipmunk/cpCollision.c:230: error: cast from ‘cpPolyShape*’ to ‘unsigned int’ loses precision
src/chipmunk/chipmunk/cpCollision.c: In function ‘int seg2poly(cpShape*, cpShape*, cpContact**)’:
src/chipmunk/chipmunk/cpCollision.c:271: error: cast from ‘cpSegmentShape*’ to ‘unsigned int’ loses precision
src/chipmunk/chipmunk/cpCollision.c:273: error: cast from ‘cpSegmentShape*’ to ‘unsigned int’ loses precision
make[1]: *** [obj/chipmunk/cpCollision.o] Error 1
make: *** [love_chipmunk] Error 2
It looks like some error in the code to me, but I'm not sure. Can anyone clear this up and see if I did something wrong?

Here's my version of gcc by the way, this is on Ubuntu 8.04:
vadi@ubuntu-laptop:~/Programs/love$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
vadi@ubuntu-laptop:~/Programs/love$

Re: Halp with love.

Posted: Fri Jun 20, 2008 11:18 pm
by rude
Ok, that's weird. I have the exact same version of gcc as you do, and I built the binaries without even a warning. (32-bit, however).

Try removing "love_chipmunk" in the top line of the makefile. It's not really needed right now :oops: (it's never loaded in 0.3.0). I know that's not a solution in the long run, but it may work as a quick fix for now.

I'll download Ubuntu 64-bit and install on another virtual machine, so I can give it a go myself. If all the required libraries are available in 64-bit, I see no reason why we can't start providing 64-bit packages as well.

Let me know what happens. 8-)

Re: Halp with love.

Posted: Fri Jun 20, 2008 11:41 pm
by Vadi
Thank you, that worked.

Re: Halp with love (now solved)

Posted: Sat Jun 21, 2008 12:46 am
by Phenax
Stick these modify version in love/src/chipmunk/chipmunk and it will compile under x86_64..
http://omploader.org/vazVu/cpCollision.c
http://omploader.org/vazVv/cpSpace.c

Re: Halp with love (now solved)

Posted: Sat Jun 21, 2008 1:10 am
by rude
Phenax wrote:Stick these modify version in love/src/chipmunk/chipmunk and it will compile under x86_64..http://omploader.org/vazVu/cpCollision. ... /cpSpace.c
Excellent, thanks! 64-bit .deb is underway. 8-)

Re: Halp with love (now solved)

Posted: Sat Jun 21, 2008 1:30 am
by Phenax
Well, the OP also said that Makefile does not work with -j (multiple jobs compiling love).

I don't have the knowledge of Makefile-fu nor do I have the time to do it, but here is how, I'm sure original maker of Makefile can easily do..
  • Use $(MAKE) instead of make
  • Make building liblove a dependency of building everything else so it can link to liblove.a

Re: Halp with love (now solved)

Posted: Sat Jun 21, 2008 1:50 pm
by rude
Ok, tido can probably fix that easily.

Re: Halp with love (now solved)

Posted: Mon Jun 23, 2008 10:49 am
by rude
Vadi: VirtualBox does not support 64-bit (yet), so I can't maintain a binary. Sorry. :(

Re: Halp with love (now solved)

Posted: Mon Jun 23, 2008 12:48 pm
by Vadi
Yeah that it doesn't :/.

What if I compiled you the stuff and sent it?

Re: Halp with love (now solved)

Posted: Mon Jun 23, 2008 1:08 pm
by rude
Vadi wrote:Yeah that it doesn't :/.

What if I compiled you the stuff and sent it?
Thank you for volunteering. :D

.. but I'm not sure if that would work. I'll ask tido if the same script can be used.