Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

c++ - cmake osmium issues - how to compile in googles cloud shell?

I'm trying to familiarize myself with the osmium package for an upcoming project. I've got very little experience with Linux, C++, or command line installs. I'm trying to install and test osmium on a blank VM using googles virtual cloud shell. However, it doesnt seem to be working, and I don't understand why. I've followed the exact instructions on the osmium github, and the cloud shell is fully a blank slate before I try installing this. I've never used cmake before, so perhaps thats the problem?

I do notice this error in particular -

-- Found Osmium: /home/coreytdickinson/work/libosmium/include (found suitable version "2.16.0", minimum required is "2.16.0") 
-- Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR) 

Perhaps its has something to do with that? No idea really. This might be the answer to my questions, but I don't speak computer well enough to understand it.

Full error text below -

 Welcome to Cloud Shell! Type "help" to get started.
    To set your Cloud Platform project in this session use “gcloud config set project [PROJECT_ID]”
    coreytdickinson@cloudshell:~$ mkdir work
    coreytdickinson@cloudshell:~$ cd work
    coreytdickinson@cloudshell:~/work$ git clone https://github.com/mapbox/protozero
    Cloning into 'protozero'...
    remote: Enumerating objects: 3, done.
    remote: Counting objects: 100% (3/3), done.
    remote: Compressing objects: 100% (3/3), done.
    remote: Total 6183 (delta 0), reused 1 (delta 0), pack-reused 6180
    Receiving objects: 100% (6183/6183), 2.25 MiB | 18.11 MiB/s, done.
    Resolving deltas: 100% (4440/4440), done.
    coreytdickinson@cloudshell:~/work$ git clone https://github.com/osmcode/libosmium
    Cloning into 'libosmium'...
    remote: Enumerating objects: 6, done.
    remote: Counting objects: 100% (6/6), done.
    remote: Compressing objects: 100% (5/5), done.
    remote: Total 27039 (delta 0), reused 0 (delta 0), pack-reused 27033
    Receiving objects: 100% (27039/27039), 7.17 MiB | 23.39 MiB/s, done.
    Resolving deltas: 100% (20695/20695), done.
    coreytdickinson@cloudshell:~/work$ git clone https://github.com/osmcode/osmium-tool
    Cloning into 'osmium-tool'...
    remote: Enumerating objects: 519, done.
    remote: Counting objects: 100% (519/519), done.
    remote: Compressing objects: 100% (304/304), done.
    remote: Total 6587 (delta 333), reused 350 (delta 202), pack-reused 6068
    Receiving objects: 100% (6587/6587), 2.03 MiB | 12.70 MiB/s, done.
    Resolving deltas: 100% (4928/4928), done.
    coreytdickinson@cloudshell:~/work$ cd osmium-tool
    coreytdickinson@cloudshell:~/work/osmium-tool$ mkdir build
    coreytdickinson@cloudshell:~/work/osmium-tool$ cd build
    coreytdickinson@cloudshell:~/work/osmium-tool/build$ cmake ..
    -- The C compiler identification is GNU 8.3.0
    -- The CXX compiler identification is GNU 8.3.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMake Error at /usr/share/cmake-3.13/Modules/FindBoost.cmake:2100 (message):
      Unable to find the requested Boost libraries.
    
      Unable to find the Boost header files.  Please set BOOST_ROOT to the root
      directory containing Boost or BOOST_INCLUDEDIR to the directory containing
      Boost's headers.
    Call Stack (most recent call first):
      CMakeLists.txt:46 (find_package)
    
    
    -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
    -- Looking for pthread.h
    -- Looking for 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  
    -- Found Protozero: /home/coreytdickinson/work/protozero/include (found suitable version "1.7.0", minimum required is "1.6.3") 
    -- Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found version "2.2.6") 
    -- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.6") 
    -- Looking for BZ2_bzCompressInit
    -- Looking for BZ2_bzCompressInit - found
    -- Found Osmium: /home/coreytdickinson/work/libosmium/include (found suitable version "2.16.0", minimum required is "2.16.0") 
    -- Could NOT find LZ4 (missing: LZ4_LIBRARY LZ4_INCLUDE_DIR) 
    CMake Warning at CMakeLists.txt:62 (message):
      lz4 library not found, compiling without it
    
    
    -- Looking for cppcheck
    -- Looking for cppcheck - not found
    --   Build target 'cppcheck' will not be available
    -- Looking for iwyu_tool.py - not found
    --   Make target 'iwyu' will not be available
    -- Use C++ version: c++11
    -- Build Type: RelWithDebInfo
    -- Found Git: /usr/bin/git (found version "2.20.1") 
    -- Looking for pandoc
    -- Looking for pandoc - not found
    --   Manual pages will not be built
    -- Adding tests in add-locations-to-ways
    -- Adding tests in apply-changes
    -- Adding tests in cat
    -- Adding tests in changeset-filter
    -- Adding tests in check-refs
    -- No tests for create-locations-index command found
    -- Adding tests in derive-changes
    -- Adding tests in diff
    -- Adding tests in export
    -- Adding tests in extract
    -- Adding tests in fileinfo
    -- Adding tests in getid
    -- Adding tests in getparents
    -- Adding tests in merge
    -- Adding tests in merge-changes
    -- No tests for query-locations-index command found
    -- Adding tests in renumber
    -- No tests for show command found
    -- Adding tests in sort
    -- No tests for tags-count command found
    -- Adding tests in tags-filter
    -- Adding tests in time-filter
    -- Adding tests in formats
    -- Adding tests in help
    -- Adding tests in misc
    -- Looking for clang-tidy
    -- Looking for clang-tidy - not found
    --   Build target 'clang-tidy' will not be available.
    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly in the CMake files:
    Boost_INCLUDE_DIR (ADVANCED)
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/man
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/src
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/add-locations-to-ways
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/apply-changes
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat
       used as include directory in directory /home/coreytdickinson/work/osmium-tool/test/cat

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...