Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.46k stars 3.42k forks source link

Running on SmartOS / Illumos / Solaris #776

Closed jmealo closed 10 years ago

jmealo commented 11 years ago

Hello,

I've been working on getting Project-OSRM to run on SmartOS. Last week I was able to successfully compile it, however, when I tried to run ./osrm-prepare on a small metro dataset (pbf and xml format) I got a core dump.

The input file was: http://osm-extracted-metros.s3.amazonaws.com/philadelphia.osm.pbf

Examining the core with mdb

[root@build ~/build/Project-OSRM/build]# ./osrm-prepare philadelphia.osm.pbf 
[info] Input file: philadelphia.osm.pbf
[info] Restrictions file: philadelphia.osm.pbf.restrictions
[info] Profile: profile.lua
[info] Threads: 8
Segmentation Fault (core dumped)
[root@build ~/build/Project-OSRM/build]# mdb core 
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> $C
00000000fefdf7f0 lj_obj_equal()
ffff000000653d60 0xfffffff3fefe0a00()
> 

Using dtrace to monitor function calls up until the time of the crash provided 4.6MB of function calls (http://thispos.com/function_calls), this is the tail end just before the crash:

5  80318 _ZN7luabind12_GLOBAL__N_113push_gc_udataINS_6detail14class_registryEP9lua_StateEEvS5_PvT0_:entry 
  3  93970            spin_lock_clear:entry 
  3  93990                    preempt:entry 
  5  80322 _ZN7luabind12_GLOBAL__N_115create_gc_udataINS_6detail14class_registryEEEPvP9lua_StateS4_:entry 
  3  93648                   sem_post:entry 
  3  93645                sem_invalid:entry 
  5  78110            lua_newuserdata:entry 
  3  93907                  sema_post:entry 
  3  93972                 queue_lock:entry 
  5  78624               lj_udata_new:entry 
  3  93969              spin_lock_set:entry 
  5  78596             lj_mem_realloc:entry 
  3  93989                 no_preempt:entry 
  3  93973               queue_unlock:entry 
  5  78270                 lj_alloc_f:entry 
  3  93970            spin_lock_clear:entry 
  5  78265            lj_alloc_malloc:entry 
  3  93990                    preempt:entry 
  3  91405              gomp_sem_wait:entry 
  5  78106            lua_createtable:entry 
  3  93649                   sem_wait:entry 
  5  78607                 lj_tab_new:entry 
  3  93645                sem_invalid:entry 
  5  78605                     newtab:entry 
  3  93903                  sema_wait:entry 
  5  78602              lj_mem_newgco:entry 
  3  93902             sema_wait_impl:entry 
  5  78270                 lj_alloc_f:entry 
  3  93718                  _cancelon:entry 
  5  78265            lj_alloc_malloc:entry 
  3  93972                 queue_lock:entry 
  5  78596             lj_mem_realloc:entry 
  3  93969              spin_lock_set:entry 
  5  78270                 lj_alloc_f:entry 
  3  93989                 no_preempt:entry 
  5  78265            lj_alloc_malloc:entry 
  3  93974                    enqueue:entry 
  5  78103           lua_pushcclosure:entry 
  3  93725           set_parking_flag:entry 
  3  93973               queue_unlock:entry 
  3  93970            spin_lock_clear:entry 
  5  78006               lj_func_newC:entry 
  5  78602              lj_mem_newgco:entry 
  3  93990                    preempt:entry 
  5  78270                 lj_alloc_f:entry 
  3  94190                 __lwp_park:entry 
  5  78265            lj_alloc_malloc:entry 
  5  78125               lua_setfield:entry 
  5  78058                  index2adr:entry 
  5  91801                     strlen:entry 
  3  93725           set_parking_flag:entry 
  3  93972                 queue_lock:entry 
  3  93969              spin_lock_set:entry 
  3  93989                 no_preempt:entry 
  3  93979                    dequeue:entry 
  3  93977                 queue_slot:entry 
  3  93978               queue_unlink:entry 
  3  93989                 no_preempt:entry 
  3  93973               queue_unlock:entry 
  3  93970            spin_lock_clear:entry 
  3  93990                    preempt:entry 
  3  94191               __lwp_unpark:entry 
  5  77992                 lj_str_new:entry 
  5  78632               lj_meta_tset:entry 
  3  93990                    preempt:entry 
  5  78613                 lj_tab_get:entry 
  3  93720        _canceloff_nocancel:entry 
  5  78612              lj_tab_getstr:entry 
  3  75819 _ZN20ScriptingEnvironmentC2EPKc._omp_fn.0:entry 
  5  78615              lj_tab_newkey:entry 
  3  91358         omp_get_thread_num:entry 
  0  93725           set_parking_flag:entry 
  3  91622       __emutls_get_address:entry 
  5  78604                    hashkey:entry 
  0  93972                 queue_lock:entry 
  3  94171        pthread_getspecific:entry 
  5  78128           lua_setmetatable:entry 
  0  93969              spin_lock_set:entry 
  3  75815 _ZN20ScriptingEnvironment22getLuaStateForThreadIDEi:entry 
  5  78058                  index2adr:entry 
  0  93989                 no_preempt:entry 
  3  75968 _ZNSt6vectorIP9lua_StateSaIS1_EEixEm:entry 
  3  80317 _ZN7luabind4openEP9lua_State:entry 
  5  79665 _Z11lua_rawsetpP9lua_StateiPv:entry 
  3  78108             lua_pushthread:entry 
  5  78105      lua_pushlightuserdata:entry 
  3  78064                 lua_settop:entry 
  0  93979                    dequeue:entry 
  3  80318 _ZN7luabind12_GLOBAL__N_113push_gc_udataINS_6detail14class_registryEP9lua_StateEEvS5_PvT0_:entry 
  5  78066                 lua_insert:entry 
  3  80322 _ZN7luabind12_GLOBAL__N_115create_gc_udataINS_6detail14class_registryEEEPvP9lua_StateS4_:entry 
  0  93977                 queue_slot:entry 
  3  78110            lua_newuserdata:entry 
  5  78126                 lua_rawset:entry 
  5  78058                  index2adr:entry 
  3  78624               lj_udata_new:entry 
  0  93978               queue_unlink:entry 
  3  78596             lj_mem_realloc:entry 
  5  78614                 lj_tab_set:entry 
  0  93989                 no_preempt:entry 
  5  78604                    hashkey:entry 
  0  93973               queue_unlock:entry 
  3  78270                 lj_alloc_f:entry 
  0  93970            spin_lock_clear:entry 
  3  78265            lj_alloc_malloc:entry 
  5  77987               lj_obj_equal:entry 
  0  93990                    preempt:entry 
  3  78106            lua_createtable:entry 
  3  78607                 lj_tab_new:entry 
  3  78605                     newtab:entry 
  0  94191               __lwp_unpark:entry 
  3  78602              lj_mem_newgco:entry 
  3  78270                 lj_alloc_f:entry 
  3  78265            lj_alloc_malloc:entry 
  3  78596             lj_mem_realloc:entry 
  3  78270                 lj_alloc_f:entry 
  3  78265            lj_alloc_malloc:entry 
  0  93990                    preempt:entry 
  3  78103           lua_pushcclosure:entry 
  3  78006               lj_func_newC:entry 
  3  78602              lj_mem_newgco:entry 
  0  93720        _canceloff_nocancel:entry 
  0  75819 _ZN20ScriptingEnvironmentC2EPKc._omp_fn.0:entry

Here is my cmake/make output:

[root@build ~/build/Project-OSRM/build]# cmake .. -DLUABIND_LIBRARY=/usr/local/lib/libluabind09.a -DPROTOBUF_LIBRARY=/usr/local/lib/amd64/libprotobuf.so -DSTXXL_LIBRARY=../../stxxl-1.3.1/lib/libstxxl.a
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- System supports 64 bits.
-- Configuring OSRM in release mode
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   system
--   thread
-- Found BZip2: /usr/local/lib/libbz2.a 
-- Looking for BZ2_bzCompressInit in /usr/local/lib/libbz2.a
-- Looking for BZ2_bzCompressInit in /usr/local/lib/libbz2.a - found
-- Found ZLIB: /opt/local/lib/libz.so (found version "1.2.7")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Found Threads: TRUE 
-- Found LibXml2: /opt/local/lib/libxml2.so 
-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind09.a 
-- Found Luabind: /usr/local/lib/libluabind09.a
-- Found PROTOBUF: /usr/local/lib/amd64/libprotobuf.so 
-- Looking for STXXL...
-- Found STXXL: /root/build/stxxl-1.3.1/lib/libstxxl.a 
-- Found STXXL: /root/build/stxxl-1.3.1/lib/libstxxl.a
-- Looking for OSMPBF...
-- Found OSMPBF: /opt/local/lib/libosmpbf.a 
-- Found OSMPBF: /opt/local/lib/libosmpbf.a
-- Configuring done
-- Generating done
-- Build files have been written to: /root/build/Project-OSRM/build
[root@build ~/build/Project-OSRM/build]# ls
CMakeCache.txt  CMakeFiles  CMakeTmp  Makefile  cmake_install.cmake
[root@build ~/build/Project-OSRM/build]# cd ..
[root@build ~/build/Project-OSRM]# ls
Algorithms      DataStructures  Extractor     LICENCE.TXT  README.md          Server  build         config               features     routed.cpp  win
CMakeLists.txt  Descriptors     Gemfile       Library      Rakefile           Tools   build.backup  createHierarchy.cpp  profile.lua  test
Contractor      Docs            Gemfile.lock  Plugins      RoutingAlgorithms  Util    cmake         extractor.cpp        profiles     typedefs.h
[root@build ~/build/Project-OSRM]# nano CMakeLists.txt 
[root@build ~/build/Project-OSRM]# cd build
[root@build ~/build/Project-OSRM/build]# ls
CMakeCache.txt  CMakeFiles  CMakeTmp  Makefile  cmake_install.cmake
[root@build ~/build/Project-OSRM/build]# rm -rf *
[root@build ~/build/Project-OSRM/build]# cmake .. -DLUABIND_LIBRARY=/usr/local/lib/libluabind09.a -DPROTOBUF_LIBRARY=/usr/local/lib/amd64/libprotobuf.so -DSTXXL_LIBRARY=../../stxxl-1.3.1/lib/libstxxl.a
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- System supports 64 bits.
-- Configuring OSRM in release mode
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   filesystem
--   program_options
--   regex
--   system
--   thread
-- Found BZip2: /usr/local/lib/libbz2.a 
-- Looking for BZ2_bzCompressInit in /usr/local/lib/libbz2.a
-- Looking for BZ2_bzCompressInit in /usr/local/lib/libbz2.a - found
-- Found ZLIB: /opt/local/lib/libz.so (found version "1.2.7")
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Found Threads: TRUE 
-- Found LibXml2: /opt/local/lib/libxml2.so 
-- Looking for LuaJIT...
-- Found LuaJIT: /usr/local/lib/libluajit-5.1.a;/usr/lib/64/libm.so 
-- Found LuaJIT: /usr/local/lib/libluajit-5.1.a
-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind09.a 
-- Found Luabind: /usr/local/lib/libluabind09.a
-- Found PROTOBUF: /usr/local/lib/amd64/libprotobuf.so 
-- Looking for STXXL...
-- Found STXXL: /root/build/stxxl-1.3.1/lib/libstxxl.a 
-- Found STXXL: /root/build/stxxl-1.3.1/lib/libstxxl.a
-- Looking for OSMPBF...
-- Found OSMPBF: /opt/local/lib/libosmpbf.a 
-- Found OSMPBF: /opt/local/lib/libosmpbf.a
-- Configuring done
CMake Warning at CMakeLists.txt:38 (add_executable):
  Cannot generate a safe runtime search path for target osrm-extract because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libz.so.1] in /opt/local/lib may be hidden by files in:
      /usr/lib/64
    runtime library [libxml2.so.2] in /opt/local/lib may be hidden by files in:
      /usr/lib/64

  Some of these libraries may not be found correctly.

-- Generating done
-- Build files have been written to: /root/build/Project-OSRM/build
[root@build ~/build/Project-OSRM/build]# make -j8
Scanning dependencies of target UUIDConfigure
Scanning dependencies of target OSRM
[  4%] Configuring UUID.cpp
[  4%] Built target UUIDConfigure
Scanning dependencies of target UUID
[  9%] Configuring UUID.cpp
[ 13%] Building CXX object CMakeFiles/UUID.dir/Util/UUID.cpp.o
Linking CXX static library libUUID.a
[ 13%] Built target UUID
Scanning dependencies of target osrm-extract
Scanning dependencies of target osrm-prepare
[ 18%] [ 22%] [ 27%] [ 31%] Building CXX object CMakeFiles/osrm-prepare.dir/createHierarchy.cpp.o
Building CXX object CMakeFiles/osrm-prepare.dir/Util/GitDescription.cpp.o
Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/EdgeBasedGraphFactory.cpp.o
Building CXX object CMakeFiles/osrm-prepare.dir/Contractor/TemporaryStorage.cpp.o
[ 36%] [ 40%] [ 45%] [ 50%] Building CXX object CMakeFiles/OSRM.dir/Library/OSRM.cpp.o
Building CXX object CMakeFiles/OSRM.dir/Descriptors/DescriptionFactory.cpp.o
Building CXX object CMakeFiles/OSRM.dir/DataStructures/SearchEngine.cpp.o
Building CXX object CMakeFiles/OSRM.dir/DataStructures/SearchEngineData.cpp.o
[ 54%] Building CXX object CMakeFiles/osrm-extract.dir/extractor.cpp.o
[ 59%] Building CXX object CMakeFiles/OSRM.dir/Server/DataStructures/QueryObjectsStorage.cpp.o
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/Contractor/EdgeBasedGraphFactory.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/DataStructures/../Server/DataStructures/../../DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/DataStructures/../Server/DataStructures/../../DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/DataStructures/../Server/DataStructures/../../DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/DataStructures/../Server/DataStructures/QueryObjectsStorage.h:35,
                 from /root/build/Project-OSRM/DataStructures/SearchEngineData.h:31,
                 from /root/build/Project-OSRM/DataStructures/SearchEngineData.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/Library/../Plugins/LocatePlugin.h:32,
                 from /root/build/Project-OSRM/Library/OSRM.h:35,
                 from /root/build/Project-OSRM/Library/OSRM.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Descriptors/../DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Descriptors/../DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/Descriptors/../DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/Descriptors/../DataStructures/SearchEngine.h:32,
                 from /root/build/Project-OSRM/Descriptors/DescriptionFactory.h:34,
                 from /root/build/Project-OSRM/Descriptors/DescriptionFactory.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/DataStructures/SearchEngine.h:32,
                 from /root/build/Project-OSRM/DataStructures/SearchEngine.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/extractor.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/extractor.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/extractor.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/createHierarchy.cpp:30:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
[ 63%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractionContainers.cpp.o
[ 68%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ExtractorCallbacks.cpp.o
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Extractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.h:34,
                 from /root/build/Project-OSRM/extractor.cpp:30:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Server/DataStructures/../../DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Server/DataStructures/../../DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/Server/DataStructures/../../DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/Server/DataStructures/QueryObjectsStorage.h:35,
                 from /root/build/Project-OSRM/Server/DataStructures/QueryObjectsStorage.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
[ 72%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/ScriptingEnvironment.cpp.o
[ 77%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/PBFParser.cpp.o
[ 81%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/XMLParser.cpp.o
Linking CXX shared library libOSRM.so
[ 81%] Built target OSRM
[ 86%] Building CXX object CMakeFiles/osrm-extract.dir/Extractor/BaseParser.cpp.o
[ 90%] Building CXX object CMakeFiles/osrm-extract.dir/Util/GitDescription.cpp.o
Scanning dependencies of target osrm-routed
[ 95%] Building CXX object CMakeFiles/osrm-routed.dir/routed.cpp.o
Linking CXX executable osrm-prepare
ld: warning: file /lib/amd64/libm.so: linked to /usr/lib/64/libm.so: attempted multiple inclusion of file
[ 95%] Built target osrm-prepare
[100%] Building CXX object CMakeFiles/osrm-routed.dir/Util/GitDescription.cpp.o
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Extractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.h:34,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Extractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.h:34,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:32,
                 from /root/build/Project-OSRM/Extractor/PBFParser.h:31,
                 from /root/build/Project-OSRM/Extractor/PBFParser.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/bits/common/utils.h:28:0,
                 from /opt/local/include/include/stxxl.h:16,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.cpp:28:
/opt/local/include/include/stxxl/bits/common/types.h:36:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/opt/local/include/include/stxxl/bits/common/types.h:37:1: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /opt/local/include/include/stxxl/bits/io/io.h:17:0,
                 from /opt/local/include/include/stxxl/io:13,
                 from /opt/local/include/include/stxxl.h:18,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.cpp:28:
/opt/local/include/include/stxxl/bits/io/file.h:120:22: warning: comma at end of enumerator list [-pedantic]
In file included from /opt/local/include/include/stxxl/stack:13:0,
                 from /opt/local/include/include/stxxl.h:23,
                 from /root/build/Project-OSRM/Extractor/ExtractionContainers.h:39,
                 from /root/build/Project-OSRM/Extractor/ExtractorCallbacks.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:31,
                 from /root/build/Project-OSRM/Extractor/BaseParser.cpp:28:
/opt/local/include/include/stxxl/bits/containers/stack.h:269:37: warning: comma at end of enumerator list [-pedantic]
/opt/local/include/include/stxxl/bits/containers/stack.h:464:37: warning: comma at end of enumerator list [-pedantic]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Extractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.h:34,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:32,
                 from /root/build/Project-OSRM/Extractor/XMLParser.h:31,
                 from /root/build/Project-OSRM/Extractor/XMLParser.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Extractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Extractor/ScriptingEnvironment.h:34,
                 from /root/build/Project-OSRM/Extractor/BaseParser.h:32,
                 from /root/build/Project-OSRM/Extractor/BaseParser.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
In file included from /usr/local/include/luabind/make_function.hpp:11:0,
                 from /usr/local/include/luabind/function.hpp:9,
                 from /usr/local/include/luabind/class.hpp:89,
                 from /usr/local/include/luabind/luabind.hpp:27,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/../Contractor/../Util/LuaUtil.h:38,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/../Contractor/EdgeBasedGraphFactory.h:42,
                 from /root/build/Project-OSRM/Library/../Plugins/../DataStructures/NodeInformationHelpDesk.h:35,
                 from /root/build/Project-OSRM/Library/../Plugins/LocatePlugin.h:32,
                 from /root/build/Project-OSRM/Library/OSRM.h:35,
                 from /root/build/Project-OSRM/routed.cpp:28:
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
Linking CXX executable osrm-extract
ld: warning: file /lib/amd64/libm.so: linked to /usr/lib/64/libm.so: attempted multiple inclusion of file
[100%] Built target osrm-extract
Linking CXX executable osrm-routed
[100%] Built target osrm-routed
emiltin commented 11 years ago

Might be a Lua/threads issue?

What happens if you run some of the cucumber tests? See https://github.com/DennisOSRM/Project-OSRM/wiki/Cucumber-Test-Suite. For example "cucumber -t @smallest" to run a simple scenario.

DennisOSRM commented 11 years ago

One possible direction is to a) use the latest source from develop build and b) to run the binaries under GDB (or LLDB) and look at the stack trace when it crashes. To get reasonable output, compile debug binaries by adding -DCMAKE_BUILD_TYPE=1 to the cmake call.

jmealo commented 11 years ago

Thanks for the quick replies!

@emiltin I'm unable to run the tests as sysctl.h isn't available so I can't install sys-proctable (gem install sys-proctable --platform sunos doesn't even work). Not sure if there's a way to get around this.

@DennisOSRM I'm giving that a try now.

jmealo commented 11 years ago

Just a quick dtrace with the -DCMAKE_BUILD_TYPE=1 reveals different patterns for --threads=1 and 8 threads (autodetected).

8 threads:

 14  75819 _ZN20ScriptingEnvironmentC2EPKc._omp_fn.0:entry
  1  78632               lj_meta_tset:entry
 10  78270                 lj_alloc_f:entry
  1  78613                 lj_tab_get:entry
 10  78265            lj_alloc_malloc:entry
 14  91367         omp_get_thread_num:entry
  1  78612              lj_tab_getstr:entry
  1  78615              lj_tab_newkey:entry
 14  91631       __emutls_get_address:entry
 10  78125               lua_setfield:entry
  1  78604                    hashkey:entry
  1  78128           lua_setmetatable:entry
 14  94180        pthread_getspecific:entry
 10  78058                  index2adr:entry
  1  78058                  index2adr:entry
 14  75815 _ZN20ScriptingEnvironment22getLuaStateForThreadIDEi:entry
  1  79665 _Z11lua_rawsetpP9lua_StateiPv:entry
 14  75968 _ZNSt6vectorIP9lua_StateSaIS1_EEixEm:entry
 10  91810                     strlen:entry
  1  78105      lua_pushlightuserdata:entry
 14  80317 _ZN7luabind4openEP9lua_State:entry
  1  78066                 lua_insert:entry
 10  77992                 lj_str_new:entry
  1  78126                 lua_rawset:entry
 14  78108             lua_pushthread:entry
  3  93734           set_parking_flag:entry
  1  78058                  index2adr:entry
 10  78632               lj_meta_tset:entry
 14  78064                 lua_settop:entry
  1  78614                 lj_tab_set:entry
  3  93981                 queue_lock:entry
  1  78604                    hashkey:entry
 10  78613                 lj_tab_get:entry
 14  80318 _ZN7luabind12_GLOBAL__N_113push_gc_udataINS_6detail14class_registryEP9lua_StateEEvS5_PvT0_:entry
  3  93978              spin_lock_set:entry
  1  77987               lj_obj_equal:entry
 10  78612              lj_tab_getstr:entry
  3  93998                 no_preempt:entry
 10  78615              lj_tab_newkey:entry
 10  78604                    hashkey:entry

Single thread:

 15  80318 _ZN7luabind12_GLOBAL__N_113push_gc_udataINS_6detail14class_registryEP9lua_StateEEvS5_PvT0_:entry
  4  78128           lua_setmetatable:entry
  4  78058                  index2adr:entry
  2  93734           set_parking_flag:entry
 15  80322 _ZN7luabind12_GLOBAL__N_115create_gc_udataINS_6detail14class_registryEEEPvP9lua_StateS4_:entry
 15  78110            lua_newuserdata:entry
  2  93982               queue_unlock:entry
  4  79665 _Z11lua_rawsetpP9lua_StateiPv:entry
  2  93979            spin_lock_clear:entry
 15  78624               lj_udata_new:entry
  4  78105      lua_pushlightuserdata:entry
  2  93999                    preempt:entry
  4  78066                 lua_insert:entry
  2  94199                 __lwp_park:entry
  4  78126                 lua_rawset:entry
  4  78058                  index2adr:entry
  4  78614                 lj_tab_set:entry
  4  78604                    hashkey:entry
 15  78596             lj_mem_realloc:entry
  4  77987               lj_obj_equal:entry
 15  78270                 lj_alloc_f:entry
 15  78265            lj_alloc_malloc:entry
 14  93734           set_parking_flag:entry
 15  78106            lua_createtable:entry
 15  78607                 lj_tab_new:entry
 14  93981                 queue_lock:entry
 15  78605                     newtab:entry
 14  93978              spin_lock_set:entry
 15  78602              lj_mem_newgco:entry
 15  78270                 lj_alloc_f:entry
 14  93998                 no_preempt:entry
 15  78265            lj_alloc_malloc:entry
 15  78596             lj_mem_realloc:entry
 14  93988                    dequeue:entry
 15  78270                 lj_alloc_f:entry
 14  93986                 queue_slot:entry
 15  78265            lj_alloc_malloc:entry
 14  93987               queue_unlink:entry
 15  78103           lua_pushcclosure:entry
 14  93998                 no_preempt:entry
 14  93982               queue_unlock:entry
 15  78006               lj_func_newC:entry
 15  78602              lj_mem_newgco:entry
 14  93979            spin_lock_clear:entry
 15  78270                 lj_alloc_f:entry
 14  93999                    preempt:entry
 15  78265            lj_alloc_malloc:entry
 14  94200               __lwp_unpark:entry
 15  78125               lua_setfield:entry
 15  78058                  index2adr:entry
DennisOSRM commented 11 years ago

also, make sure that the profiles directory is in the same directory as your binaries.

jmealo commented 11 years ago

When using mdb (similar to gdb) this is the output I get. I do have the profiles directory in my build folder where I'm running the program from:

[root@build ~/build/Project-OSRM/build]# mdb osrm-extract

::run philadelphia.osm.pbf [info] Input file: philadelphia.osm.pbf [info] Profile: profile.lua [info] Threads: 8 [info] Using script profile.lua mdb: stop on SIGSEGV mdb: target stopped at: lj_obj_equal: movl 0x4(%rdi),%edx ::run philadelphia.osm.pbf --threads=1 [info] Input file: philadelphia.osm.pbf [info] Profile: profile.lua [info] Threads: 1 [info] Using script profile.lua mdb: stop on SIGSEGV mdb: target stopped at: lj_obj_equal: movl 0x4(%rdi),%edx

emiltin commented 11 years ago

The sys-proctable gem is not required for running tests. It's used by some Rake tasks, but they're not involved when running cucumber tests.

jmealo commented 11 years ago

@emiltin, the tests didn't go so well. The core dumps seem to be unrelated to input.

249 scenarios (247 failed, 2 passed) 904 steps (247 failed, 1 skipped, 656 passed) 3m27.617s

Full output is at: http://thispos.com/test.output

emiltin commented 11 years ago

You can run a single test, for example "cucumber -t @smallest". Additional info will be in test/fail.log. But looking at your output, it looks like it's also osrm-extract failing when running the tests.

jmealo commented 11 years ago

Agreed. What's my next step for continuing to troubleshoot this? SmartOS is an ideal platform for running OSRM.

emiltin commented 11 years ago

You build output includes warnings of this type:

/usr/local/include/luabind/detail/format_signature.hpp:87:5: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]

What version of gcc do you use?

jmealo commented 11 years ago

Here is my output for gcc -v

Using built-in specs.
COLLECT_GCC=/opt/local/gcc47/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/lto-wrapper
Target: x86_64-sun-solaris2.11
Configured with: ../gcc-4.7.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --enable-__cxa_atexit --with-gxx-include-dir=/opt/local/gcc47/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc47 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc47/info --mandir=/opt/local/gcc47/man
Thread model: posix
gcc version 4.7.3 (GCC)

Of particular interest, I see the flag "--enable-long-long"

DennisOSRM commented 10 years ago

Any updates?

jmealo commented 10 years ago

@DennisOSRM I'm going to give this another go today, will post updates. I'll also be trying node-osrm as well. Whichever compiles first wins as they both suit my needs well. Keep up the good work!

DennisOSRM commented 10 years ago

Ok cool. Please report here if you have any results.

jmealo commented 10 years ago

I didn't get to spend as much time on it as I had hoped.

[root@build ~/Project-OSRM]# mkdir -p build; cd build; cmake ..; make
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /opt/local/bin/cc
-- Check for working C compiler: /opt/local/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- Performing Test HAS_LTO_FLAG
-- Performing Test HAS_LTO_FLAG - Success
-- Performing Test HAS_LTO_PARTITION_FLAG
-- Performing Test HAS_LTO_PARTITION_FLAG - Success
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   program_options
--   regex
--   system
--   thread
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
ERROR: Intel TBB NOT found!
-- Looked for Threading Building Blocks in /opt/intel/tbb;/usr/local/include;/usr/include
CMake Error at cmake/FindTBB.cmake:272 (message):
  Could NOT find TBB library.
Call Stack (most recent call first):
  CMakeLists.txt:191 (find_package)

I ran into an issue with TBB. I downloaded it and tried placing the contents of the include folder in any of the paths that cmake said it looked in. This didn't work. I tried running make on the library (You have to pass compiler=gcc or it fails entirely.) Once I got past that, this happens when running make compiler=gcc:

make[1]: Leaving directory '/root/Project-OSRM/tbb42_20140601oss/build/SunOS_intel64_gcc_cc4.7.3_kernel5.11_release'
make -C "../build/SunOS_intel64_gcc_cc4.7.3_kernel5.11_release"  -r -f ../../build/Makefile.test cfg=release
make[1]: Entering directory '/root/Project-OSRM/tbb42_20140601oss/build/SunOS_intel64_gcc_cc4.7.3_kernel5.11_release'
g++  -o test_mutex.o -c -MMD -O2 -DUSE_PTHREAD -m64  -DTEST_USES_TBB=1 -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra    -I../../src -I../../src/rml/include -I../../include -I. ../../src/test/test_mutex.cpp
In file included from ../../src/test/test_mutex.cpp:562:0:
../../src/test/harness_tsx.h: In function 'bool have_TSX()':
../../src/test/harness_tsx.h:58:9: error: expected unqualified-id before numeric constant
../../src/test/harness_tsx.h:70:29: error: lvalue required in asm statement
../../src/test/harness_tsx.h:70:29: error: invalid lvalue in asm output 0
../../build/common_rules.inc:85: recipe for target 'test_mutex.o' failed
make[1]: *** [test_mutex.o] Error 1
make[1]: Leaving directory '/root/Project-OSRM/tbb42_20140601oss/build/SunOS_intel64_gcc_cc4.7.3_kernel5.11_release'
Makefile:116: recipe for target 'tbb_test_release_no_depends' failed
make: *** [tbb_test_release_no_depends] Error 2
[root@build ~/Project-OSRM/tbb42_20140601oss/src]# 

gcc -v output

Using built-in specs.
COLLECT_GCC=/opt/local/gcc47/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/lto-wrapper
Target: x86_64-sun-solaris2.11
Configured with: ../gcc-4.7.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --enable-__cxa_atexit --with-gxx-include-dir=/opt/local/gcc47/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc47 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc47/info --mandir=/opt/local/gcc47/man
Thread model: posix
gcc version 4.7.3 (GCC) 
make compiler=gcc tbb

Succeeds without issue.

jmealo commented 10 years ago

I don't think this has anything to do with it, but I can't be sure: https://github.com/DennisOSRM/Project-OSRM/blob/master/cmake/FindTBB.cmake#L118