Skip to content
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

Build fails when building with Yocto SDK #673

Open
adrianalin opened this issue Jan 29, 2025 · 0 comments
Open

Build fails when building with Yocto SDK #673

adrianalin opened this issue Jan 29, 2025 · 0 comments
Labels
build problem Build failure

Comments

@adrianalin
Copy link

Problem:

I have a Yocto SDK that I use to build aws-lc-rs, dependencies are installed in the SDK (rust, cargo, bindgen). Build for aws-lc-rs fails because it has a custom build step that starts a new cmake process, without inheriting the current environment vars.

Relevant details

In order to build this crate I first source the Yocto SDK source /opt/weos/1.0.0/environment-setup-x86-64-v3-linux.
Than run cargo build (cargo is correctly detected from the SDK).
Trying to build aws-lc-sys/v0.25.0.

System information: for linux, below info can be collected by running uname -srvmp

  • CPU architecture: (x86-64 cross compiling for x86_64 yocto built OS)
  • OS: (Ubuntu 20.04,)

Build log:

  • The issue is that it incorrectly links against host libs.
  Run Build Command(s):/opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/make -f Makefile cmTC_2a142/fast && /opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/make  -f CMakeFiles/cmTC_2a142.dir/build.make CMakeFiles/cmTC_2a142.dir/build
  make[1]: Entering directory '/home/user/workspace/aws-lc-rs/aws-lc-sys/aws-lc/CMakeFiles/CMakeTmp'
  /bin/sh: symbol lookup error: /opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/../../lib/libc.so.6: undefined symbol: _dl_audit_symbind_alt, version GLIBC_PRIVATE

If I try to run the cmake command manually in the current shell, it works (because in the current shell I have sourced the yocto SDK):

CMAKE_PREFIX_PATH="" LC_ALL="C" "cmake" "/home/user/workspace/aws-lc-rs/aws-lc-sys" "-DBUILD_SHARED_LIBS=0" "-DCMAKE_BUILD_TYPE=debug" "-DBORINGSSL_PREFIX=aws_lc_0_25_0_" "-DBORINGSSL_PREFIX_HEADERS=/home/user/workspace/aws-lc-rs/aws-lc-sys/generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_SYSTEM_NAME=Linux" "-DCMAKE_SYSTEM_PROCESSOR=x86_64" "-DCMAKE_INSTALL_PREFIX=/home/user/workspace/aws-lc-rs/target/x86_64-we-linux-gnu/debug/build/aws-lc-sys-b986ccfa6d58587e/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m64 -std=c11 -I /home/user/workspace/aws-lc-rs/aws-lc-sys/generated-include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/aws-lc/include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/aws-lc/third_party/s2n-bignum/include -pipe -feliminate-unused-debug-types -Wno-unused-parameter -pthread -D_XOPEN_SOURCE=700 -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_25_0" "-DCMAKE_C_COMPILER=/opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/x86_64-we-linux/x86_64-we-linux-gcc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -pipe -feliminate-unused-debug-types" "-DCMAKE_CXX_COMPILER=/opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/x86_64-we-linux/x86_64-we-linux-g++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m64 -std=c11 -I /home/user/workspace/aws-lc-rs/aws-lc-sys/generated-include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/aws-lc/include -I /home/user/workspace/aws-lc-rs/aws-lc-sys/aws-lc/third_party/s2n-bignum/include -pipe -feliminate-unused-debug-types -Wno-unused-parameter -pthread -D_XOPEN_SOURCE=700 -DBORINGSSL_IMPLEMENTATION=1 -DBORINGSSL_PREFIX=aws_lc_0_25_0" "-DCMAKE_ASM_COMPILER=/opt/weos/1.0.0/sysroots/x86_64-weos-linux/usr/bin/x86_64-we-linux/x86_64-we-linux-gcc" "--no-warn-unused-cli"
@justsmth justsmth added the build problem Build failure label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build problem Build failure
Projects
None yet
Development

No branches or pull requests

2 participants