-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Linking CXX executable osrm-extract failed #1925
Comments
It seems like CMake tries Lua 5.2 first and that fails since we're not linking the appropriate library in. Trying to reproduce during the next days. In the meantime, could you post the Lua version your libluabind is linked against?
if it's something like
remove your build directory and run CMake again. Then it should automatically detect and use Lua 5.1. |
I have liblua5.2.so.0 => /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 |
Please check for |
after entering (ldd /usr/lib/libluabind.so | grep lua) I only |
Ah right, you already piped it through grep! My mistake. So, your libluabind is linked against Lua 5.2, which means osrm-backend also has to link against Lua 5.2. Looking at the symbols
it seems like Luabind has a few Would you be so kind and add the following three lines to the CMakeLists.txt file
remove your build directory and re-run CMake? |
cmake .. -DCMAKE_BUILD_TYPE=Release -DLUAJIT_INCLUDE_DIR=/usr/local/share/luajit-2.0.3 -DLUAJIT_LIBRARIES=/usr/lib/ -DLUABIND_LIBRARY=/usr/lib/libluabind.so.0.9.1 |
How to install (LUAJIT_LIBRARY)? |
@Dentro you don't need it, it will work withou LuaJIT (it is a replacement for the normal lua runtime). |
Lua, LauJIT reinstall and Build cmake? |
Yeah my initial suspicion that somehow your CMake setup uses both Lua 5.1 and Lua 5.2 seem to be not the case. CMake clearly prints the include path and library for Lua 5.2. Unfortunately I don't have Ubuntu 15.10 here to investigate myself right now, but I will try to reproduce this on a live CD during the next days. Could you post the following file's content
showing which libraries CMake links in for osrm-extract. |
I reinstall libluabind-dev , lua, luajit build/CMakeFiles/osrm-extract.dir/link.txt: |
What more can I do? |
@daniel-j-h this looks like it might be a bug in the Ubuntu @Dentro If my hunch is correct, you have two options:
I would suggest trying option 1 first. |
@danpat could indeed be the case. But then again we had people already building on Ubuntu 15.10 without those issues. If you go for option two, that is building luabind from source, make sure to grab the fork here with patches so that it compiles with the latest Boost release: https://github.com/mapbox/luabind You don't even have to uninstall the system's luabind, just clone that repo and so
This installs libluabind into /usr/local/{include,lib}, which then should be picked up by osrm's CMakelists. Do a final ldd /usr/local/libluabind.so then, and check against which Lua version it is linked. |
I Remove Lua5.2 packages , install Lua5.1 and https://github.com/mapbox/luabind |
Then you forgot to issue the
|
I reinstall the system, after installing this https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu - the installation was successful |
Just confirmed that our build instructions work on a fresh Ubuntu 15.10 AWS EC2 instance. I think you accidentally broke your installation by building and linking against the wrong Lua version. Great to hear it works now! |
Linking CXX executable osrm-extract
more undefined references to `lua_objlen' follow
collect2: error: ld returned 1 exit status
CMakeFiles/osrm-extract.dir/build.make:120: recipe for target 'osrm-extract' failed
make[2]: *** [osrm-extract] Error 1
CMakeFiles/Makefile2:503: recipe for target 'CMakeFiles/osrm-extract.dir/all' failed
make[1]: *** [CMakeFiles/osrm-extract.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
Ubuntu 15.10
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- LTO working
-- Using gcc specific binutils for LTO.
-- Setting linker optimizations
-- Boost version: 1.60.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- unit_test_framework
-- Found Intel TBB
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Looking for LuaJIT 5.2
-- Found LuaJIT: LUAJIT_LIBRARY-NOTFOUND
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Success
-- Luabind/Lua5.2 combination working with /usr/lib/x86_64-linux-gnu/liblua5.2.so
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so
-- OpenMP support found. Linking just in case for stxxl
-- Configuring done
-- Generating done
How to fix it ?
The text was updated successfully, but these errors were encountered: