-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[bug] compiler.libcxx for dependencies with prebuilt packages #7264
Comments
I confirmed that adding the |
I am having a look and even if in the command line appears 2 times
So it doesn't seem that the root cause is the libcxx setting, but it is possible that the ConanCenter pre-built packages are incompatible with CentOS7 (glibc issues). ConanCenter is doing some changes to the docker images (https://blog.conan.io/2020/06/17/Conan-Docker-Images.html) to improve this situation, but it is likely that packages have not still been rebuilt with these images yet. Please @uilianries @SSE4 could you have a look? |
I compared the compiled dependency library (libspdlog.a) using `nm -C` and
it is the gcc ABI issue. In the working build (i.e. when built locally), it
has the new GCC ABI `std::__cxx11::string` and when downloading it as a
package from Conan servers, it has the old GCC ABI `std::string`.
…On June 29, 2020 01:48:14 James ***@***.***> wrote:
I am having a look and even if in the command line appears 2 times -s
compiler.libcxx=libstdc++ -s compiler.libcxx=libstdc++11, the actual
profile in both cases is:
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
So it doesn't seem that the root cause is the libcxx setting, but it is
possible that the ConanCenter pre-built packages are incompatible with
CentOS7 (glibc issues). ConanCenter is doing some changes to the docker
images (https://blog.conan.io/2020/06/17/Conan-Docker-Images.html) to
improve this situation, but it is likely that packages have not still been
rebuilt with these images yet.
Please @uilianries @SSE4 could you have a look?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Then this could be a bug in the spdlog recipe in ConanCenter, that is not following correctly the |
from the log, it downloads the right package c0fb34b00d4c04a33793ba290326808d0fd5de33:
checking the package itself, it seems to be really built with libstdc++11:
that seems like the application itself (cryfs-stats) isn't been built with right ABI. going to check in docker and provide more details. |
okay, digging more into the details, it seems like
thus, |
given the above information, I doubt there is anything could be done on conan side. this appears to be a limitation of the best user(s) can do, is installing with something like |
Great investigation, thanks very much @SSE4 ! Then I need to understand @smessmer feedback:
Shouldn't it be the opposite? The locally built is using libstdc++, while the one retrieved from ConanCenter is with libstdc++11? |
yes, it's the opposite |
oh wow, thanks for the detailed analysis. You're absolutely right, it's the opposite, I didn't notice that. Could conan detect if a toolchain ignores |
technically, this is possible, conan could detect broken toolchains and report warnings about them |
Your PR #5740 has been merged, for CONAN_V2_MODE. |
okay, seems like there is a still room for improvement, we can detect an actual libcxx value in the new detector. |
I have implemented in #7776 a real detector of libcxx, which should fix this in the future. At the moment is only CONAN_V2_MODE, because it would be breaking. It will only be applied for auto-detection of profile. Users manually provided profiles will not be verified, it is the responsibility of the users to correctly provide their configuration for their toolchain, as it is very challenging to do a robust verification of profiles, as they might depend on many factors, can require environment settings, build_requires and other stuff to make sense. |
Source issue: cryfs/cryfs#336
I'm using conan_cmake_run to call conan from cmake and pass in the argument
SETTINGS compiler.libcxx=libstdc++11
. This callsconan install
with-s compiler.libcxx=libstdc++11
before running the rest of the CMakeLists.txt because my application can only work with libstdc++11.I noticed that the build works successfully when specifying
-DCMAKE_BUILD_TYPE=RelWithDebInfo
but runs into gcc ABI linking errors to one of the dependencies (spdlog) when specifying-DCMAKE_BUILD_TYPE=Release
.After some debugging, I noticed that
-DCMAKE_BUILD_TYPE=Release
uses a prebuilt package of spdlog from conan servers while-DCMAKE_BUILD_TYPE=RelWithDebInfo
builds the dependency locally, possibly because there is no prebuilt package forRelWithDebInfo
. Is it possible that it somehow downloads a package that was built withlibstdc++
instead oflibstdc++11
even though I set the global setting tolibstdc++11
?If that analysis is correct and the
compiler.libcxx
setting is not considered when searching for prebuilt binaries, then that should probably be fixed by adding it to the metadata for prebuilt packages and only downloading and using a prebuilt package if thecompiler.libcxx
setting matches.Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=RelWithDebInfo
and notice that it succeeds.Logs (Executed commands with output) (Include/Attach if Applicable)
Run with
-DCMAKE_BUILD_TYPE=Release
fails: https://pastebin.com/wMuQAEdLRun with
-DCMAKE_BUILD_TYPE=RelWithDebInfo
succeeds: https://pastebin.com/979iSsxpThe text was updated successfully, but these errors were encountered: