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 does not work with Lua51 if LuaJit is getting detected #2831

Closed
ghost opened this issue Aug 31, 2016 · 18 comments
Closed

Luabind does not work with Lua51 if LuaJit is getting detected #2831

ghost opened this issue Aug 31, 2016 · 18 comments

Comments

@ghost
Copy link

ghost commented Aug 31, 2016

Hi ... I have downloaded osrm-backend from git ... Now when I am making cmake, it is throwing this error ... check this -->

$ /Maps work/osrm/osrm-backend/build$ sudo cmake .. $CMAKEOPTIONS -DBUILD_TOOLS=1
-- Building on a 64 bit system
CMake Warning at CMakeLists.txt:135 (message):
GNU gold linker isn't available.

-- Configuring OSRM in release mode
-- LTO working
-- Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038
-- Setting linker optimizations
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- Found Intel TBB
-- TBB interface version: 6000
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Looking for LuaJIT 5.2
-- Found LuaJIT: /usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/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 LUA_LIBRARY-NOTFOUND, no working
Luabind found
Call Stack (most recent call first):
CMakeLists.txt:307 (include)

-- Configuring incomplete, errors occurred!

and i also tried using sudo cmake ..

Expecting reply

@danpat
Copy link
Member

danpat commented Aug 31, 2016

@Pradyumna007 Your version of libluabind needs to match the edition of Lua you have installed.

Generally, libluabind and lua-5.1 work best together. You seem to have libluajit-5.1 installed. Try removing that and installing vanilla Lua5.1.

@ghost
Copy link
Author

ghost commented Sep 1, 2016

Can you suggest me how to Install ?? i messed up the whole thing with installation ... I installed many times and uninstalled ... Now am not able to figure out where to start .???

I have libluabind
I dont know how to install lua-5.1 (I installed from luarocks)

where to go further ??

@daniel-j-h
Copy link
Member

What's your Linux distribution? You should be able to install Lua through your package manager (and uninstall LuaJit using your package manager, too).

For Luabind there should also be a package in your package manager. In case that does not work, there is https://github.com/mapbox/luabind which you can install with

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install

@daniel-j-h daniel-j-h changed the title OSRM cmake error Luabind does not work with Lua51 if LuaJit is getting detected Sep 2, 2016
@ghost
Copy link
Author

ghost commented Sep 2, 2016

Mine is Ubuntu 12.02 LTS .... LuaJit is not installed anywhere
I reinstalled Ubuntu also .... Now, IDK this ubuntu is angry with this error .. :P

-- Found Intel TBB
-- TBB interface version: 6000
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Found Lua52: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.4")
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- 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
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- 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/lib/x86_64-linux-gnu/liblua5.1.so, no working Luabind found
Call Stack (most recent call first):
CMakeLists.txt:307 (include)

@daniel-j-h
Copy link
Member

-- Found Luabind: /usr/lib/libluabind.so

Uninstall the global luabind. Use the mapbox/luabind I posted above instead.

@ghost
Copy link
Author

ghost commented Sep 2, 2016

I deleted it ... and installed from the git location u gave ... but it is throwing the same error again

-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind.a
-- Found Luabind: /usr/local/lib/libluabind.a
-- Could NOT find Lua52 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- Luabind/Lua5.2 not feasible, falling back to Lua 5.1.
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.4")
-- Looking for LuaJIT 5.1
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- 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/lib/x86_64-linux-gnu/liblua5.1.so, no working Luabind found
Call Stack (most recent call first):
CMakeLists.txt:307 (include)

-- Configuring incomplete, errors occurred!
See also "/home/local/ANT/sprsn/Maps/osrm/osrm-backend-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/local/ANT/sprsn/Maps/osrm/osrm-backend-master/build/CMakeFiles/CMakeError.log".
CMake Error: Unable to open check cache file for write. /home/local/ANT/sprsn/Maps/osrm/osrm-backend-master/build/CMakeFiles/cmake.check_cache

@djschilling
Copy link

Seems to be the same issue described here: #2804

In the current master version this should be fixed. Which OSRM-Version are you using?

@ghost
Copy link
Author

ghost commented Sep 2, 2016

IDK which version ... but I downloaded the latest from git .... and I didnt get the #2804 is wat all abt

@daniel-j-h
Copy link
Member

Good catch @pongo710, thanks.

@Pradyumna007 #2804 describes a fix for gcc 4.8 (which you are using). This fix is now in master. Please pull (or simply git clone again).

@ghost
Copy link
Author

ghost commented Sep 2, 2016

@daniel-j-h You mean to say that new osrm-5.0.0.rc-1 version ?

I downloaded it and trying to set it up ... still it is popping error

@djschilling
Copy link

Try to use the current master version by downloading it with git:
git clone https://github.com/Project-OSRM/osrm-backend.git

@ghost
Copy link
Author

ghost commented Sep 2, 2016

@pongo710 From here only I downloaded osrm ....

@ghost
Copy link
Author

ghost commented Sep 2, 2016

@pongo710 @daniel-j-h I have tried installing by using
https://travis-ci.org/Project-OSRM/osrm-backend/jobs/59878713
and I got this error

-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind.a
-- Found Luabind: /usr/local/lib/libluabind.a
-- Could NOT find Lua52 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- Luabind/Lua5.2 not feasible, falling back to Lua 5.1.
CMake Error at /usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find Lua51 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.2/Modules/FindLua51.cmake:94 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/check_luabind.cmake:26 (find_package)
CMakeLists.txt:307 (include)

-- Configuring incomplete, errors occurred!
See also "/home/local/ANT/sprsn/Maps/osrm/Project-OSRM/osrm-backend/build/CMakeFiles/CMakeOutput.log".
See also "/home/local/ANT/sprsn/Maps/osrm/Project-OSRM/osrm-backend/build/CMakeFiles/CMakeError.log".

@daniel-j-h
Copy link
Member

Could NOT find Lua51

CMake couldn't detect Lua51, did you uninstall it by accident while uninstalling luajit?

@ghost
Copy link
Author

ghost commented Sep 2, 2016

I didnt not install luajit ... and and uninstall lua51

@daniel-j-h can u check the above link ? i followed the same commands ...

@daniel-j-h
Copy link
Member

The link you posted is Travis, our CI that runs Ubuntu Trusty. Don't follow that.

Repeating what I said

@ghost
Copy link
Author

ghost commented Sep 2, 2016

@daniel-j-h I have installed Lua 5.1 from sudo apt-get install liblua5.1 and installed luabind from the git you have suggested. .... As @pongo710 suggested I am installing osrm-backend from link above which i previously did .... in that way only am getting this error

-- Found Luabind: /usr/local/lib/libluabind.a
-- Could NOT find Lua52 (missing: LUA_LIBRARIES LUA_INCLUDE_DIR)
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- Luabind/Lua5.2 not feasible, falling back to Lua 5.1.
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.4")
-- Looking for LuaJIT 5.1
-- Could NOT find LUAJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- 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/lib/x86_64-linux-gnu/liblua5.1.so, no working Luabind found
Call Stack (most recent call first):
CMakeLists.txt:307 (include)

Now I am not understanding wt is the prob ?

@ghost
Copy link
Author

ghost commented Sep 6, 2016

Hey U can close the ticket ... It is working fine in ubuntu 14.04 ... thank you so much for the links and help

@danpat danpat closed this as completed Sep 6, 2016
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

3 participants