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

Build issue on Fedora 23 #1942

Closed
prsiv opened this issue Jan 29, 2016 · 14 comments
Closed

Build issue on Fedora 23 #1942

prsiv opened this issue Jan 29, 2016 · 14 comments

Comments

@prsiv
Copy link

prsiv commented Jan 29, 2016

I am getting the following error while building on Fedora 23 following the instructions from https://github.com/Project-OSRM/osrm-backend/wiki/Building\ OSRM (substituting dnf for yum):

As root :
dnf install git cmake gcc-c++
dnf install libxml2-devel boost-devel boost-regex bzip2-devel
libzip-devel stxxl-devel
lua.x86_64 lua-devel.x86_64 luajit.x86_64 luajit-devel.x86_64
luabind.x86_64 luabind-devel.x86_64 expat expat-devel tbb tbb-devel
git clone https://github.com/DennisOSRM/Project-OSRM.git
mkdir –p Project-OSRM/build
cd Project-OSRM/build
cmake ..

make
[ 2%] Built target CONTRACTOR
[ 15%] Built target ENGINE
[ 38%] Built target EXTRACTOR
[ 40%] Configuring revision fingerprint
-- Fingerprint unchanged, not regenerating
[ 40%] Built target FingerPrintConfigure
[ 50%] Built target SERVER
[ 52%] Built target STORAGE
[ 70%] Built target UTIL
[ 75%] Built target osrm
[ 77%] Built target osrm_store
[ 81%] Built target osrm-datastore
[ 84%] Built target osrm_extract
[ 86%] Linking CXX executable osrm-extract
/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../../lib64/libluabind.so: undefined reference to symbol 'lua_rotate'
/usr/lib64/liblua-5.3.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/osrm-extract.dir/build.make:127: recipe for target 'osrm-extract' failed
make[2]: *** [osrm-extract] Error 1
CMakeFiles/Makefile2:532: recipe for target 'CMakeFiles/osrm-extract.dir/all' failed
make[1]: *** [CMakeFiles/osrm-extract.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Any suggestions on how to proceed would be greatly appreciated.

V/R,

Paul

@daniel-j-h
Copy link
Member

Please post the output of CMake here. And if you want to be a step ahead, follow the debug steps outlined in #1925 and #1510 (comment) and post their output, too.

@prsiv
Copy link
Author

prsiv commented Feb 2, 2016

I added the display of some LUA variables in the CMakeLists.txt.

Output from cmake:

@build]$ cmake ..
-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 5.3.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test LTO_WORKS
-- Performing Test LTO_WORKS - Success
-- LTO working
-- Using gcc specific binutils for LTO.
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Setting linker optimizations
-- Found ZLIB: /lib64/libz.so (found version "1.2.8")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found EXPAT: /lib64/libexpat.so (found version "2.1.0")
-- Found BZip2: /lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Osmium: /home/xxx/Project-OSRM/third_party/libosmium/include
-- Boost version: 1.58.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: /lib64/libluabind.so
-- Found Luabind: /lib64/libluabind.so
-- Found Lua52: /lib64/liblua-5.2.so;/lib64/libm.so
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES)
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Success
-- Luabind/Lua5.2 combination working with /lib64/liblua-5.2.so
-- >>> LUA_LIBRARIES=/lib64/liblua-5.2.so/lib64/libm.so
-- >>> LUA_INCLUDE_DIR=/usr/include
-- >>> USED_LUA_LIBRARIES=/lib64/liblua-5.2.so
-- Looking for STXXL...
-- Found STXXL: /lib64/libstxxl.so
-- Found STXXL: /lib64/libstxxl.so
-- OpenMP support found. Linking just in case for stxxl
-- Found Doxygen: /bin/doxygen (found version "1.8.10")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxx/Project-OSRM/build

Verified luajit was installed:
Package luajit-2.0.4-2.fc23.x86_64 is already installed, skipping.
Package luajit-devel-2.0.4-2.fc23.x86_64 is already installed, skipping.

more on LUA packages installed:

compat-lua-devel.x86_64 5.1.5-3.fc23 @fedora
compat-lua-libs.x86_64 5.1.5-3.fc23 @fedora
lua.x86_64 5.3.2-2.fc23 @updates
lua-devel.x86_64 5.3.2-2.fc23 @updates
lua-expat.x86_64 1.3.0-6.fc23 @koji-override-0
lua-json.noarch 1.3.2-5.fc23 @koji-override-0
lua-lpeg.x86_64 0.12.2-1.fc23 @koji-override-0
lua-posix.x86_64 33.3.1-1.fc23 @fedora
lua-socket.x86_64 3.0-0.11.rc1.fc23 @koji-override-0
luabind.x86_64 0.9.1-19.fc23 @fedora
luabind-devel.x86_64 0.9.1-19.fc23 @fedora
luajit.x86_64 2.0.4-2.fc23 @fedora
luajit-devel.x86_64 2.0.4-2.fc23 @fedora

checking the libua.so for lua_rotate:
readelf -Ws /usr/lib64/liblua.so | grep lua_rotate
135: 0000000000008510 247 FUNC GLOBAL DEFAULT 11 lua_rotate
readelf -Ws /usr/lib64/liblua-5.1.so | grep lua_rotate
eadelf -Ws /usr/lib64/liblua-5.2.so | grep lua_rotate
readelf -Ws /usr/lib64/liblua-5.3.so | grep lua_rotate
135: 0000000000008510 247 FUNC GLOBAL DEFAULT 11 lua_rotate

lua -v
Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio

@prsiv prsiv closed this as completed Feb 2, 2016
@daniel-j-h
Copy link
Member

(Could you fix the issue or did you accidentally close this ticket?)

The following looks suspicious to me:

>>> LUA_LIBRARIES=/lib64/liblua-5.2.so/lib64/libm.so
>>> LUA_INCLUDE_DIR=/usr/include
>>> USED_LUA_LIBRARIES=/lib64/liblua-5.2.so

it seems like CMake picks up the Lua 5.2 libraries, but uses the default include path. I assume the headers for Lua 5.3 are at usr/include/lua5.3/ on your system --- is this correct? Could you verify it?

If this is the case then our CMake Lua detection script is to blame here, and I think (untested) you could quickfix it until we figured it out by invoking CMake like this:

cmake .. -DLUA_INCLUDE_DIR="/usr/include/lua5.3"

Just for the record, could you run ldd on your liblua to see against which Lua library it links against?

ldd /lib64/libluabind.so | grep lua

@daniel-j-h daniel-j-h reopened this Feb 2, 2016
@prsiv
Copy link
Author

prsiv commented Feb 2, 2016

I did not mean to close the ticket.... must have hit the wrong comment button...

I tried cmake .. -DLUA_INCLUDE_DIR="/usr/include/lua5.3"

No difference in final error.

ls /usr/include/lua5.3
ls: cannot access /usr/include/lua5.3: No such file or directory

ldd /lib64/libluabind.so | grep lua
liblua-5.3.so => /lib64/liblua-5.3.so (0x00007fe96b0c6000)

I found /usr/share/lua/5.3 and tried cmake -DLUA_INCLUDE_DIR="/usr/share/lua/5.3"

No difference in final error.

NOTE: I do not have any .i686 LUA components installed.... only .x86_64

@daniel-j-h
Copy link
Member

Could you show us which Lua versions are installed globally on your system?

find /usr/include -type d -iname '*lua*'

Your luabind is linked against Lua 5.3, so OSRM has also to link against Lua 5.3.

From what I see so far it seems like the libraries match, but the include path is wrong.

@prsiv
Copy link
Author

prsiv commented Feb 2, 2016

Results from find /usr/include -type d -iname 'lua'
/usr/include/lua-5.1
/usr/include/luajit-2.0
/usr/include/luabind

NOTE : Installed LUA packages (dnf list installed | grep lua):

compat-lua-devel.x86_64 5.1.5-3.fc23 @fedora
compat-lua-libs.x86_64 5.1.5-3.fc23 @fedora
lua.x86_64 5.3.2-2.fc23 @updates
lua-devel.x86_64 5.3.2-2.fc23 @updates
lua-expat.x86_64 1.3.0-6.fc23 @koji-override-0
lua-json.noarch 1.3.2-5.fc23 @koji-override-0
lua-lpeg.x86_64 0.12.2-1.fc23 @koji-override-0
lua-posix.x86_64 33.3.1-1.fc23 @fedora
lua-socket.x86_64 3.0-0.11.rc1.fc23 @koji-override-0
luabind.x86_64 0.9.1-19.fc23 @fedora
luabind-devel.x86_64 0.9.1-19.fc23 @fedora
luajit.x86_64 2.0.4-2.fc23 @fedora
luajit-devel.x86_64 2.0.4-2.fc23 @fedora

@daniel-j-h
Copy link
Member

Okay, perfect. This is all the information we need to pin-point this issue:

  • Your libuabind.so is linked against liblua-5.3.so
  • OSRM's CMake detects liblua-5.2.so as library and /usr/include/ as Lua include directory
  • We have to make OSRM's CMake module detect Lua 5.3's lib dir and include dir properly

OSRM's Lua detection is done in cmake/FindLua5.2.cmake, and hardcodes Lua 5.2.

Unfortunately I don't have the required system here to debug it at the moment. You could try carefully replacing Lua 5.2 with Lua 5.3, that hopefully should do the trick.

/cc @TheMarex your Arch setup comes with Lua 5.3, correct? Care to look into this?

@TheMarex
Copy link
Member

TheMarex commented Feb 3, 2016

Hm actually I'm surprised that luabind works with 5.3. AFAIK the Lua people did some major version breakages between version. As a workaround I would recommend compiling your own luabind version from https://github.com/mapbox/luabind against 5.2 and not use the system specified packages.

@prsiv
Copy link
Author

prsiv commented Feb 3, 2016

Ended up in a mixed environment and cmake that cmake for OSRM was not happy with.

After removing luabind and luabind-devel from Fedora 23 I am left with effectively lua 5.1.

Output from building luabind from https://github.com/mapbox/luabind :

cd build
[root@Fedora23 build]# cmake ..
-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 5.3.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features

-- Detecting CXX compile features - done
-- Configuring luabind in release mode
-- Disabling unit tests
-- Boost version: 1.58.0
-- Found Lua51: /lib64/liblua-5.1.so;/lib64/libm.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luabind-master/build

make
Scanning dependencies of target luabind
[ 4%] Building CXX object src/CMakeFiles/luabind.dir/class.cpp.o
[ 9%] Building CXX object src/CMakeFiles/luabind.dir/class_info.cpp.o
/tmp/luabind-master/src/class_info.cpp: In function ‘luabind::class_info luabind::get_class_info(const luabind::adl::argument&)’:
/tmp/luabind-master/src/class_info.cpp:43:8: warning: variable ‘givenClassRep’ set but not used [-Wunused-but-set-variable]
bool givenClassRep = false;
^
[ 14%] Building CXX object src/CMakeFiles/luabind.dir/class_registry.cpp.o
[ 19%] Building CXX object src/CMakeFiles/luabind.dir/class_rep.cpp.o
[ 23%] Building CXX object src/CMakeFiles/luabind.dir/create_class.cpp.o
[ 28%] Building CXX object src/CMakeFiles/luabind.dir/error.cpp.o
[ 33%] Building CXX object src/CMakeFiles/luabind.dir/exception_handler.cpp.o
[ 38%] Building CXX object src/CMakeFiles/luabind.dir/function.cpp.o
[ 42%] Building CXX object src/CMakeFiles/luabind.dir/function_introspection.cpp.o
[ 47%] Building CXX object src/CMakeFiles/luabind.dir/inheritance.cpp.o
[ 52%] Building CXX object src/CMakeFiles/luabind.dir/link_compatibility.cpp.o
[ 57%] Building CXX object src/CMakeFiles/luabind.dir/object_rep.cpp.o
[ 61%] Building CXX object src/CMakeFiles/luabind.dir/open.cpp.o
[ 66%] Building CXX object src/CMakeFiles/luabind.dir/operator.cpp.o
In file included from /tmp/luabind-master/src/operator.cpp:25:0:
/tmp/luabind-master/luabind/operator.hpp:351:41: warning: ‘luabind::{anonymous}::self’ defined but not used [-Wunused-variable]
LUABIND_ANONYMOUS_FIX self_type self;
^
/tmp/luabind-master/luabind/operator.hpp:352:47: warning: ‘luabind::{anonymous}::const_self’ defined but not used [-Wunused-variable]
LUABIND_ANONYMOUS_FIX const_self_type const_self;
^
[ 71%] Building CXX object src/CMakeFiles/luabind.dir/pcall.cpp.o
[ 76%] Building CXX object src/CMakeFiles/luabind.dir/scope.cpp.o
[ 80%] Building CXX object src/CMakeFiles/luabind.dir/set_package_preload.cpp.o
[ 85%] Building CXX object src/CMakeFiles/luabind.dir/stack_content_by_name.cpp.o
[ 90%] Building CXX object src/CMakeFiles/luabind.dir/weak_ref.cpp.o
[ 95%] Building CXX object src/CMakeFiles/luabind.dir/wrapper_base.cpp.o
[100%] Linking CXX static library libluabind.a
[100%] Built target luabind
[root@Fedora23 build]# make install
[100%] Built target luabind
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/luabind/adopt_policy.hpp
-- Installing: /usr/local/include/luabind/back_reference_fwd.hpp
-- Installing: /usr/local/include/luabind/back_reference.hpp
-- Installing: /usr/local/include/luabind/class.hpp
-- Installing: /usr/local/include/luabind/class_info.hpp
-- Installing: /usr/local/include/luabind/config.hpp
-- Installing: /usr/local/include/luabind/container_policy.hpp
-- Installing: /usr/local/include/luabind/copy_policy.hpp
-- Installing: /usr/local/include/luabind/dependency_policy.hpp
-- Installing: /usr/local/include/luabind/discard_result_policy.hpp
-- Installing: /usr/local/include/luabind/error.hpp
-- Installing: /usr/local/include/luabind/error_callback_fun.hpp
-- Installing: /usr/local/include/luabind/exception_handler.hpp
-- Installing: /usr/local/include/luabind/from_stack.hpp
-- Installing: /usr/local/include/luabind/function.hpp
-- Installing: /usr/local/include/luabind/function_introspection.hpp
-- Installing: /usr/local/include/luabind/get_main_thread.hpp
-- Installing: /usr/local/include/luabind/get_pointer.hpp
-- Installing: /usr/local/include/luabind/handle.hpp
-- Installing: /usr/local/include/luabind/iterator_policy.hpp
-- Installing: /usr/local/include/luabind/luabind.hpp
-- Installing: /usr/local/include/luabind/lua_include.hpp
-- Installing: /usr/local/include/luabind/lua_state_fwd.hpp
-- Installing: /usr/local/include/luabind/make_function.hpp
-- Installing: /usr/local/include/luabind/nil.hpp
-- Installing: /usr/local/include/luabind/no_dependency.hpp
-- Installing: /usr/local/include/luabind/object.hpp
-- Installing: /usr/local/include/luabind/open.hpp
-- Installing: /usr/local/include/luabind/operator.hpp
-- Installing: /usr/local/include/luabind/out_value_policy.hpp
-- Installing: /usr/local/include/luabind/prefix.hpp
-- Installing: /usr/local/include/luabind/raw_policy.hpp
-- Installing: /usr/local/include/luabind/return_reference_to_policy.hpp
-- Installing: /usr/local/include/luabind/scope.hpp
-- Installing: /usr/local/include/luabind/set_package_preload.hpp
-- Installing: /usr/local/include/luabind/shared_ptr_converter.hpp
-- Installing: /usr/local/include/luabind/tag_function.hpp
-- Installing: /usr/local/include/luabind/typeid.hpp
-- Installing: /usr/local/include/luabind/value_wrapper.hpp
-- Installing: /usr/local/include/luabind/version.hpp
-- Installing: /usr/local/include/luabind/weak_ref.hpp
-- Installing: /usr/local/include/luabind/wrapper_base.hpp
-- Installing: /usr/local/include/luabind/yield_policy.hpp
-- Installing: /usr/local/include/luabind/detail/call_function.hpp
-- Installing: /usr/local/include/luabind/detail/call.hpp
-- Installing: /usr/local/include/luabind/detail/call_member.hpp
-- Installing: /usr/local/include/luabind/detail/call_operator_iterate.hpp
-- Installing: /usr/local/include/luabind/detail/class_registry.hpp
-- Installing: /usr/local/include/luabind/detail/class_rep.hpp
-- Installing: /usr/local/include/luabind/detail/constructor.hpp
-- Installing: /usr/local/include/luabind/detail/conversion_storage.hpp
-- Installing: /usr/local/include/luabind/detail/convert_to_lua.hpp
-- Installing: /usr/local/include/luabind/detail/debug.hpp
-- Installing: /usr/local/include/luabind/detail/decorate_type.hpp
-- Installing: /usr/local/include/luabind/detail/deduce_signature.hpp
-- Installing: /usr/local/include/luabind/detail/enum_maker.hpp
-- Installing: /usr/local/include/luabind/detail/format_signature.hpp
-- Installing: /usr/local/include/luabind/detail/garbage_collector.hpp
-- Installing: /usr/local/include/luabind/detail/has_get_pointer.hpp
-- Installing: /usr/local/include/luabind/detail/inheritance.hpp
-- Installing: /usr/local/include/luabind/detail/instance_holder.hpp
-- Installing: /usr/local/include/luabind/detail/link_compatibility.hpp
-- Installing: /usr/local/include/luabind/detail/make_instance.hpp
-- Installing: /usr/local/include/luabind/detail/most_derived.hpp
-- Installing: /usr/local/include/luabind/detail/object_call.hpp
-- Installing: /usr/local/include/luabind/detail/object.hpp
-- Installing: /usr/local/include/luabind/detail/object_rep.hpp
-- Installing: /usr/local/include/luabind/detail/open.hpp
-- Installing: /usr/local/include/luabind/detail/operator_id.hpp
-- Installing: /usr/local/include/luabind/detail/other.hpp
-- Installing: /usr/local/include/luabind/detail/pcall.hpp
-- Installing: /usr/local/include/luabind/detail/pointee_sizeof.hpp
-- Installing: /usr/local/include/luabind/detail/pointee_typeid.hpp
-- Installing: /usr/local/include/luabind/detail/policy.hpp
-- Installing: /usr/local/include/luabind/detail/primitives.hpp
-- Installing: /usr/local/include/luabind/detail/property.hpp
-- Installing: /usr/local/include/luabind/detail/ref.hpp
-- Installing: /usr/local/include/luabind/detail/signature_match.hpp
-- Installing: /usr/local/include/luabind/detail/stack_utils.hpp
-- Installing: /usr/local/include/luabind/detail/typetraits.hpp
-- Installing: /usr/local/include/luabind/detail/yes_no.hpp
-- Installing: /usr/local/lib/libluabind.a

results from cmake .. -DLUA_INCLUDE_DIR="/usr/local/include/luabind"
-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 5.3.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test LTO_WORKS
-- Performing Test LTO_WORKS - Success
-- LTO working
-- Using gcc specific binutils for LTO.
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Setting linker optimizations
-- Found ZLIB: /lib64/libz.so (found version "1.2.8")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found EXPAT: /lib64/libexpat.so (found version "2.1.0")
-- Found BZip2: /lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Osmium: /tmp/Project-OSRM/third_party/libosmium/include
-- Boost version: 1.58.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/local/lib/libluabind.a
-- Found Luabind: /usr/local/lib/libluabind.a
-- Found Lua52: /lib64/liblua-5.2.so;/lib64/libm.so
-- 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: /lib64/liblua-5.2.so;/lib64/libm.so
-- Looking for LuaJIT 5.1
-- Found LUAJIT: /lib64/libluajit-5.1.so;/lib64/libm.so
-- Found LuaJIT: /lib64/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 /lib64/liblua-5.1.so, no working
Luabind found
Call Stack (most recent call first):
CMakeLists.txt:251 (include)

FYI: I am building on Fedora 23 which is a VM running in VirtualBox (no bearing to our issues but offers another way for others to test)

@daniel-j-h
Copy link
Member

You link libluabind against Lua 5.1

-- Found Lua51: /lib64/liblua-5.1.so;/lib64/libm.so

But then OSRM's CMake links against Lua 5.2

-- Found Lua52: /lib64/liblua-5.2.so;/lib64/libm.so

Could you build and install luabind again this time linked against Lua 5.2? I think you have to set LUA_INCLUDE_DIR, LUA_LIBRARY and LUA_LIBRARIES accordingly when invoking CMake for luabind. Try the curses frontend for CMake ccmake (not the extra c), then press c to configure, t for advanced mode and take a look and change the Lua config variables.

@prsiv
Copy link
Author

prsiv commented Feb 3, 2016

Thanks!! I got it to build though it was a bit of trial and error.

Ultimately I had to remove compat-lua-devel and compat-lua-libs. Compiled luabind with

cmake .. -DLUA_LIBRARY="/lib64/liblua-5.2.so" && make && make install

and compiled OSRM with

cmake .. -DLUA_LIBRARY="/lib64/liblua-5.2.so" && make && make install.

I'll begin working with the libraries now and verify everything works.

Thanks again for your assistance!
Paul

@daniel-j-h
Copy link
Member

Phew, that was probably the hardest case of installation troubles during the last weeks :) Glad it works now! I will add some notes to the Wiki based on what we learned here.

If you see other issues during running the osrm pipeline, feel free to open a new ticket.

@kirantpatil
Copy link

On Fedora 22, I have same issue.

I could not remove compat thing as it is showing below error
$ sudo dnf remove compat-lua-devel
No match for argument: compat-lua-devel
Error: No packages marked for removal.

@daniel-j-h
Copy link
Member

Please build a more recent luabind locally (from https://github.com/mapbox/luabind). Make sure to build it against the Lua version OSRM is picking up in its buildsystem (during cmake ..).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants