You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package based on android-ndk package from conan-center. The difference is that my package additionally in its package_info method that defines some additional flags for the target system, based on the target. Most importantly, it uses self.settings_target.get_safe('') function.
On Linux, I'm having a distinction between two different architectures: x86_64 and x86_64_haswell, and the global compatibility method is defined to allow running x86_64 on x86_64_haswell machines, but not vice versa:
defcompatibility(conanfile):
"""Haswell CPUs can run generic x64 binaries, but not vice versa"""result= []
arch=conanfile.settings.get_safe('arch')
ifarch=='x86_64_haswell':
result.append({'settings': [('arch', 'x86_64')]})
returnresult
My android_ndk package is built for x86_64 architecture, as this is the arch that the official NDK distribution is built for.
Now, if I run conan install --tool-requires android_ndk/r25c@company/main -pr android-profile -pr:b haswell-profile, it works correctly with conan 2.0.10, but fails on conan 2.0.11.
However, with conan 2.0.11, if I use -s:b arch=x86_64, it works, as conan does not need to use a compatible android_ndk package. I can use that as a workaround for the time being.
My hunch is that this PR introduced the issue, but I'm not familiar enough with the conan internals to understand what it actually does.
Logs
No response
The text was updated successfully, but these errors were encountered:
You are right, this was a bug introduced in that PR. The overlook in that PR was basically to restore the settings_target after the compatibility analysis, it is being fixed in #14825, hopefully for today 2.0.12 release
Environment details
Steps to reproduce
I have a package based on
android-ndk
package from conan-center. The difference is that my package additionally in itspackage_info
method that defines some additional flags for the target system, based on the target. Most importantly, it usesself.settings_target.get_safe('')
function.On Linux, I'm having a distinction between two different architectures:
x86_64
andx86_64_haswell
, and the global compatibility method is defined to allow runningx86_64
onx86_64_haswell
machines, but not vice versa:My
android_ndk
package is built forx86_64
architecture, as this is the arch that the official NDK distribution is built for.Now, if I run
conan install --tool-requires android_ndk/r25c@company/main -pr android-profile -pr:b haswell-profile
, it works correctly with conan 2.0.10, but fails on conan 2.0.11.Here is the output on 2.0.10, where it works:
And, the same command with conan 2.0.11:
However, with conan 2.0.11, if I use
-s:b arch=x86_64
, it works, as conan does not need to use a compatibleandroid_ndk
package. I can use that as a workaround for the time being.My hunch is that this PR introduced the issue, but I'm not familiar enough with the conan internals to understand what it actually does.
Logs
No response
The text was updated successfully, but these errors were encountered: