Page 1 of 1

Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 8:18 pm
by Mavi
hello, i have a problem on installing love from source. i added all needing lib files to my system. and the make procedure also works fine, but after make i change to the bin folder and start love i get the following message:

Code: Select all

./love: error while loading shared libraries: liblua5.1.so: cannot open shared object file: No such file or directory
i copied the lua libs from scratch http://luabinaries.luaforge.net/installation.html. thus the lua libs are located in /usr/local/lib and includes in /usr/local/include.

can someone give me a hint?

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 8:26 pm
by rude
Hi!

In the makefile, try changing this:

Code: Select all

# Linker flags.
LD_LUA = -llua5.1
to this:

Code: Select all

# Linker flags.
LD_LUA = -llua
(Disclaimer: I only use Windows and Ubuntu, so no guarantees.)

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 8:32 pm
by Mavi
hi, i changed the Makefile and run make again with the following failure:

Code: Select all

/usr/bin/ld: cannot find -llua
any other hints? thx

EDIT: i dont have a folder

Code: Select all

/usr/include/lua5.1
as defined in the Makefile. as i sad i copied from scratch to

Code: Select all

/usr/local/include
the include files from lua.

when i do make i get no errors...

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 8:39 pm
by rude
Ah ... ok. Lame.

There are lots of Linux guys here, but alas I am not one of them.

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 8:46 pm
by surtic
My suggestion:
  1. Make sure /usr/local/lib is in /etc/ld.so.conf
  2. Run (with root permissions) /sbin/ldconfig
It's not enough to copy the libraries, the loader needs to know about them (it doesn't automatically look in /usr/local/lib).

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 9:06 pm
by Mavi
thx you. that worked!! the ldconfig is the loader ??

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 9:32 pm
by surtic
The loader is called ld.so, and /etc/ld.so.conf is its config file. ldconfig compiles /etc/ld.so.conf into a file called /etc/ld.so.cache which ld.so can use directly (it contains every dynamic libraries available to the loader).

If you're interested, have a look at the manpage of ld.so (for example here).

Re: Installing from source (Mandrake 2008)

Posted: Mon Jul 14, 2008 9:54 pm
by rude
Woo~ ... Go Team/surtic!

Is this what apt-get does each time I install a library?

Re: Installing from source (Mandrake 2008)

Posted: Tue Jul 15, 2008 3:50 pm
by Merkoth
rude wrote:Woo~ ... Go Team/surtic!

Is this what apt-get does each time I install a library?
Exactly, if you expand the "console" view while installing something with Synaptic, you can even read something like "Triggered deferred ldconfig". That way, if you're installing many libs, you don't have to rebuild ld's cache a gazillion times. Neato.