Giter Site home page Giter Site logo

Comments (4)

sathyaphoenix avatar sathyaphoenix commented on March 29, 2024

Are all the cmake errors related to folly_exeception_tracer ? If so, IIRC, that is supported only on certain platforms. What platform is this build on and can you share the full cmake output.

from cachelib.

wenhaocs avatar wenhaocs commented on March 29, 2024

Are all the cmake errors related to folly_exeception_tracer ? If so, IIRC, that is supported only on certain platforms. What platform is this build on and can you share the full cmake output.

All errors are related to folly_exception_tracer, folly_exception_counter and folly_exception_tracer_base.

Here is our platform (tried on both physical machine and docker on that machine):
CentOS Linux release 7.9.2009 , docker fedora 35 on this host.
cmake: 3.22.1, 3.22.0 on fedora docker
gcc/g++: 9.2.0, 11.2.1 on Fedora 35 docker

Here are more details about the error log:
image

The cachelib-configure-err.log:

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args(glog) does not match the name of the calling package (Glog). This can lead to problems in calling code that expectsfind_packageresult variables (e.g.,_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindGlog.cmake:17 (find_package_handle_standard_args)
CMakeLists.txt:98 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (Zstd) does
not match the name of the calling package (Zlib). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindZlib.cmake:42 (find_package_handle_standard_args)
CMakeLists.txt:104 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at common/CMakeLists.txt:17 (add_library):
Target "cachelib_common" links to target "Folly::folly_exception_tracer"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at common/CMakeLists.txt:17 (add_library):
Target "cachelib_common" links to target
"Folly::folly_exception_tracer_base" but the target was not found. Perhaps
a find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at common/CMakeLists.txt:17 (add_library):
Target "cachelib_common" links to target "Folly::folly_exception_counter"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at shm/CMakeLists.txt:17 (add_library):
Target "cachelib_shm" links to target "Folly::folly_exception_tracer" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at shm/CMakeLists.txt:17 (add_library):
Target "cachelib_shm" links to target "Folly::folly_exception_tracer_base"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at shm/CMakeLists.txt:17 (add_library):
Target "cachelib_shm" links to target "Folly::folly_exception_counter" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at navy/CMakeLists.txt:17 (add_library):
Target "cachelib_navy" links to target "Folly::folly_exception_tracer" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at navy/CMakeLists.txt:17 (add_library):
Target "cachelib_navy" links to target "Folly::folly_exception_tracer_base"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at navy/CMakeLists.txt:17 (add_library):
Target "cachelib_navy" links to target "Folly::folly_exception_counter" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at allocator/CMakeLists.txt:26 (add_library):
Target "cachelib_allocator" links to target "Folly::folly_exception_tracer"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at allocator/CMakeLists.txt:26 (add_library):
Target "cachelib_allocator" links to target
"Folly::folly_exception_tracer_base" but the target was not found. Perhaps
a find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at allocator/CMakeLists.txt:26 (add_library):
Target "cachelib_allocator" links to target
"Folly::folly_exception_counter" but the target was not found. Perhaps a
find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at datatype/CMakeLists.txt:17 (add_library):
Target "cachelib_datatype" links to target "Folly::folly_exception_tracer"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at datatype/CMakeLists.txt:17 (add_library):
Target "cachelib_datatype" links to target
"Folly::folly_exception_tracer_base" but the target was not found. Perhaps
a find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at datatype/CMakeLists.txt:17 (add_library):
Target "cachelib_datatype" links to target "Folly::folly_exception_counter"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at cachebench/CMakeLists.txt:15 (add_library):
Target "cachelib_cachebench" links to target
"Folly::folly_exception_tracer" but the target was not found. Perhaps a
find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at cachebench/CMakeLists.txt:15 (add_library):
Target "cachelib_cachebench" links to target
"Folly::folly_exception_tracer_base" but the target was not found. Perhaps
a find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at cachebench/CMakeLists.txt:15 (add_library):
Target "cachelib_cachebench" links to target
"Folly::folly_exception_counter" but the target was not found. Perhaps a
find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at cachebench/CMakeLists.txt:42 (add_executable):
Target "cachebench" links to target "Folly::folly_exception_tracer" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at cachebench/CMakeLists.txt:42 (add_executable):
Target "cachebench" links to target "Folly::folly_exception_tracer_base"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

CMake Error at cachebench/CMakeLists.txt:42 (add_executable):
Target "cachebench" links to target "Folly::folly_exception_counter" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Generate step failed. Build files cannot be regenerated correctly.`

from cachelib.

agordon avatar agordon commented on March 29, 2024

Hello @wenhaocs ,

. I have no issue of building cachelib with the built in script. But when we tried to build cachelib in our own cmake, which will build our selected git tag of different libraries, there is an error

This is exactly the reason the scripts are there: to ensure everything required to build cachelib is properly in place.

The part that you are missing (at least the first part), is that folly asks for several optional packages, and if those are missing, it still builds, but with some functionality disabled.
In your case, the missing libraries are libdwarf, libunwind and libsodium (and few others). Our scripts make sure these are installed before continuing (see the Centos or ubuntu scripts).

Then, we when build folly, it will have the needed features. Specifically, you are looking for the following messages when running cmake for folly:

...
-- Found LIBDWARF: /usr/lib/x86_64-linux-gnu/libdwarf.so  
-- Found LIBIBERTY: /usr/lib/x86_64-linux-gnu/libiberty.a  
-- Found LIBSODIUM: /usr/lib/x86_64-linux-gnu/libsodium.so  
-- Found LIBUNWIND: /usr/lib/x86_64-linux-gnu/libunwind.so  
-- Looking for C++ include elf.h
-- Looking for C++ include elf.h - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Found Backtrace: /usr/include  
-- Setting FOLLY_USE_SYMBOLIZER: ON
-- Setting FOLLY_HAVE_ELF: 1
-- Setting FOLLY_HAVE_DWARF: TRUE
...

You can also check in your folly build directory for the following:

$ grep -E 'FOLLY_USE_SYMBOLIZER|FOLLY_HAVE_BACKTRACE' folly/folly-config.h
#define FOLLY_HAVE_BACKTRACE 1
#define FOLLY_USE_SYMBOLIZER 1

If these are not defined as 1 - you are missing the needed components.


Few suggestions:

  1. Use the build scripts. They are there for a reason (the reason being: building cachelib requires specific settings that are laborious to get correctly when building manually)
  2. The only supported build for cachelib is the one using the build scripts - and by proxy - the one using the exact git tags/revisions that are used in the scripts. If you are mixing different libraries versions - all bets are off.
  3. Specifically for folly - folly should not be used as a shared library between projects. Each project should have its own copy. This is the documented method recommended by the folly developers. I strongly discourage attempts to have one folly library pinned at specific git revision used in multiple projects
  4. If you have specific use-cases when our build scripts don't work for you - please share with us and we'll try to adapt as possible.

from cachelib.

wenhaocs avatar wenhaocs commented on March 29, 2024

Make sense. The issue is we do not have libdwarf in our machine. Once we install it, the missing folly objects will be compiled, and cachelib can be compiled. Thank you!

from cachelib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.