I tried configure&make Nominatim on rhel6.5 but Nominatim compiled whithout osm2pgsql. I also tried complied osm2pgql by handle with ./autogen, ./configure make and got many errors like:
collect2: ld returned 1 exit status make[1]: * [osm2pgsql] Error 1 make[1]: Leaving directory `/opt/Nominatim/osm2pgsql' make: * [all] Error 2
After local instalation boost-1.58 I got osm2pgsl but now when I trying ./setup.php like:
service postgresql-9.3 start && sudo -u nominatim -- ./utils/setup.php --osm-file maps/switzerland.osm.bz2 --all --threads 2 2>&1
I got error bellow:
Import /opt/Nominatim/osm2pgsql/osm2pgsql: error while loading shared libraries: libboost_filesystem-mt.so.1.58.0: cannot open shared object file: No such file or directory ERROR: Error executing external command: /opt/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 2507 -P 5432 -d nominatim /opt/Nominatim/maps/switzerland.osm.bz2 Error executing external command: /opt/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 2507 -P 5432 -d nominatim /opt/Nominatim/maps/switzerland.osm.bz2
Is there prepared osm2pgsql for rhel 6.5 or where I can find default.style for Nominatim like bases that use osm2pgsql by handle?
- autogen
./autogen.sh [root@nominatim osm2pgsql]# ./autogen.sh autoreconf: Entering directory
.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in
.'. libtoolize: copying file./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR,
m4'. libtoolize: copying filem4/libtool.m4' libtoolize: copying file
m4/ltoptions.m4' libtoolize: copying filem4/ltsugar.m4' libtoolize: copying file
m4/ltversion.m4' libtoolize: copying filem4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: Leaving directory
.'
- configure
[root@nominatim osm2pgsql]# ./configure checking whether to disable maintainer-specific portions of Makefiles... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for getpagesize... yes checking for working mmap... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for g++... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for a sed that does not truncate output... /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1966080 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for ar... ar checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for dlfcn.h... yes checking whether we are using the GNU C++ compiler... (cached) yes checking whether g++ accepts -g... (cached) yes checking dependency style of g++... (cached) gcc3 checking how to run the C++ preprocessor... g++ -E checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for lseek64... yes checking for posix_fallocate... yes checking for posix_fadvise... yes checking for sync_file_range... yes checking for fork... yes checking for xml2-config... /usr/bin/xml2-config checking for xml2 libraries... yes checking for zlib headers in /usr/include... found checking for zlib library... found checking for zlib compression library... yes checking for bzip2 headers in /usr/include... found checking for bzip2 library... found checking for bzip2 compression library... yes checking for geos-config... /usr/bin/geos-config checking for geos libraries... checking geos/version.h usability... yes checking geos/version.h presence... yes checking for geos/version.h... yes yes checking if geos version is >= 3.1... yes checking for proj headers in /usr/include... found checking for proj library... found checking for proj projection library... yes checking for protobuf-c 0.14... checking for protobuf_c headers in /usr/include... found checking for protobuf_c library... found checking for protobuf-c version >= 0.14... checking for ProtobufCFieldDescriptor.packed... yes protobuf-c >= 0.14: yes checking for protobuf-c usability... yes checking for protoc-c... /usr/bin/protoc-c checking for pg_config... /usr/bin/pg_config checking for PostgreSQL libraries... yes checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for boostlib >= 1.48... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem... yes checking whether the Boost::Thread library is available... yes checking for exit in -lboost_thread... yes checking for boostlib >= 1.53... yes checking for a Lua interpreter with version >= 5.0... lua checking for lua... /usr/bin/lua checking for lua version... 5.1 checking for lua platform... unknown checking for lua script directory... ${prefix}/share/lua/5.1 checking for lua module directory... ${exec_prefix}/lib/lua/5.1 checking if LUA_VERSION is defined... yes checking lua.h usability... yes checking lua.h presence... yes checking for lua.h... yes checking lualib.h usability... yes checking lualib.h presence... yes checking for lualib.h... yes checking lauxlib.h usability... yes checking lauxlib.h presence... yes checking for lauxlib.h... yes checking luaconf.h usability... yes checking luaconf.h presence... yes checking for luaconf.h... yes checking for Lua header version... 5.1 checking if Lua header version matches 5.1... yes checking if LUA_VERSION is defined... yes checking for library containing exp... -lm checking for library containing dlopen... -ldl checking for library containing lua_load... -llua-5.1 configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands
enter code here
- make out :
./.libs/libosm2pgsql.a(osmdata.o): In function
boost::thread::start_thread()': /usr/local/include/boost/thread/detail/thread.hpp:179: undefined reference to
boost::thread::start_thread_noexcept()' /usr/local/include/boost/thread/detail/thread.hpp:179: undefined reference toboost::thread::start_thread_noexcept()' ./.libs/libosm2pgsql.a(osmdata.o): In function
boost::thread::join()': /usr/local/include/boost/thread/detail/thread.hpp:767: undefined reference toboost::thread::join_noexcept()' ./.libs/libosm2pgsql.a(osmdata.o): In function
boost::thread::start_thread()': /usr/local/include/boost/thread/detail/thread.hpp:179: undefined reference to `boost::thread::start_thread_noexcept()' collect2: ld returned 1 exit status make[1]: * [osm2pgsql] Error 1 make: * [all] Error 2
undefined reference
could indicate a problem with the boost version you are using. Maybe an older version will work.