0

Just starting with Löve and I'm loving it! I'm currently testing it under Ubuntu 14.04.

I was able to compile love 0.8.0 with no trouble, but I'm having problems compiling 0.9.2 from bitbucket. It seems, I might have been eaten by a grue...

I got this error when linking, due to libturbojpeg:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libturbojpeg.a(libturbojpeg_la-turbojpeg.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC

According to this StackOverflow entry, it seems that the default libturbojpeg binary installed in Ubuntu via apt-get:

tomas@ubuntu:~/tomas/love/love-0.9.2-bitbucket$ dpkg -L libjpeg-turbo8-dev | grep libturbojpeg.a
/usr/lib/x86_64-linux-gnu/libturbojpeg.a
tomas@ubuntu:~/tomas/love/love-0.9.2-bitbucket$ dpkg -l libjpeg-turbo8-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                               Version                Architecture           Description
+++-==================================-======================-======================-=========================================================================
ii  libjpeg-turbo8-dev:amd64           1.3.0-0ubuntu2         amd64                  Development files for the IJG JPEG library

is not compiled with -fPIC, so I guess I'll have to get that its source code, recompile it with that option, and modify something in the build procedure of löve to point to the compiled one.

Am I going in the right direction, or may I have missed something?

Regards, Tom

PD: I'm wondering why should this library need to be compiled with -fPIC in this specific case...

   -fPIC
       If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the
       global offset table.  This option makes a difference on the m68k, PowerPC and SPARC.
Community
  • 1
  • 1
nephewtom
  • 2,941
  • 3
  • 35
  • 49

1 Answers1

0

Well, it seems updating to 0.9.2 tag made it work:

hg update 0.9.2
./platform/unix/automagic 
./configure
make

Check here for the issue on bitbucket.

Alex Szpakowski: This doesn't really help with the exact problem, but LÖVE 0.9.2 doesn't depend on or link with libturbojpeg. The latest code in the LÖVE repository is for 0.10.0, which has different dependencies than 0.9.2 (and isn't complete/released yet.) If you want to compile 0.9.2 for Linux (rather than using a .deb or PPA) you should probably download the source from here: https://bitbucket.org/rude/love/downloads/love-0.9.2-linux-src.tar.gz , or update to the 0.9.2 tag in the Mercurial repository and run automagic etc.

nephewtom
  • 2,941
  • 3
  • 35
  • 49