Open sunhao-DBH opened 2 weeks ago
Hi @sunhao-DBH
Thanks for your question.
It would be important to know first what is your specific platform, like Linux distro details, and see if the liba-dev:arm
package exists there or not. It
You might also try to avoid that installation/check with tools.system.package_manager:mode=report
, which will allow to pass that point, but it is very likely that when trying to compile it will fail because it will miss the liba-dev
package for the specific architecture.
It is possible that this cross-build scenario requires some more advanced setup. Are you using some sysroot
for this cross-compilation? If that is the case, maybe what is necessary is to skip the dependency to vaapi/system
and fallback to the "system" one, that would be found in your sysroot. This can be done with the [platform_requires]
feature for the vaapi/system
.
Please let me know if this helps.
Thank you for your reply.
I am using Ubuntu 22.04 on the x86_64 architecture.
I think Conan will install the development packages for the x86_64 architecture for me, instead of installing the development packages for the ARM architecture from the sources of Ubuntu.
May I ask how I should set it up?
I think Conan will install the development packages for the x86_64 architecture for me, instead of installing the development packages for the ARM architecture from the sources of Ubuntu.
Sorry, I don't know what you mean. If you are trying to cross-compile to arm
, Conan shouldn't be installing the x86_64
packages, because it needs to build for arm
architecture, this is why it is trying to install the liba-dev:arm
package, not the native one. To cross compile the arm
package is needed, or it might be provided somewhere else, but installing the x86_64
doesn't seem a solution.
Have you tried my suggestion above of tools.system.package_manager:mode=report
?
Thank you very much for your patient explanation.
I have tried tools.system.package_manager:mode=report
, and indeed the following error will occur:
ERROR: vaapi/system: Error in package_info() method, line 55
pkg_config.fill_cpp_info(self.cpp_info.components[name])
ConanException: PkgConfig failed. Command: pkg-config --print-provides libva --print-errors
stdout:
stderr:
Package libva was not found in the pkg-config search path.
Perhaps you should add the directory containing `libva.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libva', required by 'virtual:world', not found
However, when I use the tools.system.package_manager:mode=install
command, Conan will execute the apt install libva-dev:arm
command on the amd64 architecture. Obviously, even if I use the dpkg --add-architecture arm
command to enable support for the arm architecture, it is highly unlikely that this command will succeed. It seems that only amd64 and i386 packages can be installed on the amd64 architecture.
Hi @sunhao-DBH - Debian-based distros are multi-architecture, you can install packages from other architectures - they are placed in different system subfolders.
Although I suspsect the issue here is that 32-bit armv7 should map to the armhf
dpkg architecture
Thank you for your reply. I also think that libva-dev:armhf
should be downloaded. However, what I don't understand is why Conan automatically downloads libva-dev:arm
. Is there something that I haven't configured properly?
That may be a bug - will look into it!
In the meantime to unblock you, you can try:
dpkg --add-architecture armhf
apt-get install libva-dev:armhf
And then proceed with the conan install
invocation.
There may be other packages to install - you can get a list from Conan You can also run a
conan graph- info . --build=missing -pr armv7 -c tools.system.package_manager:mode=report
This should report all packages that need to be installed and you can install them manually while we look into the correct dpkg architecture for armv7!
OK, thank you. I like Conan. Looking forward to Conan getting better and better.
I see the current mapping is:
self._arch_names = {"x86_64": "amd64",
"x86": "i386",
"ppc32": "powerpc",
"ppc64le": "ppc64el",
"armv7": "arm",
"armv7hf": "armhf",
"armv8": "arm64",
"s390x": "s390x"} if arch_names is None else arch_names
It seems the armv7
mapping to arm
is not correct because arm
architecture is not recognized in debian apt repos?
I have done a quick search for a explicit list of architectures, but it is not evident to me.
What is your question?
Problem Description I'm cross-compiling ffmpeg for armv7 on x86_64 Ubuntu. However, Conan is going to download the development package libva-dev from arm. May I ask where the settings are incorrect? Hope for guidance.
Environment details Conan version 2.9.1 This is my conanfile.txt:
Steps to reproduce
Logs
Have you read the CONTRIBUTING guide?