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

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

Closed
george-reilly-wdc opened this issue Oct 24, 2023 · 2 comments
Closed

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

george-reilly-wdc opened this issue Oct 24, 2023 · 2 comments

Comments

@george-reilly-wdc
Copy link

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 to facebook::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 to facebook::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 to facebook::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 to `facebook::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
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this issue Oct 25, 2023
Summary:
As reported by #270, the oss build is broken because we
forgot to add the newly added file inject_pause.cpp to CMakeLists.txt. This changes fixes it.
When we work on D48811189,

Reviewed By: haowu14

Differential Revision: D50618724

fbshipit-source-id: 5e29145a207ece914485beaa6f613040b49dc871
@jaesoo-fb
Copy link
Contributor

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

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

2 participants