-
Notifications
You must be signed in to change notification settings - Fork 121
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/tmp/hosttools/ld:
expected aarch64 got x86
#431
Comments
Fixed by adding # By default pkg-config variables point to aarch64 libraries which are picked up
# during x86_64 builds, this causes aarch64 include directories and linker
# search paths to into x86_64 builds, causing problems.
#
# Host libraries already use absolute paths so set sysroot to /
export PKG_CONFIG_SYSROOT_DIR="/"
export PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${RECIPE_SYSROOT_NATIVE}/usr/share/pkgconfig"
export PKG_CONFIG_LIBDIR="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig"
export PKG_CONFIG_DIR="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig"
# Those variables are handled internally by pkg-config crate.
# All paths are relative to sysroot, so set PKG_CONFIG_SYSROOT_DIR
# The PKG_CONFIG_*_{TARGET} needs underscores in it's triple instead of hyphens
export PKG_CONFIG_TARGET_VAR = "${@d.getVar('TARGET_SYS').replace('-','_')}"
do_compile:prepend() {
export PKG_CONFIG_SYSROOT_DIR_${PKG_CONFIG_TARGET_VAR}="${RECIPE_SYSROOT}"
export PKG_CONFIG_PATH_${PKG_CONFIG_TARGET_VAR}="${RECIPE_SYSROOT}/usr/lib/pkgconfig:${RECIPE_SYSROOT}/usr/share/pkgconfig"
export PKG_CONFIG_LIBDIR_${PKG_CONFIG_TARGET_VAR}="${RECIPE_SYSROOT}/usr/lib/pkgconfig"
export PKG_CONFIG_DIR_${PKG_CONFIG_TARGET_VAR}="${RECIPE_SYSROOT}/usr/lib/pkgconfig"
} |
This seems like something that should be integrated into oe-core or meta-rust directly, at least as a I am really suspicious of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version(s) of meta-rust
8af044c
Version(s) of poky and/or oe-core
poky:
fd00d74f47ceb57a619c4d0a0553ff0a30bbb7a4
- honisterExpected result
I'm currently working on integrating the FIDO Device Onboard protocol into an IoT device based on the Raspberry Pi 3 using Yocto. I've chosen to use the fido-device-onboard-rs and im trying to include its fdo-client-linuxapp cargo into my image as an executable. However, I encountered issues with cross-compiling it from my
x86
host sys toaarch64
.Actual result
It seems that somewhere the build system keeps using the
/build/tmp/hosttools/ld
linker that when inspected shows its a chain of symbolic links to an x86 linker. Shouldn't it be linked with anaarch64
linker?Is it possible that the problem revolves around custom TARGET_SYS? For this project im specifying:
I'm using kas-container to dockerize my build environment so i cant use a package manager to provide needed files.
It also doesn't help that comments inside of rust-common.bbclass dont diffirentiate betwen HOST_SYS and TARGET_SYS
I understand that some challenges may stem from the implementation in fido-device-onboard-rs (with all due respect to its creators/maintainers) and not be a problem with meta-rust. For instance,
openssl
is known to have issues when being cross-compiled.Logs:
The found files are aarch64 ELF files:
Steps to reproduce
I've created the .bb recipe using
cargo-bitbake
at first for fdo-client-linuxapp but after it threw errors during compilation of fdo-data i've decided to nail it's proper build process first so thats what im currently troubleshooting.cargo-bitbake
add patch for crate
openssl-kdf
:I've tried using openssl vendored but the error remains. I've also tried overwriting the TARGET_SYS to point to
aarch64-unknown-linux-gnu
but to no avail.Any insights, guidance, or pointers would be greatly appreciated.
The text was updated successfully, but these errors were encountered: