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
The link interface of target "Seastar::seastar" contains: Valgrind::valgrind but the target was not found. #2180
Labels
build
build system
Comments
tchaikov
added a commit
to tchaikov/seastar
that referenced
this issue
Apr 15, 2024
in Seastar, valgrind library is only used at the build time, and is used internally for accessing its header files when buildings its internal .cc files. so we don't expect to expose it via `export()`, for exposing it in `SeastarTargets.cmake`. but somehow when building Seastar as a static library, valgrind is still exposed in Seastar's CMake configuration file. if a CMake based project consume Seastar using its CMake configuration file, it runs into following failure when CMake generates the building system: ``` -- Configuring done (2.5s) CMake Error at external/seastar/build/release/SeastarTargets.cmake:52 (set_target_properties): The link interface of target "Seastar::seastar" contains: Valgrind::valgrind but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. Call Stack (most recent call first): external/seastar/build/release/SeastarConfig.cmake:36 (include) CMakeLists.txt:6 (find_package) ``` fortunately, in CMake 3.26, `BUILD_LOCAL_INTERFACE` was introduced this problem in specific, so that the linked library is not included by `export()` anymore. in this change, we include `Valgrind::valgrind` using this generator expression if the CMake's version is greater or equal to 3.26, so that `Valgrind` is not required for building Seastar applications. as this generator expression is not available on CMake versions lower than 3.26, and the minimal required CMake version for building Seastar is 3.13, and Seastar does support static build. The issue is still not fully addressed even with this change with older CMake and if Seastar is built as a static library. Refs scylladb#2180 Signed-off-by: Kefu Chai <[email protected]>
tchaikov
added a commit
to tchaikov/seastar
that referenced
this issue
Apr 15, 2024
in Seastar, valgrind library is only used at the build time, and is used internally for accessing its header files when buildings its internal .cc files. so we don't expect to expose it via `export()`, for exposing it in `SeastarTargets.cmake`. but somehow when building Seastar as a static library, valgrind is still exposed in Seastar's CMake configuration file. if a CMake based project consume Seastar using its CMake configuration file, it runs into following failure when CMake generates the building system: ``` -- Configuring done (2.5s) CMake Error at external/seastar/build/release/SeastarTargets.cmake:52 (set_target_properties): The link interface of target "Seastar::seastar" contains: Valgrind::valgrind but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. Call Stack (most recent call first): external/seastar/build/release/SeastarConfig.cmake:36 (include) CMakeLists.txt:6 (find_package) ``` fortunately, in CMake 3.26, `BUILD_LOCAL_INTERFACE` was introduced this problem in specific, so that the linked library is not included by `export()` anymore. in this change, we include `Valgrind::valgrind` using this generator expression if the CMake's version is greater or equal to 3.26, so that `Valgrind` is not required for building Seastar applications. as this generator expression is not available on CMake versions lower than 3.26, and the minimal required CMake version for building Seastar is 3.13, and Seastar does support static build. The issue is still not fully addressed even with this change with older CMake and if Seastar is built as a static library. previously, 372a16a intended to address this. but somehow Valgrind is still exposed by SeastarTargets.cmake. Refs scylladb#2180 Signed-off-by: Kefu Chai <[email protected]>
avikivity
pushed a commit
that referenced
this issue
Apr 18, 2024
in Seastar, valgrind library is only used at the build time, and is used internally for accessing its header files when buildings its internal .cc files. so we don't expect to expose it via `export()`, for exposing it in `SeastarTargets.cmake`. but somehow when building Seastar as a static library, valgrind is still exposed in Seastar's CMake configuration file. if a CMake based project consume Seastar using its CMake configuration file, it runs into following failure when CMake generates the building system: ``` -- Configuring done (2.5s) CMake Error at external/seastar/build/release/SeastarTargets.cmake:52 (set_target_properties): The link interface of target "Seastar::seastar" contains: Valgrind::valgrind but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. Call Stack (most recent call first): external/seastar/build/release/SeastarConfig.cmake:36 (include) CMakeLists.txt:6 (find_package) ``` fortunately, in CMake 3.26, `BUILD_LOCAL_INTERFACE` was introduced this problem in specific, so that the linked library is not included by `export()` anymore. in this change, we include `Valgrind::valgrind` using this generator expression if the CMake's version is greater or equal to 3.26, so that `Valgrind` is not required for building Seastar applications. as this generator expression is not available on CMake versions lower than 3.26, and the minimal required CMake version for building Seastar is 3.13, and Seastar does support static build. The issue is still not fully addressed even with this change with older CMake and if Seastar is built as a static library. previously, 372a16a intended to address this. but somehow Valgrind is still exposed by SeastarTargets.cmake. Refs #2180 Signed-off-by: Kefu Chai <[email protected]>
I can confirm that this issue has been fixed by #2189 Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting the following error when building b74a027 and cd8a913 (only tried those two):
Ubuntu 23.10, using system installed dependencies.
Seastar configured with
Adding
Valgrind
to the_seastar_all_dependencies
inSeastarDependencies.cmake
seems to fix the issue?The text was updated successfully, but these errors were encountered: