-
Notifications
You must be signed in to change notification settings - Fork 954
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
[question] Meson + freetype fail to cross compile #16529
Comments
Probably not a bug so changing the title. Probably something related to the fact that I am missing a correctly generated MesonToolchain? |
Hi @Slashcash - Thanks for opening the issue! I think that we only need to set the your_host_profile {% set os, arch, compiler, compiler_version, type = profile_name.split('-') %}
{% set toolchain = "toolchain-{}-{}-{}-{}/1.0".format(os, arch, compiler, compiler_version) %}
# .....
[conf]
tools.build:compiler_executables={'c': '/path/to/aarch64-gcc-11.3', 'cpp': '/path/to/aarch64-g++-11.3'}
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True Let me know if setting that solved your issue 😁 |
I couldn't do this because the compiler path is unknown at profile-level (it ends up being deployed by Conan in a non predicible folder everytime) But putting your suggestion in my toolchain recipe like this:
works indeed! Thanks a lot! Now I am confused a bit because I get why it was working up until now with CMake-based recipe. What I don't get is how it was magically working with make based recipe that I had in my dependencies. It's my understanding that this should have failed in a similar fashion! :D But that's another matter. |
That's great!
It was working because of your |
@Slashcash let me close the issue and put it as resolved. Anyway, do not hesitate to reopen it if you have any other doubts. |
Hi, I am having an hard time to cross compile freetype since the recipe has been moved to Meson.
I am cross-compiling with an aarch-64 buildroot-provided toolchain. It is installed into the system with a custom recipe:
it gets downloaded and relocated within the context of the recipe then since the toolchain provides a cmake toolchain file I just do:
With this setup I have been able to cross-compile pretty much every dependency (without resorting to define variables to relocate compilers/linkers/...)
For this reason my host profile is pretty simple:
Apart from the jinja noise there is really nothing special.
When cross-compiling freetype with this toolchain/profile I get:
../src/meson.build:26:0: ERROR: 'c' compiler binary not defined in cross or native file
and surely enough the conan-generated conan_meson_cross.ini have empty definitions for both the c and the cpp compiler:
Am I doing something really wrong? I am experiencing this with Conan 2.4.1
The text was updated successfully, but these errors were encountered: