LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Lua not found, yet installed (https://www.linuxquestions.org/questions/slackware-14/lua-not-found-yet-installed-555515/)

adriv 05-21-2007 06:08 AM

Lua not found, yet installed
 
Hi,

I'm trying to install a game for the kids, fish-fillets.
All seems well installed, but trying to play the game an error occurs:
Code:

adri@Slackware:~$ fillets
fillets: error while loading shared libraries: liblua.so: cannot open shared object file: No such file or directory
adri@Slackware:~$ whereis lua
lua: /usr/local/bin/lua
adri@Slackware:~$ ldd /usr/bin/fillets
        /lib/libsafe.so.2 (0xb7f60000)
        linux-gate.so.1 =>  (0xffffe000)
        libSDL_ttf-2.0.so.0 => /usr/lib/libSDL_ttf-2.0.so.0 (0xb7f3d000)
        libSDL_image-1.2.so.0 => /usr/lib/libSDL_image-1.2.so.0 (0xb7f22000)
        libSDL_mixer-1.2.so.0 => /usr/local/lib/libSDL_mixer-1.2.so.0 (0xb7ea9000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e11000)
        liblua.so => not found
        liblualib.so => not found
        libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0xb7e02000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7d34000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7d11000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7d08000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7bd9000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7b0c000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7b07000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7a98000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7a86000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7a74000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0xb7a3b000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7a1e000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb79ca000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb79bc000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb79b8000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb79af000)
        libvga.so.1 => /usr/lib/libvga.so.1 (0xb795c000)
        /lib/ld-linux.so.2 (0xb7f67000)
adri@Slackware:~$

As you can see, liblua.so is not found, but I installed it. As a matter of a fact, I installed it several times (different packages, the last time compiled it myself), but the error remains the same (I ran ldconfig).
Anyone an idea?

bathory 05-21-2007 06:55 AM

If you have installed liblua in /usr/local/lib (which I think is true since the binary is in /usr/local/bin) then you must add /usr/local/lib in /etc/ld.so.conf and then re-run ldconfig.

adriv 05-21-2007 07:15 AM

Thanks, but /usr/local/lib already is in /etc/ld.so.conf. :confused:

piete 05-21-2007 07:26 AM

Run updatedb if you haven't already, then `locate liblua` to see if indeed it is actually in your machine. Also have a look in the package log to see if it came with the package:

Code:

cat /var/log/packages/<lua package name>
- Piete.

adriv 05-21-2007 07:37 AM

Everything seems to be there:
Code:

root@Slackware:/home/adri# updatedb
root@Slackware:/home/adri# slocate liblua
/usr/local/lib/liblua.a
/home/adri/.kde/share/apps/RecentDocuments/liblua.a.desktop
/home/adri/.local/share/Trash/files/lua-5.1.2/src/liblua.a
root@Slackware:/home/adri# cat /var/log/packages/lua-5.1.2-i386-1
PACKAGE NAME:    lua-5.1.2-i386-1
COMPRESSED PACKAGE SIZE:    290 K
UNCOMPRESSED PACKAGE SIZE:    780 K
PACKAGE LOCATION: lua-5.1.2-i386-1.tgz
PACKAGE DESCRIPTION:
lua: lua
FILE LIST:
./
usr/
usr/doc/
usr/doc/lua-5.1.2/
usr/doc/lua-5.1.2/doc/
usr/doc/lua-5.1.2/doc/luac.html
usr/doc/lua-5.1.2/doc/amazon.gif
usr/doc/lua-5.1.2/doc/manual.css
usr/doc/lua-5.1.2/doc/lua.1
usr/doc/lua-5.1.2/doc/cover.png
usr/doc/lua-5.1.2/doc/lua.css
usr/doc/lua-5.1.2/doc/manual.html
usr/doc/lua-5.1.2/doc/lua.html
usr/doc/lua-5.1.2/doc/luac.1
usr/doc/lua-5.1.2/doc/contents.html
usr/doc/lua-5.1.2/doc/logo.gif
usr/doc/lua-5.1.2/doc/readme.html
usr/doc/lua-5.1.2/README
usr/doc/lua-5.1.2/HISTORY
usr/doc/lua-5.1.2/INSTALL
usr/doc/lua-5.1.2/COPYRIGHT
usr/local/
usr/local/bin/
usr/local/bin/lua
usr/local/bin/luac
usr/local/lib/
usr/local/lib/liblua.a
usr/local/man/
usr/local/man/man1/
usr/local/man/man1/luac.1.gz
usr/local/man/man1/lua.1.gz
usr/local/include/
usr/local/include/luaconf.h
usr/local/include/lua.h
usr/local/include/lauxlib.h
usr/local/include/lua.hpp
usr/local/include/lualib.h
install/
install/doinst.sh
install/slack-desc
root@Slackware:/home/adri#

Am I overlooking something?
BTW: I've tried this with lua-5.1.1 as well.

piete 05-21-2007 08:27 AM

I'm afraid you've overlooked something:

liblua.so => not found
liblualib.so => not found

What's found is liblua.a

Basically fillets needs a shared object (.so), but the packages you're using are static libraries (.a) ..

I suggest downloading the lua source and compiling with ./configure --enable-shared !

Good luck,
- Piete.

bathory 05-21-2007 08:42 AM

As piete mentioned above, it seems that the shared library liblua.so does not exist in your box. You can either install it from source, or d/l the Slackware binary from here and install it using
Code:

installpkg lua-5.0.3-i486-1df.tgz

rworkman 05-21-2007 10:30 AM

http://www.slackbuilds.org/repository/development/lua/
http://www.slackbuilds.org/howto/

Remove all vestiges of your previous attempts first.

adriv 05-21-2007 11:05 AM

OK, so I tried the SlackBuild.
Now I get:
Code:

adri@Slackware:~$ fillets
fillets: error while loading shared libraries: liblualib.so: cannot open shared object file: No such file or directory

What's the difference between lualib and liblualib?

rworkman 05-21-2007 11:18 AM

Like I said, remove *ALL* vestiges of your previous attempts.
If you have *any* files left in /usr/local from the old lua install, you *will* have troubles.
Also, you will need to recompile fillet (or whatever it's called) against the new lua package just in case.

adriv 05-21-2007 02:16 PM

Quote:

Originally Posted by rworkman
Like I said, remove *ALL* vestiges of your previous attempts.
If you have *any* files left in /usr/local from the old lua install, you *will* have troubles.

I did that.
And now did it again.
Quote:

Originally Posted by rworkman
Also, you will need to recompile fillet (or whatever it's called) against the new lua package just in case.

Compiling fish-fillets gives me the error (I did run ldconfig):
Code:

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for ranlib... ranlib
checking for sin in -lm... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FRIBIDI... yes
checking for lua-config... no
checking for lua-config50... no
checking for lua-config5.0... no
checking for LUA... checking for lua_setfenv in -llua... yes
checking for luaopen_base in -llualib... no
checking for luaopen_base in -llualib50... no
checking for luaopen_base in -llualib5.0... no
configure: error: *** Lualib5 is required.
                You can download lua from http://www.lua.org
bash-3.2$ whereis lua
lua: /usr/bin/lua /usr/include/lua.h /usr/include/lua.hpp /usr/man/man1/lua.1.gz /usr/share/man/man1/lua.1.gz
bash-3.2$

I'm probably stupid, but I don't get it...

H_TeXMeX_H 05-21-2007 02:33 PM

Ok do this:
Code:

1) Download lua from here
2) Extract the .tar.gz by 'tar -xzf lua-5.1.2.tar.gz'
3) Go into the new directory and edit the makefile as follows
change line 15 from this:
INSTALL_TOP= /usr/local
to this:
INSTALL_TOP= /usr
save and exit
4) open a terminal where the makefile is and run 'make linux'
5) 'su' into root and run 'make install'
(you can now also run 'ldconfig' just to make sure it is found)
6) Run or compile fish fillets again

EDIT:
Wait, this won't produce a '.so' just the '.a'. Hmmm ...

Alien_Hominid 05-21-2007 02:36 PM

"liblua.a" is the actual Lua core, which provides the Lua C API. "liblualib.a" uses the Lua C API to implement Lua's standard libraries.
from http://lua-users.org/lists/lua-l/2004-06/msg00255.html

adriv 05-21-2007 03:16 PM

Quote:

Originally Posted by Alien_Hominid
"liblua.a" is the actual Lua core, which provides the Lua C API. "liblualib.a" uses the Lua C API to implement Lua's standard libraries.
from http://lua-users.org/lists/lua-l/2004-06/msg00255.html

That's way over my head. :)
Anyways, the SlacBuild script didn't work, several other packages (from Linuxpackages and Slacky-it) didn't either, but the one bathory adviced (also from LP.net) gets things going. Thanks. I'm recompiling fishfillets now.
Hey, it's done! :D
Installing it now with Checkinstall and........
Code:

adri@Slackware:~$ fillets
main.cpp:117: ERROR init file not found; path='/usr/local/share/games/fillets-ng/script/init.lua'; systemdir='/usr/local/share/games/fillets-ng'; userdir='/home/adri/.fillets-ng'; hint='try command line option "systemdir=path/to/data"'
adri@Slackware:~$

So we've gotten closer to the solution.

rworkman 05-21-2007 03:33 PM

adriv:
Can you link me to this game? I'll give it a try here.


All times are GMT -5. The time now is 09:34 PM.