-
Notifications
You must be signed in to change notification settings - Fork 105
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
cross-compile to armv7-unknown-linux-gnueabihf fails #51
Comments
Now, I don't really understand why this happens? .cargo/config is supposed to provide the gcc-linker, why does it end up with this debianism of arm-linux-gnueabihf? |
verbose output with RUST_BACKTRACE=1 verbose.zip |
This is looking for a C compiler not a linker. You will need to set
<target>_CC=theccompiler before building. The default of <target>-gcc has
been guessed by the gcc crate.
…On Wed, Mar 20, 2019, 13:45 stefson ***@***.***> wrote:
verbose output with RUST_BACKTRACE=1 verbose.zip
<https://github.com/nagisa/rust_libloading/files/2987948/verbose.zip>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApc0muyyqLylhtMhirjn9kpAFKFCqG_ks5vYh9AgaJpZM4b_GEN>
.
|
The exact environ variable you need to set is CC_armv7_unknown_linux_
gnueabihf.
…On Wed, Mar 20, 2019, 13:52 Simonas Kazlauskas ***@***.***> wrote:
This is looking for a C compiler not a linker. You will need to set
<target>_CC=theccompiler before building. The default of <target>-gcc has
been guessed by the gcc crate.
On Wed, Mar 20, 2019, 13:45 stefson ***@***.***> wrote:
> verbose output with RUST_BACKTRACE=1 verbose.zip
> <https://github.com/nagisa/rust_libloading/files/2987948/verbose.zip>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#51 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AApc0muyyqLylhtMhirjn9kpAFKFCqG_ks5vYh9AgaJpZM4b_GEN>
> .
>
|
hmm, okay, rust_libloading doesn't use rustc at all then? |
It uses both a C and the Rust compiler. The C compiler is necessary to
build a tiny snippet of C code that would require an unstable feature in
Rust. When the feature becomes stable this crate will not contain any C
code at all.
…On Wed, Mar 20, 2019, 14:02 stefson ***@***.***> wrote:
hmm, okay, rust_libloading doesn't use rustc at all then?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApc0pMk4BIiejyNy2ikPvdtQ4zPNSniks5vYiNogaJpZM4b_GEN>
.
|
Would you mind to tell me more about how this feature is called? And in which rust version it's going to be stable, if you happen to know? |
The feature is linkage attribute and it is currently not on a path for stabilisation as it needs design work first. |
Closing as there has been no activity and we’re getting rid of the C component in the next release. |
Totally forgot about this one. The reason for this messing up is the crate which determinates the correct gcc symlink, since it only accounts for debian name schemes. A simple symlink from the non debian cross compiler to /usr/bin/arm-linux-gnueabihf-gcc solves the compile issue. Having done that, libloading v0.5.2 has no issues with cross compiling anymore. However, there are many warnings:
|
I'm kind of new to cross-compiling with rust, but I managed to set up a foreign rust-std, and also a gcc cross-compiler for linking. It's all in cargo's config:
$ cat >>~/.cargo/config
how to reproduce:
git clone https://github.com/nagisa/rust_libloading.git
cd rust_libloading
cargo build --target=armv7-unknown-linux-gnueabihf
The text was updated successfully, but these errors were encountered: