hedgewars-src-0.9.20: /usr/bin/ld: cannot find -lliblua.a
Hello,
I am trying to compile hedgewars-src-0.9.20 on slackware-14.0 (Linux 32 bits).
I do:
$ tar xvf hedgewars-src-0.9.20.5.tar.bz2
$ cd hedgewars-src-0.9.20
$ cmake . -DNOSERVER=1
[...]
-- Found Lua: /usr/lib/liblua.a
[...]
$ make
[...]
Scanning dependencies of target hwengine
[ 6%] Building Pascal object hedgewars/CMakeFiles/hwengine.dir/hwengine.o
uInputHandler.pas(112,27) Hint: Local variable "mod_" does not seem to be initialized
uInputHandler.pas(52,27) Hint: Unit "uMisc" not used in uInputHandler
uRenderUtils.pas(86,32) Hint: Mixing signed expressions and longwords gives a 64bit result
uRenderUtils.pas(264,32) Hint: Mixing signed expressions and longwords gives a 64bit result
uLandTexture.pas(126,83) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
uLandTexture.pas(132,74) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors.
uLandPainted.pas(30,67) Hint: Unit "uDebug" not used in uLandPainted
uLand.pas(198,13) Hint: Mixing signed expressions and longwords gives a 64bit result
Linking Pascal executable ../bin/hwengine
Linking /tmp/hedgewars-src-0.9.20/bin/hwengine
/usr/bin/ld: warning: /tmp/hedgewars-src-0.9.20/bin/link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lliblua.a
An error occurred while linking /tmp/hedgewars-src-0.9.20/bin/hwengine
make[2]: *** [bin/hwengine] Error 1
make[1]: *** [hedgewars/CMakeFiles/hwengine.dir/all] Error 2
make: *** [all] Error 2
So it does not compile correctly.
At the "cmake" step, I see "Found Lua: /usr/lib/liblua.a" whereas in the "make" step, I read "cannot find -lliblua.a".
Strange that this dependency is found in a first time but not in a second time.
Do you understand why I got this problem?
Thank you.
Found.
The problem was that my Lua was /usr/lib/liblua.a (it means the static library).
In fact, I had no shared library.
I have re-installed correctly my lua-5.1.5 package on slackware-14.0 with the shared library: /usr/lib/liblua.so.
Now, hedgewars compiles correctly:
$ cmake . -DNOSERVER=1
[...]
-- Found Lua: /usr/lib/liblua.so
[...]
$ make
[...]
[100%] Compiling ts files
[100%] Built target release-translation
I see no reason that the static library does not work with hedgewars but it seems to be the case...
Problem solved.