docker-rust-musl icon indicating copy to clipboard operation
docker-rust-musl copied to clipboard

build failed even with with suggested rustc alias

Open softprops opened this issue 9 years ago • 4 comments

I'm getting a build error when trying to run a musl build. It may just be bad error reporting on cargo's part but the error reported is

failed to execute command: No such file or directory (os error 2)
Is `musl-gcc` not installed?

It looks like some crates were successful but the error seems to happen on the openssl crate.

The full error is below.

Build failed, waiting for other jobs to finish...
failed to run custom build command for `openssl v0.7.6`
Process didn't exit successfully: `/source/target/release/build/openssl-09576f2f9776fa80/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-musl")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-unknown-linux-musl")
debug=false opt-level=3
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-musl")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-musl = None
CC_x86_64_unknown_linux_musl = None
TARGET_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-musl = None
CFLAGS_x86_64_unknown_linux_musl = None
TARGET_CFLAGS = None
CFLAGS = None
running: "musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-static" "-o" "/source/target/x86_64-unknown-linux-musl/release/build/openssl-09576f2f9776fa80/out/src/c_helpers.o" "-c" "src/c_helpers.c"


failed to execute command: No such file or directory (os error 2)
Is `musl-gcc` not installed?



--- stderr
thread '<main>' panicked at 'explicit panic', /root/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.24/src/lib.rs:809

softprops avatar Feb 22 '16 04:02 softprops

got a little further by adding /usr/local/musl/bin manually to my $PATH but still hitting an issue with the openssl crate

failed to run custom build command for `openssl v0.7.6`
Process didn't exit successfully: `/source/target/release/build/openssl-09576f2f9776fa80/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-musl")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-unknown-linux-musl")
debug=false opt-level=3
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-musl")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-musl = None
CC_x86_64_unknown_linux_musl = None
TARGET_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-musl = None
CFLAGS_x86_64_unknown_linux_musl = None
TARGET_CFLAGS = None
CFLAGS = None
running: "musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-static" "-o" "/source/target/x86_64-unknown-linux-musl/release/build/openssl-09576f2f9776fa80/out/src/c_helpers.o" "-c" "src/c_helpers.c"
ExitStatus(ExitStatus(256))


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



--- stderr
src/c_helpers.c:1:25: fatal error: openssl/ssl.h: No such file or directory
 #include <openssl/ssl.h>
                         ^
compilation terminated.
thread '<main>' panicked at 'explicit panic', /root/.cargo/registry/src/github.com-88ac128001ac3a9a/gcc-0.3.24/src/lib.rs:809

softprops avatar Feb 23 '16 13:02 softprops

Me too, same problem here.

ppamorim avatar Jun 13 '16 21:06 ppamorim

Also running into this problem.

Mythra avatar Aug 15 '16 15:08 Mythra

same thing here

miton18 avatar Jan 21 '17 20:01 miton18