Halp with love (now solved)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
Vadi
Prole
Posts: 8
Joined: Wed Jun 18, 2008 10:51 pm

Halp with love (now solved)

Post 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$
Last edited by Vadi on Fri Jun 20, 2008 11:51 pm, edited 1 time in total.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Halp with love.

Post 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-)
User avatar
Vadi
Prole
Posts: 8
Joined: Wed Jun 18, 2008 10:51 pm

Re: Halp with love.

Post by Vadi »

Thank you, that worked.
Phenax
Prole
Posts: 6
Joined: Fri Jun 06, 2008 4:25 am

Re: Halp with love (now solved)

Post 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
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Halp with love (now solved)

Post 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-)
Phenax
Prole
Posts: 6
Joined: Fri Jun 06, 2008 4:25 am

Re: Halp with love (now solved)

Post 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
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Halp with love (now solved)

Post by rude »

Ok, tido can probably fix that easily.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Halp with love (now solved)

Post by rude »

Vadi: VirtualBox does not support 64-bit (yet), so I can't maintain a binary. Sorry. :(
User avatar
Vadi
Prole
Posts: 8
Joined: Wed Jun 18, 2008 10:51 pm

Re: Halp with love (now solved)

Post by Vadi »

Yeah that it doesn't :/.

What if I compiled you the stuff and sent it?
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Halp with love (now solved)

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 38 guests