Open wbehrens-on-gh opened 1 year ago
Hi @wbehrens-on-gh
I am not sure what is failing on your side, it seems to be working fine here. Maybe you can try to reduce a bit the files? Something like:
conanfile.txt
{% set api_level = '21' %}
[settings]
os=Android
os.api_level={{api_level}}
arch=armv8
compiler=clang
compiler.libcxx=c++_shared
compiler.version=8
build_type=Release
conan install . -pr=myprofile
Also, please make sure you are in latest Conan 2.0.7, are you?
I'm using conan 2.0.7, when I run it on my local machine it works fine strangely, the error I'm getting is when running in a jenkins pipeline? what I'm running in the jenkins pipeline though is the exact same as what I tested locally.
after testing inside the same docker container used by the pipeline I get the following I guess jenkins didn't show the full error
It seems the settings.yml
in the jenkins is different to your local one. Maybe it is being reused from conan config install
or something like that? The Conan 2.0 settings.yml
has changed, now it is more standard yaml, so null
instead of the previous string None
that was converted internally.
I suspect that your jenkins might have sdk: ANY
instead of 2.0 sdk: [ANY]
Ignore the above error screenshot because I did messed up and installed the config I had to v1. Retrying with the correct configuration inside the container and it worked fine. I then uploaded that container image and ran the jenkins pipeline inside it getting the same error.
there isn't a settings.yml
in my conan config install
config (for v2), it uses settings_user.yml
. The settings.yml
should be the one created by default when installing conan v2 since this is installed inside a fresh container.
There must be something different in your CI pipeline...
Next thing I'd try is to check the Python dependencies, maybe? What version of Jinja2 you have locally and which one are you running in the CI server? It seems that for some reason, the jinja rendering is leaving {% set api_level = '21' %}
there and writing api_level=21
in that line, which doesn't make sense...
correct me if I'm wrong @memsharded, but in conan 2 profiles no longer need the .jinja extension to be ran through the template engine? so if the profile name is android_armv7
it'll still get templated?
Yes, Conan 2 renders all profiles via jinja, the file extension .jinjs
is no longer necessary. Yes, the android_armv7
filename for profile will still be templated.
I was thinking of some difference in the jinja library in the server, that resulted in some kind of different final output of the render.
Well, I'm not sure why but adding the .jinja extension seemed to fix it, I'm running into some other issues that I'm not sure if they're related or not.
That is super weird, that would only make sense if it runs Conan 1.X. I have just double checked the work, there is no check at all for the jinja
extension, it is not conditional anymore. Can you please provide a full output of the command, until it fails?
What is your question?
I have the following profile when trying to cross compile using ndk r19
when I try and do
conan create
I'm hit withERROR: Error reading 'clang8-android-armv8' profile: Error while parsing line 2: 'api_level=21'
has the way you set android api level changed in conan 2? I didn't notice a change in the docs.
Have you read the CONTRIBUTING guide?