Questions tagged [musl]

A new standard library to power a new generation of Linux-based devices.

MUSL, a new standard library to power a new generation of Linux-based devices. MUSL is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety.
http://www.musl-libc.org/

149 questions
3
votes
3 answers

How to use SHA-256 crypt with musl?

I am using musl: https://www.musl-libc.org If i browse the repository i can see that there are a bunch of crypt related source files (including crypt_sha256.c). The problem is that there are no header files for them. How am i supposed to use them?…
ele lont
  • 469
  • 1
  • 4
  • 11
3
votes
1 answer

How can I target my Rust application and it's dependencies to musl?

I'm trying to run my rust application on Alpine but I'm having problems with either using musl as a target or using the compatibility layer for glibc. When I try to use from the libc6-compat I'm having this problem: Error relocating my_app:…
Augusto
  • 1,234
  • 1
  • 16
  • 35
3
votes
1 answer

Rust cross-compile -lpcap from macos to linux

I am trying to cross-compile my Rust project on Mac OS to Linux using cargo build --target=x86_64-unknown-linux-musl. I installed the binary for Linux + musl cross-compilation on mac using brew install FiloSottile/musl-cross/musl-cross as I would…
3
votes
1 answer

Cross-compile and link a dynamic library (cdylib) on macOS for Linux with cargo and rust

I have a Rust library that exposes few functions for FFI. I assume I have to set crate-type to cdylib - as I want to call these functions from Ruby and PHP (f.i. via ffi ruby gem). But I have trouble crosscompiling it from OSX to Linux. I tried to…
Ernest
  • 8,701
  • 5
  • 40
  • 51
3
votes
1 answer

Compile OpenJDK 9 and up with ARM64 musl-libs

A bit background. My goal is to create a super slim docker image with JRE on ARM64. Here are possible areas where I can affect on the final image size. Using JAVA 9 and up allows me to leverage new java modules capability. Using Alpine for ARM64…
Denis Voloshin
  • 768
  • 10
  • 32
3
votes
0 answers

Why does musl ldconfig ignore standard directories?

I was trying to make a docker container based on Alpine linux. During installation of some software I noticed that shared libraries were not installed properly. After some investigation I found the musl ldconfig to be ignoring standard library…
Dejan Jovanović
  • 2,085
  • 1
  • 16
  • 22
3
votes
0 answers

Custom (musl) Build of GCC Cannot Find LD

I followed this 'tutorial' to create a static GCC, libc, and libstdc++ built against MUSL. Build directory: /home/user/musl_gcc/ When I attempt to create a simple test C program, and compile it with no arguments, I get the following…
Goodies
  • 4,439
  • 3
  • 31
  • 57
3
votes
2 answers

Mysterious segfaults when overriding pthread functions on glibc but not on musl

I'm trying to override pthread_create and pthread_exit. The overrides should call the originals. I can override pthread_create, and it appears to works as long as I exit my main thread with pthread_exit(0);. If I don't it segfaults. If I even…
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
3
votes
0 answers

Which (if any) NDK libraries/headers are compatible with other toolchains

I'm working on a project that is compiled using the arm-linux-musleabi toolchain which builds against musl libc. What are my options to use NDK features such as Android jni.h? Am I wrong when assuming that jni.h on Android NDK is not the same as…
JSON
  • 1,819
  • 20
  • 27
3
votes
1 answer

Alpine musl vs glibc - are they supposed to be compatible?

So I'm playing with Alpine Linux, which uses musl vs glibc. I'm finding out that because of this choice I can't run Oracle Java, or static go binaries built under glibc. Is musl supposed to be compatible with the more widely used glibc or are you…
Greg
  • 10,696
  • 22
  • 68
  • 98
3
votes
2 answers

When using the GCC driver, what makes a static lib "incompatible"?

So what I am trying to do is on Ubuntu 14.04 (x86_64) I want to set up musl-libc based on the latest released 1.1.11 version which is available at this moment. What I did was to: Install multilib support for GCC: sudo apt-get…
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
3
votes
2 answers

Load both musl libc.so and gcc libc.so in the same process?

I have a shared library compiled with musl libc $ readelf -d ./libinterop_d.so Dynamic section at offset 0x8ecb0 contains 22 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library:…
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
2
votes
0 answers

What does `a+y(%reg)` do in AT&T syntax

I am translating musl's x86_64 sigsetjmp into intel syntax but cannot figure out what the following two lines of assembly are doing: mov %rbx,72+8(%rdi) ... mov 72+8(%rbx),%rbx My guess is it is getting the value at 8(%rdi) and adding 72 to it. But…
snowytrees
  • 21
  • 2
2
votes
1 answer

How to build a Rust program for riscv64gc-unknown-linux-musl?

I'm trying to cross-compile a Rust program for the tier 3 platform riscv64gc-unknown-linux-musl, but am running into problems, I believe either with linking or with instructing Cargo properly. I've tried just running: cargo +nightly build -Z…
Lindon
  • 31
  • 5
2
votes
1 answer

How to dynamically link your nim-application against musl?

I've written a web-server in nim using the prologue framework. I would like to deploy that application using an alpine-docker-container. As far as I'm aware, compiling means you dynamically link against your system libraries for whatever you need,…
Philipp Doerner
  • 1,090
  • 7
  • 24