facebook / CacheLib

Pluggable in-process caching engine to build and scale high performance services
https://www.cachelib.org
Apache License 2.0
1.18k stars 254 forks source link

build.sh: error: failed to build cachelib #270

Closed george-reilly-wdc closed 10 months ago

george-reilly-wdc commented 10 months ago

I get the following error when attempting to build CacheLib.

[100%] Linking CXX executable cachebench cd /root/cachbench/CacheLib/build-cachelib/cachebench && /usr/bin/cmake -E cmake_link_script CMakeFiles/cachebench.dir/link.txt --verbose=YES /usr/bin/c++ -g CMakeFiles/cachebench.dir/main.cpp.o -o cachebench -Wl,-rpath,"\$ORIGIN/../lib:\$ORIGIN/../lib64:\$ORIGIN/../lib-os" libcachelib_cachebench.a ../datatype/libcachelib_datatype.a ../allocator/libcachelib_allocator.a ../navy/libcachelib_navy.a ../shm/libcachelib_shm.a ../common/libcachelib_common.a /root/cachbench/CacheLib/opt/cachelib/lib/libthriftcpp2.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthriftfrozen2.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthriftmetadata.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthriftanyrep.so /root/cachbench/CacheLib/opt/cachelib/lib/libthrifttype.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthrifttyperep.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthriftannotation.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthriftprotocol.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libasync.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libwangle.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libfizz.so.1.0.0 /usr/lib64/libsodium.so /usr/lib64/librt.so /root/cachbench/CacheLib/opt/cachelib/lib/libtransport.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/librpcmetadata.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libthrift-core.so.1.0.0 /root/cachbench/CacheLib/opt/cachelib/lib/libconcurrency.so.1.0.0 /usr/lib64/libz.so /root/cachbench/CacheLib/opt/cachelib/lib/libfollybenchmark.so.0.58.0-dev /root/cachbench/CacheLib/opt/cachelib/lib/libfolly_exception_counter.so.0.58.0-dev /root/cachbench/CacheLib/opt/cachelib/lib/libfolly_exception_tracer.so.0.58.0-dev /root/cachbench/CacheLib/opt/cachelib/lib/libfolly_exception_tracer_base.so.0.58.0-dev /root/cachbench/CacheLib/opt/cachelib/lib/libfolly.so.0.58.0-dev -pthread /root/cachbench/CacheLib/opt/cachelib/lib64/libfmtd.so.8.0.1 -Wl,--as-needed /root/cachbench/CacheLib/opt/cachelib/lib/libgflags_debug.so.2.2.2 /usr/lib64/libboost_context.so /usr/lib64/libboost_filesystem.so /usr/lib64/libboost_program_options.so /usr/lib64/libboost_regex.so /usr/lib64/libboost_system.so -lboost_thread /usr/lib64/libboost_chrono.so /usr/lib64/libboost_date_time.so /usr/lib64/libboost_atomic.so /root/cachbench/CacheLib/opt/cachelib/lib64/libglogd.so /usr/lib64/libevent.so /usr/lib64/libdouble-conversion.so /usr/lib64/libz.so /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libbz2.so /usr/lib64/liblzma.so /usr/lib64/liblz4.so /root/cachbench/CacheLib/opt/cachelib/lib64/libzstd.so /usr/lib64/libsnappy.so /usr/lib64/libdwarf.so /usr/lib64/libiberty.a /usr/lib64/libaio.so /usr/lib64/libsodium.so -ldl /usr/lib64/libunwind.so -lstdc++fs -lnuma /root/cachbench/CacheLib/opt/cachelib/lib/libgflags_debug.so.2.2.2 -lpthread ../navy/libcachelib_navy.a(BlockCache.cpp.o): In function facebook::cachelib::navy::BlockCache::insert(facebook::cachelib::HashedKey, facebook::cachelib::navy::BufferViewT<unsigned char const>)': /root/cachbench/CacheLib/cachelib/navy/block_cache/BlockCache.cpp:167: undefined reference tofacebook::cachelib::detail::injectPause(folly::Range<char const>)' /root/cachbench/CacheLib/cachelib/navy/block_cache/BlockCache.cpp:217: undefined reference to `facebook::cachelib::detail::injectPause(folly::Range<char const>)' ../navy/libcachelib_navy.a(RegionManager.cpp.o): In function facebook::cachelib::navy::RegionManager::releaseCleanedupRegion(facebook::cachelib::navy::RegionId)': /root/cachbench/CacheLib/cachelib/navy/block_cache/RegionManager.cpp:159: undefined reference tofacebook::cachelib::detail::injectPause(folly::Range<char const>)' ../navy/libcachelib_navy.a(RegionManager.cpp.o): In function facebook::cachelib::navy::RegionManager::getCleanRegion(facebook::cachelib::navy::RegionId&, bool)': /root/cachbench/CacheLib/cachelib/navy/block_cache/RegionManager.cpp:212: undefined reference tofacebook::cachelib::detail::injectPause(folly::Range<char const>)' /root/cachbench/CacheLib/cachelib/navy/block_cache/RegionManager.cpp:238: undefined reference to facebook::cachelib::detail::injectPause(folly::Range<char const*>)' ../navy/libcachelib_navy.a(RegionManager.cpp.o):/root/cachbench/CacheLib/cachelib/navy/block_cache/RegionManager.cpp:265: more undefined references tofacebook::cachelib::detail::injectPause(folly::Range<char const*>)' follow collect2: error: ld returned 1 exit status make[2]: [cachebench/CMakeFiles/cachebench.dir/build.make:154: cachebench/cachebench] Error 1 make[2]: Leaving directory '/root/cachbench/CacheLib/build-cachelib' make[1]: [CMakeFiles/Makefile2:616: cachebench/CMakeFiles/cachebench.dir/all] Error 2 make[1]: Leaving directory '/root/cachbench/CacheLib/build-cachelib' make: *** [Makefile:136: all] Error 2 build-package.sh: error: make failed build.sh: error: failed to build cachelib

jaesoo-fb commented 10 months ago

@george-reilly-wdc Hi. Thanks for reporting this issue. We are working on it.

jaesoo-fb commented 10 months ago

Fixed by eedf5ca40524 (fixed oss build error related to inject_pause)