Skip to content

Compilation issue concerning zip #274

@jacobcroope

Description

@jacobcroope

I have been compiling osrm on 3 different systems and I consistently receive this notice. I tried to track it down and best I can come up with I am having a linking issue with the zip.h and definitions. Zip and all dependencies are installed on both systems following the wiki for both systems.

Ubuntu Server
Mac OSx 10.6

The compile built in debug.

scons: Reading SConscript files ...
Using default C++ Compiler: g++
Default platform
Checking for C++ library pthread... (cached) yes
Checking for C header file omp.h... (cached) yes
Checking for C++ library bz2... (cached) yes
Checking for C++ library png... (cached) yes
Checking for C++ library protobuf... (cached) yes
Checking for Protobuffer version >= 2.3.0... (cached) yes
Checking for C++ library stxxl... (cached) yes
Checking for C++ library xml2... (cached) yes
Checking for C++ library z... (cached) yes
Checking for Boost version >= 1.41... (cached) yes
Checking for C++ library boost_thread... (cached) yes
Checking for C++ library boost_regex... (cached) yes
Checking for C++ library boost_system... (cached) yes
Checking for C++ header file boost/archive/iterators/base64_from_binary.hpp... (cached) yes
Checking for C++ header file boost/archive/iterators/binary_from_base64.hpp... (cached) yes
Checking for C++ header file boost/archive/iterators/transform_width.hpp... (cached) yes
Checking for C++ header file boost/bind.hpp... (cached) yes
Checking for C++ header file boost/circular_buffer.hpp... (cached) yes
Checking for C++ header file boost/enable_shared_from_this.hpp... (cached) yes
Checking for C++ header file boost/foreach.hpp... (cached) yes
Checking for C++ header file boost/lexical_cast.hpp... (cached) yes
Checking for C++ header file boost/logic/tribool.hpp... (cached) yes
Checking for C++ header file boost/math/tr1.hpp... (cached) yes
Checking for C++ header file boost/noncopyable.hpp... (cached) yes
Checking for C++ header file boost/property_tree/ptree.hpp... (cached) yes
Checking for C++ header file boost/property_tree/ini_parser.hpp... (cached) yes
Checking for C++ header file boost/shared_ptr.hpp... (cached) yes
Checking for C++ header file boost/thread/mutex.hpp... (cached) yes
Checking for C++ header file boost/thread/thread.hpp... (cached) yes
Checking for C++ header file boost/thread/condition.hpp... (cached) yes
Checking for C++ header file boost/thread/thread.hpp... (cached) yes
Checking for C++ header file boost/thread.hpp... (cached) yes
Checking for C++ header file boost/tuple/tuple.hpp... (cached) yes
Checking for C++ header file boost/unordered_map.hpp... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o Algorithms/CRC32.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 Algorithms/CRC32.cpp
g++ -o Contractor/EdgeBasedGraphFactory.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 Contractor/EdgeBasedGraphFactory.cpp
protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto DataStructures/pbf-proto/fileformat.proto
g++ -o DataStructures/pbf-proto/fileformat.pb.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 DataStructures/pbf-proto/fileformat.pb.cc
protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto DataStructures/pbf-proto/osmformat.proto
g++ -o DataStructures/pbf-proto/osmformat.pb.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 DataStructures/pbf-proto/osmformat.pb.cc
g++ -o Descriptors/DescriptionFactory.o -c -O3 -DNDEBUG -march=native -fopenmp -DROUTED -I/usr/include -I/usr/include/include -I/usr/include/libxml2 Descriptors/DescriptionFactory.cpp
g++ -o Server/DataStructures/QueryObjectsStorage.o -c -O3 -DNDEBUG -march=native -fopenmp -DROUTED -I/usr/include -I/usr/include/include -I/usr/include/libxml2 Server/DataStructures/QueryObjectsStorage.cpp
g++ -o ThirdParty/PngImage.o -c -O3 -DNDEBUG -march=native -fopenmp -DROUTED -I/usr/include -I/usr/include/include -I/usr/include/libxml2 ThirdParty/PngImage.cc
ThirdParty/PngImage.cc: In member function 'bool PngImage::loadImage(const char_, bool)':
ThirdParty/PngImage.cc:186:39: warning: ignoring return value of 'size_t fread(void_, size_t, size_t, FILE_)', declared with attribute warn_unused_result [-Wunused-result]
g++ -o Util/NASAGridSquare.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 Util/NASAGridSquare.cpp
g++ -o createHierarchy.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 createHierarchy.cpp
g++ -o extractor.o -c -O3 -DNDEBUG -march=native -fopenmp -I/usr/include -I/usr/include/include -I/usr/include/libxml2 extractor.cpp
g++ -o osrm-extract -fopenmp extractor.o DataStructures/pbf-proto/fileformat.pb.o DataStructures/pbf-proto/osmformat.pb.o Util/NASAGridSquare.o -lpthread -lbz2 -lpng -lprotobuf -lstxxl -lxml2 -lz -lboost_thread -lboost_regex -lboost_system
Util/NASAGridSquare.o: In function NasaGridSquare::load(char const_)': NASAGridSquare.cpp:(.text+0x498): undefined reference to zip_open'
NASAGridSquare.cpp:(.text+0x4b1): undefined reference tozip_get_num_files' NASAGridSquare.cpp:(.text+0x5d1): undefined reference to zip_stat_index'
NASAGridSquare.cpp:(.text+0x8e2): undefined reference tozip_fopen_index' NASAGridSquare.cpp:(.text+0x902): undefined reference to zip_file_error_get'
NASAGridSquare.cpp:(.text+0x925): undefined reference tozip_fread' NASAGridSquare.cpp:(.text+0x92d): undefined reference to zip_fclose'
NASAGridSquare.cpp:(.text+0x935): undefined reference tozip_close' NASAGridSquare.cpp:(.text+0xb4a): undefined reference to zip_error_to_str'
collect2: ld returned 1 exit status
scons: *** [osrm-extract] Error 1
scons: building terminated

I can't extract my data without a zip library.
Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions