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

make command crush #3821

Closed
Pcosmin opened this issue Mar 14, 2017 · 10 comments
Closed

make command crush #3821

Pcosmin opened this issue Mar 14, 2017 · 10 comments

Comments

@Pcosmin
Copy link

Pcosmin commented Mar 14, 2017

i have a problem on CentOS 6:

i do: cmake .. -DSTXXL_LIBRARY=/home/centos/stxxl-master/build/lib/libstxxl_debug.a

with following output

-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /opt/rh/devtoolset-3/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-3/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-3/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-3/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Building on a 64 bit system
-- Using GNU gold as linker.
-- Disabling gc-sections on gold binutils < 2.26, see: https://sourceware.org/bugzilla/show_bug.cgi?id=17639
-- No build type specified, defaulting to Release
-- Configuring OSRM in release mode
-- Configuring release mode optimizations
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Adding -fpermissive for GCC version < 5 bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048). See #3603.
-- Setting linker optimizations
-- Looking for include file pthread.h
-- Looking for include file 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
-- Boost version: 1.59.0
-- Found the following Boost libraries:
--   date_time
--   chrono
--   filesystem
--   iostreams
--   program_options
--   regex
--   system
--   thread
--   unit_test_framework
-- Found Intel TBB
-- TBB interface version: 4001
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.0.1")
-- Looking for STXXL...
-- Found STXXL: /home/centos/stxxl-master/build/lib/libstxxl_debug.a
-- Found STXXL: /home/centos/stxxl-master/build/lib/libstxxl_debug.a
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.5")
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Found Lua: /usr/local/lib/liblua.a;/usr/lib64/libm.so;dl (found suitable exact version "5.2.0")
-- Using Lua 5.2.0
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Looking for protozero
-- Looking for protozero - found
-- Found Osmium: /var/apps/osrm-backend-master/third_party/libosmium/include
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- OpenMP support found. Linking just in case for stxxl
-- Configuring done
-- Generating done
-- Build files have been written to: /var/apps/osrm-backend-master/build

cmake is successfully, but when i do "make" i receive an error:

error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = osrm::extractor::LuaScriptingContext; _Dp = std::default_delete<osrm::extractor::LuaScriptingContext>]’
             padded_element(const U &v) : value(v) {}
                                                 ^
In file included from /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/memory:81:0,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/format/alt_sstream.hpp:21,
                 from /usr/include/boost/format/internals.hpp:23,
                 from /usr/include/boost/format.hpp:38,
                 from /var/apps/osrm-backend-master/include/util/exception.hpp:35,
                 from /var/apps/osrm-backend-master/include/extractor/raster_source.hpp:5,
                 from /var/apps/osrm-backend-master/include/extractor/scripting_environment_lua.hpp:4,
                 from /var/apps/osrm-backend-master/src/extractor/scripting_environment_lua.cpp:1:
/opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/unique_ptr.h:356:7: note: declared here
       unique_ptr(const unique_ptr&) = delete;
       ^
In file included from /var/apps/osrm-backend-master/include/extractor/scripting_environment.hpp:13:0,
                 from /var/apps/osrm-backend-master/include/extractor/scripting_environment_lua.hpp:5,
                 from /var/apps/osrm-backend-master/src/extractor/scripting_environment_lua.cpp:1:

Why is this happening?
Thank you

@daniel-j-h
Copy link
Member

Looks like either your C++ stdlib is too old or your Intel TBB version is too old and does not know about rvalue refs yet. Try upgrading. Or maybe just use our Docker images https://hub.docker.com/r/osrm/osrm-backend/.

Note: I think at least @rkcpi builds osrm on CentOS so it should work. With up to date packages I guess.

@Pcosmin
Copy link
Author

Pcosmin commented Mar 15, 2017

daniel you are right, intel tbb was too old. I successfully installed osrm-backend on centos 7. Thank you very much!

For following users who try to install osrm-backend on centos 7 this links could be useful:

Install gcc 4.9.2 on centos 7: https://superuser.com/questions/834862/how-to-install-g-4-9-2-in-cent-os-6-5

install tbb and tbb-devel on centos 7: #1129
(on centos 6 doesn't work with version provided from this command)

How to build stxxl and osrm-backend for release: #1885

How to install boost library( i installed 1.63, because 1.54 doesn't work to build osrm-backend), you must to change installation directory(osrm-backend is looking for boost-library in /usr/local/include) : http://unix.stackexchange.com/questions/98918/how-to-install-a-custom-boost-version-in-centos

I use lua 5.2.0 from this link: https://www.lua.org/ftp/lua-5.2.0.tar.gz

Thank you again daniel!

@daniel-j-h
Copy link
Member

Great you got it working, and thanks for your notes! Happy routing!

@d8ehera
Copy link

d8ehera commented Mar 22, 2017

I am trying to build this on CentOS 6.8.

Upgraded gcc 6.3
How do I upgrade TBB? Any help or details.

I am getting this error

[ 38%] Building CXX object CMakeFiles/EXTRACTOR.dir/src/extractor/scripting_environment_lua.cpp.o
In file included from /pems_data/osrm-backend/include/extractor/scripting_environment_lua.hpp:7:0,
                 from /pems_data/osrm-backend/src/extractor/scripting_environment_lua.cpp:1:
/usr/include/tbb/enumerable_thread_specific.h: In instantiation of ‘tbb::enumerable_thread_specific<T, Allocator, ETS_key_type>::padded_element<U>::padded_element(const U&) [with U = std::unique_ptr<osrm::extractor::LuaScriptingContext>; T = std::unique_ptr<osrm::extractor::LuaScriptingContext>; Allocator = tbb::cache_aligned_allocator<std::unique_ptr<osrm::extractor::LuaScriptingContext> >; tbb::ets_key_usage_type ETS_key_type = (tbb::ets_key_usage_type)1u]’:
/usr/include/tbb/enumerable_thread_specific.h:636:91:   required from ‘T& tbb::enumerable_thread_specific<T, Allocator, ETS_key_type>::local(bool&) [with T = std::unique_ptr<osrm::extractor::LuaScriptingContext>; Allocator = tbb::cache_aligned_allocator<std::unique_ptr<osrm::extractor::LuaScriptingContext> >; tbb::ets_key_usage_type ETS_key_type = (tbb::ets_key_usage_type)1u; tbb::enumerable_thread_specific<T, Allocator, ETS_key_type>::reference = std::unique_ptr<osrm::extractor::LuaScriptingContext>&]’
/pems_data/osrm-backend/src/extractor/scripting_environment_lua.cpp:469:50:   required from here
/usr/include/tbb/enumerable_thread_specific.h:477:49: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = osrm::extractor::LuaScriptingContext; _Dp = std::default_delete<osrm::extractor::LuaScriptingContext>]’
             padded_element(const U &v) : value(v) {}

@danpat
Copy link
Member

danpat commented Mar 22, 2017

@hapi100 Try re-running cmake with:

cmake -DENABLE_MASON=ON .. && make

This will use TBB provided by https://github.com/mapbox/mason and will statically link OSRM, rather than using your system libraries.

@d8ehera
Copy link

d8ehera commented Mar 22, 2017

great. That worked. Was stuck on this issue for a day. Thanks @danpat.

@d8ehera
Copy link

d8ehera commented Mar 22, 2017

Here is another error. I think i have to update glibc. Have you come across this error.I am using gcc 6.3

Scanning dependencies of target osrm-components
[ 93%] Building CXX object CMakeFiles/osrm-components.dir/src/tools/components.cpp.o
Linking CXX executable osrm-components
/tmp/osrm-backend/mason_packages/linux-x86_64/tbb/2017_20161128/lib/libtbb.so: undefined reference to `memcpy@GLIBC_2.14'
collect2: error: ld returned 1 exit status
make[2]: *** [osrm-components] Error 1
make[1]: *** [CMakeFiles/osrm-components.dir/all] Error 2
make: *** [all] Error 2

@danpat
Copy link
Member

danpat commented Mar 22, 2017

@hapi100 Yes, libc/libstdc++ is the only dependency that mason can't provide - you'll need GLIBC that supports at least ABI 2.14.

Unfortunately, your CentOS version is quite old - we use features in our code that requires newer compilers/library versions, and it may not be possible to build without upgrading everything.

Is Docker an option for you? We have pre-built Docker images available that you can simply install and use.

@d8ehera
Copy link

d8ehera commented Mar 23, 2017

@danpat, thanks for the update. We have these really old versions of osrm running on AWS CentOS 6.x. I was trying to upgrade to the latest osrm.

I am not familiar with docker, but if it is a easier and faster option , I can go with it.
Can it run on CentOS 6.x or it needs its own OS specifications and server?
Do I need to install Docker in this OS?
Can you refer me to a tutorial page on osrm docker i can check?

Thanks for your help.

@daniel-j-h
Copy link
Member

Check https://hub.docker.com/r/osrm/osrm-backend/ and the Quickstart / Using Docker section in the Readme.

For a recent C++ compiler / stdlib you probably need the CentOS devtool, but we don't have much experience with CentOS as said earlier. cc @rkcpi who has some experience here I think.

Maybe we should think about a CentOS Wiki page, this is coming up every now and then. And it's a bit a pain to setup.

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