Closed Slashcash closed 4 months ago
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 compiler_executables
in your profile:
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 😁
Hi @Slashcash - Thanks for opening the issue!
I think that we only need to set the
compiler_executables
in your profile: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:
self.conf_info.define("tools.build:compiler_executables", {"c": os.path.join(compiler_path, compiler_c), "cpp": os.path.join(self.package_folder, compiler_cxx)})
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.
works indeed! Thanks a lot!
That's great!
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.
It was working because of your toolchain-xxxx/1.0
as tool_requires
injection. As the older versions were CMake-based, that toolchain was correctly injecting all the needed variables, but as it's Meson-based now, those variables are not affecting the freetype recipe 😓
@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_mesoncross.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