Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luabind and osrm are coming from one liblua,but osrm cmake compile error #2810

Closed
eryalee opened this issue Aug 25, 2016 · 6 comments
Closed

Comments

@eryalee
Copy link

eryalee commented Aug 25, 2016

luabind and osrm are coming from one liblua,but osrm cmake compile error.
when building osrm, cmake error occured. to see below.
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- Setting linker optimizations
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- Found Intel TBB
-- TBB interface version: 9005
-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind.a
-- Looking for LuaJIT 5.2
-- Found LuaJIT: /usr/local/lib/libluajit-5.1.so
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Failed
-- Luabind/Lua5.2 not feasible, falling back to Lua 5.1.
-- Looking for LuaJIT 5.1
-- Found LuaJIT: /usr/local/lib/libluajit-5.1.so
-- Performing Test LUABIND51_WORKS
-- Performing Test LUABIND51_WORKS - Failed
CMake Error at cmake/check_luabind.cmake:38 (message):
Luabind does not work with Lua 5.1 at /usr/lib64/liblua-5.1.so, no working
Luabind found
Call Stack (most recent call first):
CMakeLists.txt:286 (include)

os:centos
lua5.1 was installed by yum, install dir is /usr/lib64/
luabind was from https://github.com/DennisOSRM/luabind.git. its cmake output is
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring luabind in release mode
-- Disabling unit tests
-- Boost version: 1.55.0
-- Found Lua51: /usr/lib64/liblua-5.1.so;/usr/lib64/libm.so (found version "5.1.4")
-- Configuring done
-- Generating done

@danpat
Copy link
Member

danpat commented Aug 25, 2016

@eryalee It looks like cmake is finding libluajit-5.1 instead of liblua-5.1.so.

Trun uninstalling luajit and try running cmake again.

When you built libluabind, it linked against liblua-5.1.so. When you build OSRM, you must link against the same liblua-5.1.so for it to work. For some reason, cmake is finding libluajit-5.1.so instead.

@eryalee
Copy link
Author

eryalee commented Aug 25, 2016

@danpat
luajit is not needed by osrm?

@danpat
Copy link
Member

danpat commented Aug 25, 2016

@eryalee OSRM needs either Lua5.1, Lua5.2 or LuaJIT, and your version of LuaBind must link against the same Lua version that OSRM links against.

It looks like you've build Luabind against Lua5.1, so you should link OSRM against Lua5.1 as well. The cmake detection scripts do not seem to be working for you, so the easiest thing to do is uninstall all versions of Lua except Lua5.1.

@eryalee
Copy link
Author

eryalee commented Aug 25, 2016

@danpat

i just uninstall LuaJIT, compile again LuaBind
-- The C compiler identification is GNU 4.4.6
-- The CXX compiler identification is GNU 4.4.6
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring luabind in release mode
-- Disabling unit tests
-- Boost version: 1.55.0
-- Found Lua51: /usr/lib64/liblua-5.1.so;/usr/lib64/libm.so (found version "5.1.4")
-- Configuring done
-- Generating done

but the osrm cmake compiles error:
-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind.a
-- Found Luabind: /usr/local/lib/libluabind.a
-- Found Lua52: /usr/lib64/liblua.so;/usr/lib64/libm.so (found version "5.1.4")
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES)
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Failed
-- Luabind/Lua5.2 not feasible, falling back to Lua 5.1.
-- Found Lua51: /usr/lib64/liblua.so;/usr/lib64/libm.so (found version "5.1.4")
-- Looking for LuaJIT 5.1
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES)
-- Performing Test LUABIND51_WORKS
-- Performing Test LUABIND51_WORKS - Failed
CMake Error at cmake/check_luabind.cmake:38 (message):
Luabind does not work with Lua 5.1 at /usr/lib64/liblua-5.1.so, no working
Luabind found
Call Stack (most recent call first):
CMakeLists.txt:286 (include)

the only lualib in the env:
find /usr/ -name "liblua"
/usr/lib64/liblua-5.1.so
/usr/lib64/liblua.so
/usr/local/lib/libluabind.a

they build against the same /usr/lib64/liblua-5.1.so....

@djschilling
Copy link

This issue was fixed by #2805.

Try with the current master version.

@MoKob
Copy link

MoKob commented Aug 29, 2016

Given that #2818 was opened, I assume #2810 (comment) to have solved the issue.

@MoKob MoKob closed this as completed Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants