How to build lua on Slackware 64
Today I figured it was time to update my e17 installation and it seemed that they introduced a new dependency for edje: liblua. So I go to my /usr/src directory and run:
But when it tried to run configure, there was nothing to configure so I figured it was smart to quit the slackbuild script and check it out myself.
It seems that there was indeed no configure file, but the INSTALL file told me I had to run “make linux install” to build and install the library for my platform. Well that’s nice, but where will it install everything? Benv hinted me that I should probably edit the Makefile and change INSTALL_TOP to INSTALL_TOP= /usr/src/lua-5.1.4/pkg/usr so I could run makepkg after to create my own package. But after creating and installing the lua package, edje still complained that there was no liblua installed on my machine.
Checking my config.log I found out it was searching for liblua in the pkgconfig files. Oddly enough, the lua src did have a etc/lua.pc file, but it does not install it. So I placed it in /usr/src/lua-5.1.4/pkg/usr/share/pkgconfig/ directory and I changed the paths so it would match my installation and I recreated and reinstalled the package.
This time edje did find the library, but crashed with the following error:
After googling a little and checking the error again, I found out that the Makefile needed to be patched so it would also use the -fPIC option. So I edited the /usr/src/lua-5.1.4/src/Makefile and changed
to
, ran the make linux install, created a new package, installed the package and it finally worked \o/
A convenient note. And another piece of evidence that morons who don’t support autoconf should die….