Compiling LÖVE on CentOS 6.5

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.
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Compiling LÖVE on CentOS 6.5

Post by jchayan »

Hi there I've been trying to compile love in CentOS i have solved for some dependencies by compiling them (like SDL 2 and DevIL).

First of all i run ./configure script and i get this error:

Code: Select all

configure: WARNING: Could not find pkg-config definition for luajit5.1 or luajit, falling back to manual detection
checking for library containing lua_pcall... no
configure: error: LÖVE needs "luajit", please install "luajit" with development files and try again
CentOS does include luajit-5.1, but then I also compiled luajit by myself and still the same error.

So I tried using:

Code: Select all

./configure --with-lua=lua
and it happens with no errors but when i do

Code: Select all

sudo make
I get the following compile errors:

Code: Select all

common/Module.cpp:37: error: 'nullptr' was not declared in this scope
common/Module.cpp: In function 'void<unnamed>::freeEmptyRegistry()':
common/Module.cpp:52: error: 'nullptr' was not declared in this scope
common/Module.cpp: In static member function 'static void love::Module::registerInstance(love::Module*)':
common/Module.cpp:80: error: 'nullptr' was not declared in this scope
common/Module.cpp: In static member function 'static love::Module* love::Module::getInstance(const std::string&)':
common/Module.cpp:106: error: 'nullptr' was not declared in this scope
common/Module.cpp: In static member function 'static love::Module* love::Module::findInstance(const std::string&)':
common/Module.cpp:121: error: 'nullptr' was not declared in this scope
Can someone guide me through this compile process? How can I make those errors disappear?

Thanks in advance.
User avatar
slime
Solid Snayke
Posts: 3147
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Compiling LÖVE on CentOS 6.5

Post by slime »

You probably need to get a newer version of GCC - it looks like CentOS comes with a relatively ancient version which doesn't have support for some C++11 features used in LÖVE's source code.
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Re: Compiling LÖVE on CentOS 6.5

Post by jchayan »

Thanks for your answer. I installed devtools for CentOS which contains gcc 4.7.2 and supports c++11

When making now I got this:

Code: Select all

modules/filesystem/physfs/Filesystem.cpp: In member function 'bool love::filesystem::physfs::Filesystem::mount(const char*, const char*, bool)':
modules/filesystem/physfs/Filesystem.cpp:239:64: error: 'PHYSFS_mount' was not declared in this scope
modules/filesystem/physfs/Filesystem.cpp: In member function 'bool love::filesystem::physfs::Filesystem::unmount(const char*)':
modules/filesystem/physfs/Filesystem.cpp:271:64: error: 'PHYSFS_getMountPoint' was not declared in this scope
Any suggestions?
User avatar
slime
Solid Snayke
Posts: 3147
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Compiling LÖVE on CentOS 6.5

Post by slime »

What version of PhysicsFS do you have installed? LÖVE needs at least version 2.0 (released in 2009.)
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Re: Compiling LÖVE on CentOS 6.5

Post by jchayan »

Physfs 1.0.2 :/

I will try to install a package from fedora 14 if available, if it's not available. I will try to compile it.
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Re: Compiling LÖVE on CentOS 6.5

Post by jchayan »

Ok I compiled physfs 2.0 succesfully with cmake

and tried sudo make again. The last warning I got was:

Code: Select all

*** Warning: Linking the executable love against the loadable module
*** liblove.so is not portable!
libtool: link: /opt/centos/devtoolset-1.1/root/usr/bin/c++ -g -O2 -std=c++11 -o .libs/love love.o  ./.libs/liblove.so -llua -lm -ldl /usr/lib64/libmpg123.so -lGL -lphysfs -Wl,-rpath -Wl,/usr/lib64
Is that ok? For me it seems that it succesfully made.

Then I make sudo make install and last output:

Code: Select all

 /bin/mkdir -p '/usr/share/applications'
 /usr/bin/install -c -m 644 platform/unix/love.desktop '/usr/share/applications'
 /bin/mkdir -p '/usr/share/icons/hicolor/scalable/mimetypes'
 /usr/bin/install -c -m 644 platform/unix/application-x-love-game.svg '/usr/share/icons/hicolor/scalable/mimetypes'
 /bin/mkdir -p '/usr/share/mime/packages'
 /usr/bin/install -c -m 644 platform/unix/love.xml '/usr/share/mime/packages'
 /bin/mkdir -p '/usr/share/pixmaps'
 /usr/bin/install -c -m 644 platform/unix/love.svg '/usr/share/pixmaps'
 /bin/mkdir -p '/usr/share/man/man1'
 /usr/bin/install -c -m 644 platform/unix/love.1 '/usr/share/man/man1'
make[2]: leaving directory `/folder/to/love-0.9.0'
make[1]: leaving directory `/folder/to/love-0.9.0'
Then I run love in the console and i get this:

Code: Select all

love: error while loading shared libraries: liblove.so.0: cannot open shared object file: No such file or directory
I can see the shared object liblove.so.0 placed in that floder usr/lib. What would the problem be?

Am I doing something wrong?

Thanks in advance
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Re: Compiling LÖVE on CentOS 6.5

Post by jchayan »

Well I made it work by running

Code: Select all

ldconfig
It loads the baby inspector animation.

Image

But when I load a game (i.e mario from stabyourself.net) it says that the game was developed for a different version of love

Image

And then this:

Image

Is that right?
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Compiling LÖVE on CentOS 6.5

Post by josefnpat »

yes, it's right.

You're attempting to run a 0.8.0 game with 0.9.0, which are incompatible (for the most part).

The baby inspector screen is there to show you that love works properly, but you need to give it a 0.9.0 game!

Congratulations!
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
slime
Solid Snayke
Posts: 3147
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Compiling LÖVE on CentOS 6.5

Post by slime »

You can try a beta version of Mari0 SE, which uses LÖVE 0.9: http://forum.stabyourself.net/viewtopic ... 097#p97097
jchayan
Prole
Posts: 7
Joined: Mon Mar 17, 2014 6:43 am

Re: Compiling LÖVE on CentOS 6.5

Post by jchayan »

Ok! Thanks josefnpat!

Slime i will try that, thanks for your help, very appreciated!

:)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests