-
Notifications
You must be signed in to change notification settings - Fork 66
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
Crosscompile (for Yocto 2.6 Thud) RedisJSON #106
Comments
Looks like it failed trying to do bindgen stuff for You'll probably want to drop into a devshell and poke around, adding more verbose logging, etc. |
Looks like this relates to #96 |
For now, the workaround mentioned in #75 is worth a shot. |
Thanks a lot, will look for linket tickets. Will infor here for eventual resolution. |
Not going right way. I've added in particular recipe for RedisJSON those rows:
But error still exist even now is in use
That's more strange, the file exists:
but it's called relative from types.h
|
BTW I'm useing Zeus branch of meta-rust-bin, could be that be a problem ? |
This could also be related to rust-lang/cc-rs#82 especially this reply. Otherwise for cross-compile, build-scripts compiled for host may fail to run in the case where the host has the same triple as the target, and then cargo assumes that the target tools can be used for the host, and target libc might be used. For me, in a different project using host rust tools, this turned out to require: +# enable nightly options +# CARGO_UNSTABLE_HOST_CONFIG="true" enables CARGO_HOST_LINKER="gcc" and other host tools configurations I'm trying to use meta-rust-bin instead of host tools, but I'm not sure how those changes above would be transposed into this project. |
This seems to be the equivalent fix in Kirkstone so that build/sciprt/build will have the correct linker so it can run on the host |
I still find that cross-compiled code with a different triple produces build-script like this, using the loader in the uninative sysroot, and it executes fine: $ file /build/arm/build_output/work/aarch64-soniccorex-linux/cbindgen/0.24.3-r0/target/release/build/log-6481e63a95fe6178/build-script-build But when cross compiled to the same triple as the host, it has the leading path to the loader stripped, to refer to plain /lib/... and won't run (file not found) because that loader isn't there on the host: file /build/x86/build_output/work/corei7-64-soniccorex-linux/cbindgen/0.24.3-r0/target/release/build/log-6481e63a95fe6178/build-script-build So I'm not sure why, given all the precautions, the "interpreter" is different when building the build-script while cross compiling [EDIT] the cause is that the linker-native-wrapper is not being invoked at all when the host and target triple match, so we need CARGO_TARGET_APPLIES_TO_HOST="false" |
If you want to try this branch: https://github.com/samliddicott/meta-rust-bin/commits/master
That branch has @rich-g's fix #128 I tested it cross-compiling on x86 for both arm and for a different x86 |
I see that @banditopazzo has a similar fix as a pull-request as of two weeks ago |
Should be resolved as of #146 |
I want to target compile RedisJSON https://github.com/RedisJSON/RedisJSON
Building machine OS: Ubuntu 18.04.5 LTS
Target MACHINE is var-som-mx6 (NXP i.MX6Q)
Added meta-rust-bin layer in build/conf/bblayers.conf
On host OS build pass just fine with cargo build --release against git clone of RedisJSON
That's my Bitbake recipe:
Compilation fail with next log:
NOTE: I do not want to install rustc and cargo into SYSROOT.
Any ideas from where failed compilation ?
The text was updated successfully, but these errors were encountered: