osrm-backend
osrm-backend copied to clipboard
Rocky 9.1 sol compile error: operator '!=' has no left operand
Rocky linux 9.1
cmake .. -DCMAKE_BUILD_TYPE=Release
...
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PkgConfig: /bin/pkg-config (found version "1.7.3")
-- Found Lua: /lib64/liblua-5.4.so;/usr/lib64/libm.so (found suitable version "5.4.4", minimum required is "5.2")
-- Using Lua 5.4.4
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found Protozero: /tmp/osrm-backend/third_party/protozero/include (found suitable version "1.7.0", minimum required is "1.6.3")
-- Found Osmium: /tmp/osrm-backend/third_party/libosmium/include
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/osrm-backend/build
# cmake --build .
Consolidate compiler generated dependencies of target EXTRACTOR
[ 0%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o
In file included from /tmp/osrm-backend/include/extractor/scripting_environment_lua.hpp:15,
from /tmp/osrm-backend/src/extractor/scripting_environment_lua.cpp:1:
/tmp/osrm-backend/third_party/sol2-3.3.0/include/sol/sol.hpp:3110:177: error: operator '!=' has no left operand
3110 | (LUA_COMPAT_BITLIB != 0)) || (SOL_LUA_VERSION_I_ < 504 && (defined(LUA_COMPAT_5_2) && (LUA_COMPAT_5_2 != 0)))
| ^~
cc1plus: note: unrecognized command-line option ‘-Wno-shorten-64-to-32’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unused-member-function’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-implicit-float-conversion’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-implicit-int-conversion’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-c++17-extensions’ may have been intended to silence earlier diagnostics
gmake[2]: *** [CMakeFiles/EXTRACTOR.dir/build.make:328: CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:888: CMakeFiles/EXTRACTOR.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
How to fix it ?
Hello,
I have the same problem with rhel 9.1.
Tried with osrm-backend with master branch and tag v5.27.1 ; and also v5.26.0, but different problems
My process : I had to install a lot of packages (If I compare to the Wiki for Centos 8.x (tbb-devel boost-devel expat-devel bzip2-devel lua-devel lua-devel doxygen))
git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
mkdir build
cd build
cmake3 .. -DENABLE_MASON=ON -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-12/root/usr/bin/g++
make
# Same with the snipe404 commands :
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
Edit 03/04/2023 :
To have something working :
I had to pass to RHEL 8 and with a backend on 5.26.0 (2.27.x is not compatible)
Dirty hack: define LUA_COMPAT_5_2 to 1 in /usr/include/luaconf-x86_64.h (it is empty by default).
This issue seems to be stale. It will be closed in 30 days if no further activity occurs.