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

Unresolved symbols during build #721

Open
nrath-js opened this issue Aug 9, 2024 · 0 comments
Open

Unresolved symbols during build #721

nrath-js opened this issue Aug 9, 2024 · 0 comments

Comments

@nrath-js
Copy link

nrath-js commented Aug 9, 2024

I'm building with

          "-DUSE_THIRDPARTY_LIBRARIES=OFF"
          "-DENABLE_TESTING=OFF"
          "-DENABLE_PUSH=OFF"
          "-DTHIRDPARTY_CIVETWEB_WITH_SSL=OFF"
          "-DBUILD_SHARED_LIBS=OFF"

..but when I'm eventually linking the static libprometheus-cpp-static into my program, I'm getting a number of warnings about unresolved symbols:

/nix/store/fmc9d0xbcgfcwg8fyw9w9908wca58y9k-x86_64-unknown-linux-musl-binutils-2.41/bin/x86_64-unknown-linux-musl-ld: /nix/store/if5gxjzaxk1mhnvs48w5k0n45wz4ryfb-prometheus-cpp-static-x86_64-unknown-linux-musl-1.1.0/lib/libprometheus-cpp-pull.a(exposer.cc.o): in function `prometheus::Exposer::Exposer(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, CivetCallbacks const*)':
(.text+0x2c): undefined reference to `CivetServer::CivetServer(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, CivetCallbacks const*, void const*)'
/nix/store/fmc9d0xbcgfcwg8fyw9w9908wca58y9k-x86_64-unknown-linux-musl-binutils-2.41/bin/x86_64-unknown-linux-musl-ld: /nix/store/if5gxjzaxk1mhnvs48w5k0n45wz4ryfb-prometheus-cpp-static-x86_64-unknown-linux-musl-1.1.0/lib/libprometheus-cpp-pull.a(exposer.cc.o): in function `prometheus::Exposer::GetListeningPorts() const':
(.text+0x85c): undefined reference to `CivetServer::getListeningPorts()'
/nix/store/fmc9d0xbcgfcwg8fyw9w9908wca58y9k-x86_64-unknown-linux-musl-binutils-2.41/bin/x86_64-unknown-linux-musl-ld: /nix/store/if5gxjzaxk1mhnvs48w5k0n45wz4ryfb-prometheus-cpp-static-x86_64-unknown-linux-musl-1.1.0/lib/libprometheus-cpp-pull.a(endpoint.cc.o): in function `prometheus::detail::Endpoint::RegisterAuth(std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
(.text+0x14c): undefined reference to `CivetServer::addAuthHandler(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, CivetAuthHandler*)'
[....]

Am I doing something wrong, or is this configuration not supported? If it's not supported, shouldn't CMake error out instead of producing a static library with missing symbols?

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