liblua dependency missing, causing Perl Inline to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lua-bitop (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
1) System info:
Description: Ubuntu 14.04.1 LTS
Release: 14.04
2) Package info:
lua-bitop:
Installed: 1.0.2-2
3) Shared library dependencies for LUA 5.1-version:
$ ldd 5.1-bitop/bit.so
libc.so.6 => /lib/x86_
Notice how liblua5.1.so is missing from the list. On a Perl-script running Inline::LUA following error message will be emitted:
"error: error loading module 'bit' from file '/usr/lib/
Info: Perl doesn't use LUA 5.2 in it's bindings, only LUA 5.1.
4) Build warnings gone, Perl-script working:
dpkg-shlibdeps: warning: symbol lua_gettop used by debian/
5) This is what I'd like to happen:
$ ldd /usr/lib/
I managed to manually build a library with linker options:
CLIB_CFLAGS=
and that fixes the issue.
This is affecting Ubuntu 16 also.
Here is a proof of failure:
#!/usr/bin/perl -w --
use strict;
use warnings;
use Inline;
# Sample LUA-code
my $lua = <<END_OF_CODE
require('bit')
require('math')
function lua_bitop_tester() vars['bitmap' ] = 1
test_vars = {}
test_
print( bit.band( test_vars[ 'bitmap' ], bit.lshift(1, 0))) tonumber( (bit.band( test_vars[ 'bitmap' ], bit.lshift(1, 0))) or 0) > 0)
print(
end
END_OF_CODE
;
# Introduce the lua_bitop_tester() function into Perl-world
Inline->bind( Lua => $lua );
# Call LUA-code
lua_bitop_tester();
# Should output x86_64- linux-gnu/ lua/5.1/ bit.so' :
#1
#true
# ... if working correctly
# Will output:
# error: error loading module 'bit' from file '/usr/lib/
# ... when using Ubuntu package
That piece of Perl-code will fail with default package and run successfully when rebuilt with proper dynamic dependencies.