Skip to content
This repository was archived by the owner on Dec 9, 2018. It is now read-only.
This repository was archived by the owner on Dec 9, 2018. It is now read-only.

Requires mman.h? #17

@thejpster

Description

@thejpster

Trying to build compiler-rt.rs with xargo I get quite far, then it fails with this error. The Fedora packages for arm-none-eabi-gcc and arm-none-eabi-newlib don't include mman.h, which seems reasonable as it looks like a POSIX memory mapping API.

$ AR_lm4f120=arm-none-eabi-gcc CC_lm4f120=arm-none-eabi-gcc xargo build --target=lm4f120 -v
       Fresh itoa v0.1.1
       Fresh serde v0.7.15
       Fresh gcc v0.3.32
       Fresh libc v0.2.15
       Fresh spin v0.4.3
       Fresh rlibc v1.0.0
       Fresh rand v0.3.14
       Fresh lazy_static v0.2.1
       Fresh num-traits v0.1.34
       Fresh tempdir v0.3.5
       Fresh serde_json v0.7.4
   Compiling compiler-rt v0.1.0 (https://github.com/japaric/compiler-rt.rs#cafbcc36)
     Running `/home/jonathan/Documents/programming/rust/bare-metal-arm-rust/target/debug/build/compiler-rt-e5e01a4239060006/build-script-build`
error: failed to run custom build command for `compiler-rt v0.1.0 (https://github.com/japaric/compiler-rt.rs#cafbcc36)`
process didn't exit successfully: `/home/jonathan/Documents/programming/rust/bare-metal-arm-rust/target/debug/build/compiler-rt-e5e01a4239060006/build-script-build` (signal: 6, SIGABRT: process abort signal)
--- stdout
TARGET = Some("lm4f120")
...
running: "arm-none-eabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fPIC" "-o" "/home/jonathan/Documents/programming/rust/bare-metal-arm-rust/target/lm4f120/debug/build/compiler-rt-e5e01a4239060006/out/divxc3.o" "-c" "/tmp/compiler-rt.D1OKjKwA08DC/lib/builtins/divxc3.c"
ExitStatus(ExitStatus(0))
TARGET = Some("lm4f120")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("lm4f120")
debug=true opt-level=0
TARGET = Some("lm4f120")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_lm4f120 = None
CFLAGS_lm4f120 = None
TARGET_CFLAGS = None
CFLAGS = None
running: "arm-none-eabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fPIC" "-o" "/home/jonathan/Documents/programming/rust/bare-metal-arm-rust/target/lm4f120/debug/build/compiler-rt-e5e01a4239060006/out/enable_execute_stack.o" "-c" "/tmp/compiler-rt.D1OKjKwA08DC/lib/builtins/enable_execute_stack.c"
ExitStatus(ExitStatus(256))


command did not execute successfully, got: exit code: 1



--- stderr
Cloning into '/tmp/compiler-rt.D1OKjKwA08DC'...
/tmp/compiler-rt.D1OKjKwA08DC/lib/builtins/enable_execute_stack.c:14:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
thread 'main' panicked at 'explicit panic', /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.32/src/lib.rs:848
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: `cargo` process didn't exit successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions