leveldbとcmakeを最新版にアップデートする

その買うを、もっとハッピーに。|ハピタス

-DUSE_OPENCV=ONでcaffe2をインストールしようとしてleveldb <= v1.19でない場合、leveldbをアップグレードする必要があることは言うまでもない。

スポンサーリンク

leveldbをアプデする

cd
/root
!git clone https://github.com/google/leveldb.git
Cloning into 'leveldb'...
remote: Counting objects: 2029, done.
remote: Total 2029 (delta 0), reused 0 (delta 0), pack-reused 2029
Receiving objects: 100% (2029/2029), 1.13 MiB | 1.40 MiB/s, done.
Resolving deltas: 100% (1370/1370), done.
Checking connectivity... done.
cd leveldb
/root/leveldb
!mkdir -p build
cd build
/root/leveldb/build
!cmake -DCMAKE_BUILD_TYPE=Release ..
CMake Error at CMakeLists.txt:5 (cmake_minimum_required):
  CMake 3.9 or higher is required.  You are running version 3.5.1


-- Configuring incomplete, errors occurred!

CMake Errorが出たので、CMakeをアップデートする。

スポンサーリンク

CMakeをアップデートする。

%download https://cmake.org/files/v3.12/cmake-3.12.1.tar.gz
Downloaded 'cmake-3.12.1.tar.gz'.
!tar -xzvf cmake-3.12.1.tar.gz
cd cmake-3.12.1
/root/cmake-3.12.1
!./bootstrap
!make -j16 install
!ldconfig
!cmake --version
cmake version 3.12.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
cd
/root
!rm -rf cmake-3.12.1.tar.gz

cmakeが最新バージョンにアプデされたので続きをやる。

スポンサーリンク

leveldbのアップデートに続き

cd leveldb/build
/root/leveldb/build
!cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for crc32c_value in crc32c
-- Looking for crc32c_value in crc32c - not found
-- Looking for snappy_compress in snappy
-- Looking for snappy_compress in snappy - found
-- Looking for malloc in tcmalloc
-- Looking for malloc in tcmalloc - not found
-- Looking for fdatasync
-- Looking for fdatasync - not found
-- Performing Test HAVE_CLANG_THREAD_SAFETY
-- Performing Test HAVE_CLANG_THREAD_SAFETY - Failed
-- Performing Test HAVE_CXX17_HAS_INCLUDE
-- Performing Test HAVE_CXX17_HAS_INCLUDE - Success
-- 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  
-- Looking for sqlite3_open in sqlite3
-- Looking for sqlite3_open in sqlite3 - found
-- Performing Test HAVE_KYOTOCABINET
-- Performing Test HAVE_KYOTOCABINET - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /root/leveldb/build
!make -j16 install
!ldconfig
参考サイトhttps://github.com/

スポンサーリンク
スポンサーリンク