Skip to content

Building the aarch64-linux-android stdlib fails #31595

Closed
rust-lang/libc
#192
@mmatyas

Description

@mmatyas

I was trying to build the stdlibs for the aarch64-linux-android target like this:

rust/my_empty_build_dir $ ../configure \
--target=aarch64-linux-android \
--aarch64-linux-android-ndk="$ANDROID_TOOLCHAIN_ARM64" \
--prefix=$(pwd)/installdir --disable-docs --enable-ccache

make -j4 && make install

However, the build fails with the following error:

...
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-linux-android/lib/libcollections
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-linux-android/lib/libstd
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd
../src/libstd/sys/unix/ext/fs.rs:314:38: 314:42 error: mismatched types:
 expected `u16`,
    found `u32` [E0308]
../src/libstd/sys/unix/ext/fs.rs:314         self.as_inner_mut().set_mode(mode);
                                                                          ^~~~
../src/libstd/sys/unix/ext/fs.rs:314:38: 314:42 help: run `rustc --explain E0308` to see a detailed explanation
../src/libstd/sys/unix/fs.rs:119:21: 119:39 error: mismatched types:
 expected `i32`,
    found `i64` [E0308]
../src/libstd/sys/unix/fs.rs:119             tv_sec: self.stat.st_mtime,
                                                     ^~~~~~~~~~~~~~~~~~
../src/libstd/sys/unix/fs.rs:119:21: 119:39 help: run `rustc --explain E0308` to see a detailed explanation
../src/libstd/sys/unix/fs.rs:126:21: 126:39 error: mismatched types:
 expected `i32`,
    found `i64` [E0308]
../src/libstd/sys/unix/fs.rs:126             tv_sec: self.stat.st_atime,
                                                     ^~~~~~~~~~~~~~~~~~
../src/libstd/sys/unix/fs.rs:126:21: 126:39 help: run `rustc --explain E0308` to see a detailed explanation
../src/libstd/sys/unix/fs.rs:182:41: 182:50 error: mismatched types:
 expected `u32`,
    found `u16` [E0308]
../src/libstd/sys/unix/fs.rs:182     pub fn mode(&self) -> raw::mode_t { self.mode }
                                                                         ^~~~~~~~~
../src/libstd/sys/unix/fs.rs:182:41: 182:50 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 4 previous errors
/tmp/snippets/rustbuild/rust/mk/target.mk:186: recipe for target 'x86_64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-linux-android/lib/stamp.std' failed
make: *** [x86_64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-linux-android/lib/stamp.std] Error 101
make: *** Waiting for unfinished jobs....

Here is the full build log: http://pastebin.com/cX9WgVA4

I'm using Xubuntu 15.10. At the time of building, the Rust master was at b9732ed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions