-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[boost] Fix test package on macOS when *:shared=True #16348
[boost] Fix test package on macOS when *:shared=True #16348
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
I detected other pull requests that are modifying boost/all recipe:
This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
The problem I suspect is that system installed ctest depends on system installed libarchive which depends on macOS libiconv which is slightly different than GNU libiconv. Since libiconv is a dependency of boost (at least default configuration), runtime loader tries to find symbols of libiconv in conan package (because VirtualRunEnv prepends lib paths of conan package into DYLD_LIBRARY_PATH, which is expected). Maybe we should always consider libiconv as a system lib on macOS? (or maybe not, not sure what's the best approach) https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx |
This comment has been minimized.
This comment has been minimized.
self.run(f"ctest --output-on-failure -C {self.settings.build_type}", env="conanrun") | ||
if can_run(self): | ||
cmake = CMake(self) | ||
cmake.test() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bear in mind that one of the reasons we used ctest
rather than cmake.test()
is to ensure that in the event of the tools.build:skip_test
config being abled, this test still runs unconditionally, as cmake.test()
generally applies to library tests rather than executables in the test package
Bear in mind that the runtime dependencies of the
The version of I think the biggest issue here is that we are invoking Thanks @uilianries and @SpaceIm - at least we know the cause now :) |
New error, nothing related to the latest, Window long path on test package:
|
It's an internal bug, it should be fixed soon. |
This reverts commit 3e3f74a.
Signed-off-by: Uilian Ries <uilianries@gmail.com>
This comment has been minimized.
This comment has been minimized.
I think the "fix" was actually a bit easier - the test executables, as generated by CMake, have embedded RPATH entries pointing to the conan-provided lib directories (libiconv, etc) - so on platforms where CMake does this, we don't strictly need to be in the conanrun context. On Windows, on the other hand, if |
This comment has been minimized.
This comment has been minimized.
It may not work on Linux because RPATH in executable is not transitive. |
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️All green in build 6 (
Conan v2 pipeline (informative, not required for merge) ✔️
All green in build 5 (
|
Boost is working with both Conan v1 and v2 🚀 |
Specify library name and version: boost/1.79.0
Some runtime error occurred when trying to run Boost test package on the CI:
https://c3i.jfrog.io/c3i/misc-v2/logs/prod-v2/TapaholesRepo/106-configs/macos-clang/boost/1.79.0//ff15167be75d82eb8c4445406fa2bff3f15f4cdb-test.txt
However, I can't reproduce that error, instead, it works for me, but I only have Clang Apple 14 installed. So my intention here is trying to use cmake build --target test, instead of invoking ctest directly, my guess is something related to DYLIB missing path.
My build log: