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
Cross compiling opentelemetry-cpp/1.14.2 with host=armv8 and build=x86_64 fails because of a protoc syntax error (Syntax error: word unexpected (expecting ")")).
The protoc executable that is used to generate code during the build process has armv8 as architecture which doesn't match the build architecture. Directly calling the protoc executable leads to this error cannot execute binary file: Exec format error
The package builds successfully when it is not cross compiled and the build profile is used for both build and host.
Package and Environment Details
Package Name/Version: opentelemetry-cpp/1.14.2
Operating System+version: Linux Ubuntu 22.04.2 LTS
Hi @unusedcode thanks a lot for the report. I've tried to reproduce this in Conan 2, and so far it seems like it's working nice. I'll try to reproduce for Conan 1 tomorrow, but please note that Conan 1 support is deprecated in CCI, and recipes no longer get updates for it, so you'd need to fork it to be able to use the changes with your own remote
Unfortunately I have to use Conan 1.x due to some other dependencies that are not yet upgraded to Conan 2. I also tried building opentelemetry-cpp with Conan 2 and it builds with no issues. The underlying problem is that the wrong protoc executable for the build architecture is used during compilation. Is there any way for me to get the newest recipes for open-telemetry and build them locally for Conan 1.x?
@AbrilRBS I copied and edited the recipe of opentelemetry-cpp on my computer and exported it into my local conan cache. That's when I found out that the changes of the open PR #25028 also fix the problems that I experience when cross compiling. For now I can use my local recipe but it would be nice, if the PR would be merged into master. Thanks for your help!
Description
Cross compiling
opentelemetry-cpp/1.14.2
with host=armv8
and build=x86_64
fails because of a protoc syntax error (Syntax error: word unexpected (expecting ")")).The protoc executable that is used to generate code during the build process has armv8 as architecture which doesn't match the build architecture. Directly calling the protoc executable leads to this error
cannot execute binary file: Exec format error
The package builds successfully when it is not cross compiled and the build profile is used for both build and host.
Package and Environment Details
Conan profile
profile_host:
[settings]
arch=armv8
build_type=Debug
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++17
compiler.version=10
os=Linux
[options]
[build_requires]
[env]
CC=aarch64-linux-gnu-gcc-10
CXX=aarch64-linux-gnu-g++-10
LD=aarch64-linux-gnu-ld
profile_build:
[settings]
arch=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++17
compiler.version=10
os=Linux
[options]
[build_requires]
[env]
CC=gcc-10
CXX=g++-10
LD=ld
Steps to reproduce
conan install --install-folder /workspace/build/ --profile:host /home/username/.conan/profiles/profile_host --profile:build /home/username/.conan/profiles/profile_build --build missing --update -s:h build_type=Debug -s:b build_type=Debug /workspace/
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: