Page 1 of 1

Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 3:57 am
by Sanaki
Just swapped from Kubuntu 11.04 to Ubuntu 11.10, new install on a different drive, tried to build mudlet from the git repository and ran into this:

/usr/bin/ld: cannot find -llua
collect2: ld returned 1 exit status
make: *** [mudlet] Error 1

Am I missing some dependency I'm not aware of? Any help would be appreciated. Not seeing what I'm missing here.

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 4:04 am
by Rakon
Compile How-To

You probably need to install liblua-5.1-dev package.

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 4:11 am
by Sanaki
Checked that for dependencies before I started, also installed liblua5.1-dev already. Went looking for answers and the only enlightening info I've found is that someone who had the same problem on a different program indicated I needed to have a /usr/lib/liblua5.1.a and/or a /usr/lib/liblua.a , yet I have neither. Afraid I'm not familiar enough with the lua libraries to know if that means anything though.

EDIT: Checked the other drive, sure enough, this one's missing the liblua5.1.a the other one has. Any ideas?

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 7:49 am
by Sanaki
Tried forcibly reinstalling, couldn't find any broken dependencies or missing libraries, hand-scanned every single lua package I could find, can't find the missing link. Caught one reference to a "cpp-dev trick", but no further detail than that, and nothing I could pin down. Would love any suggestions anyone could provide on this one.

EDIT: For now, installed the mudlet package via apt-get. Not necessarily happy with that option, but for now it'll do. Though I do find it amusing I get a segfault crash when I try to connect to the default-host profile.

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 8:56 am
by Vadi
Try sudo ldconfig

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 9:11 am
by Sanaki
Already did at multiple stages. No dice.

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 9:26 am
by Vadi
Not sure then, I'd post on askubuntu.com

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 12:20 pm
by Daagar
I just ran into this last night when I did the upgrade. I don't know the underlying reason, but the simple fix is to do:

ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so

Adjust x86_64-linux-gnu to whatever path is appropriate for your system (this is a 64bit version of Ubuntu).

Re: Distro swap: compile can't find -llua

Posted: Sat Oct 15, 2011 7:49 pm
by Sanaki
Aha! Thanks a ton. That did the trick beautifully. At first I was afraid doing "make -j7" messed it up and recloned the whole damn thing out of paranoia. And yeah, same exact directory here, Ubuntu 11.10 x64.

Re: Distro swap: compile can't find -llua

Posted: Tue Oct 18, 2011 5:26 am
by csmall
Daagar wrote: ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so
The qmake project file tries to find the library there, it is probably should look for the header files.
If I knew qmake better, I would get it to use pkgconfig to look for both, but I'm not sure how to do it conditionally.