-
Notifications
You must be signed in to change notification settings - Fork 961
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
'settings.compiler.libcxx' value not defined #2607
Comments
Yes, the reason is that we much prefer it to be explicit, rather than the compiler default, because the bad thing is that there is not such compiler default, a modern gcc 5.X might use libstdc++ as default in old distros (which are very common in CIs like travis) and libstdc++11 in modern distros. I think you might achieve that behavior doing the following:
def package_id(self):
if my_custom_logic_is_default(self.settings.compiler.version, self.settings.libcxx):
self.info.settings.libcxx = None This latter step allows managing other libcxx than the default without having a duplicated binary (one for libcxx=default, and other for libcxx=None, which is the default two). The reason we cannot make this the default or built-in in conan, is that it is not true in the general case, the implementation of |
I discovered this thread #2340 discussing about which ABI should be set by default according to the compiler's version.
On RHEL/CentOS 6/7, GCC 6 and 7 are compiled with
If the settings |
I will discuss it with @memsharded later today. Note: The default profile will contain a value for |
Closing this issue as outdated:
|
I use GCC 6.3
My profile is:
I wanted conan to use the default values for GCC 6.3. If I remove the line
compiler.libcxx=libstdc++
from my profile, it directly stopped building and threw an error.GCC documentation about Dual ABI:
By default, if this setting is not found, no define is returned.
https://github.com/conan-io/conan/blob/1afadb5cca9e1c688c7b37c69a0ff3c6a6dbe257/conans/client/build/compiler_flags.py
CMake and Autotools helpers get the value from conanfile.settings and check if the value is not null
If it is null, it does not set neither
_GLIBCXX_USE_CXX11_ABI=0
nor_GLIBCXX_USE_CXX11_ABI=1
and the compiler will use its default value, exactly the behavior I want.What is the reason for throwing an error message ?
Do you prevent this to be able to distinguish the ABI if we are building and publishing an artifact from a distribution embedding a fancy GCC ?
The text was updated successfully, but these errors were encountered: