Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error with rocksdb Compilation failed #223

Open
mpkuse opened this issue Nov 16, 2018 · 1 comment
Open

Linking error with rocksdb Compilation failed #223

mpkuse opened this issue Nov 16, 2018 · 1 comment

Comments

@mpkuse
Copy link

mpkuse commented Nov 16, 2018

I am trying to install TheiaSfM. CMake revealed I didn't have rocksdb so installed it

git clone https://github.com/facebook/rocksdb

git checkout v5.9.2
make -j 12 static_lib
make install


This worked fine. Now as I build TheiaSfM, 

cmake -DCMAKE_BUILD_TYPE=Release .. # OK!
make -j 12


I get this error:
Alternately is there a way to compile TheiaSfM without rocksdb? 

[ 42%] Linking CXX executable ../../bin/five_point_relative_pose_test
/usr/bin/ld: /usr/local/lib/librocksdb.a(format.o): undefined reference to symbol 'BZ2_bzDecompressEnd'
//lib/x86_64-linux-gnu/libbz2.so.1.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/image_test.dir/build.make:169: recipe for target 'bin/image_test' failed
make[2]: *** [bin/image_test] Error 1
CMakeFiles/Makefile2:1476: recipe for target 'src/theia/CMakeFiles/image_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/image_test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/exhaustive_sampler_test.dir/build.make:169: recipe for target 'bin/exhaustive_sampler_test' failed
make[2]: *** [bin/exhaustive_sampler_test] Error 1
CMakeFiles/Makefile2:1431: recipe for target 'src/theia/CMakeFiles/exhaustive_sampler_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/exhaustive_sampler_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/lmed_test.dir/build.make:169: recipe for target 'bin/lmed_test' failed
make[2]: *** [bin/lmed_test] Error 1
CMakeFiles/Makefile2:1341: recipe for target 'src/theia/CMakeFiles/lmed_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/lmed_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/mutable_priority_queue_test.dir/build.make:169: recipe for target 'bin/mutable_priority_queue_test' failed
make[2]: *** [bin/mutable_priority_queue_test] Error 1
CMakeFiles/Makefile2:1206: recipe for target 'src/theia/CMakeFiles/mutable_priority_queue_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/mutable_priority_queue_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/ransac_test.dir/build.make:169: recipe for target 'bin/ransac_test' failed
make[2]: *** [bin/ransac_test] Error 1
CMakeFiles/Makefile2:1251: recipe for target 'src/theia/CMakeFiles/ransac_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/ransac_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/find_common_tracks_in_views_test.dir/build.make:169: recipe for target 'bin/find_common_tracks_in_views_test' failed
make[2]: *** [bin/find_common_tracks_in_views_test] Error 1
CMakeFiles/Makefile2:1521: recipe for target 'src/theia/CMakeFiles/find_common_tracks_in_views_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/find_common_tracks_in_views_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/lru_cache_test.dir/build.make:169: recipe for target 'bin/lru_cache_test' failed
make[2]: *** [bin/lru_cache_test] Error 1
CMakeFiles/Makefile2:1161: recipe for target 'src/theia/CMakeFiles/lru_cache_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/lru_cache_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/prosac_test.dir/build.make:169: recipe for target 'bin/prosac_test' failed
make[2]: *** [bin/prosac_test] Error 1
CMakeFiles/Makefile2:1296: recipe for target 'src/theia/CMakeFiles/prosac_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/prosac_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/minimum_spanning_tree_test.dir/build.make:169: recipe for target 'bin/minimum_spanning_tree_test' failed
make[2]: *** [bin/minimum_spanning_tree_test] Error 1
CMakeFiles/Makefile2:1611: recipe for target 'src/theia/CMakeFiles/minimum_spanning_tree_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/minimum_spanning_tree_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/five_point_relative_pose_test.dir/build.make:169: recipe for target 'bin/five_point_relative_pose_test' failed
make[2]: *** [bin/five_point_relative_pose_test] Error 1
CMakeFiles/Makefile2:1656: recipe for target 'src/theia/CMakeFiles/five_point_relative_pose_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/five_point_relative_pose_test.dir/all] Error 2
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/guided_epipolar_matcher_test.dir/build.make:169: recipe for target 'bin/guided_epipolar_matcher_test' failed
make[2]: *** [bin/guided_epipolar_matcher_test] Error 1
CMakeFiles/Makefile2:1566: recipe for target 'src/theia/CMakeFiles/guided_epipolar_matcher_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/guided_epipolar_matcher_test.dir/all] Error 2
[ 42%] Linking CXX executable ../../bin/evsac_test
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::ZSTD_Uncompress(char const*, unsigned long, int*, rocksdb::Slice const&)': /app/downloads/rocksdb/./util/compression.h:783: undefined reference to ZSTD_createDCtx'
/app/downloads/rocksdb/./util/compression.h:786: undefined reference to ZSTD_decompress_usingDict' /app/downloads/rocksdb/./util/compression.h:787: undefined reference to ZSTD_freeDCtx'
/usr/local/lib/librocksdb.a(format.o): In function rocksdb::BZip2_Uncompress(char const*, unsigned long, int*, unsigned int)': /app/downloads/rocksdb/./util/compression.h:470: undefined reference to BZ2_bzDecompressInit'
/app/downloads/rocksdb/./util/compression.h:485: undefined reference to BZ2_bzDecompress' /app/downloads/rocksdb/./util/compression.h:517: undefined reference to BZ2_bzDecompressEnd'
/app/downloads/rocksdb/./util/compression.h:509: undefined reference to BZ2_bzDecompressEnd' /usr/local/lib/librocksdb.a(options_helper.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::ZSTD_Compress(rocksdb::CompressionOptions const&, char const
, unsigned long, std::__cxx11::basic_string<char, std::char_traits, std::allocator >*, rocksdb::Slice const&)':
/app/downloads/rocksdb/./util/compression.h:746: undefined reference to ZSTD_compressBound' /app/downloads/rocksdb/./util/compression.h:750: undefined reference to ZSTD_createCCtx'
/app/downloads/rocksdb/./util/compression.h:753: undefined reference to ZSTD_compress_usingDict' /app/downloads/rocksdb/./util/compression.h:754: undefined reference to ZSTD_freeCCtx'
/usr/local/lib/librocksdb.a(block_based_table_builder.o): In function rocksdb::BZip2_Compress(rocksdb::CompressionOptions const&, unsigned int, char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)': /app/downloads/rocksdb/./util/compression.h:415: undefined reference to BZ2_bzCompressInit'
/app/downloads/rocksdb/./util/compression.h:429: undefined reference to BZ2_bzCompress' /app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd'
/app/downloads/rocksdb/./util/compression.h:438: undefined reference to BZ2_bzCompressEnd' /usr/local/lib/librocksdb.a(db_impl.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /usr/local/lib/librocksdb.a(column_family.o): In function rocksdb::ZSTD_Supported()':
/app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber' /app/downloads/rocksdb/./util/compression.h:88: undefined reference to ZSTD_versionNumber'
collect2: error: ld returned 1 exit status
src/theia/CMakeFiles/evsac_test.dir/build.make:169: recipe for target 'bin/evsac_test' failed
make[2]: *** [bin/evsac_test] Error 1
CMakeFiles/Makefile2:1386: recipe for target 'src/theia/CMakeFiles/evsac_test.dir/all' failed
make[1]: *** [src/theia/CMakeFiles/evsac_test.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

@mpkuse
Copy link
Author

mpkuse commented Nov 16, 2018

I just solved this issue.
Turns out if I use shared library for rocksdb this works.

So here it,

  • uninstall librocksdb.a (if exisits)
  • make shared_lib (compile rocks db with this)
  • compile TheiaSfM as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant