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
16
votes
4 answers

error: failed to run custom build command for `ring v0.16.20`

I want to build rust 1.59 project with musl in macOS Monterey 12.3.1 with M1 chip, then I run this command: rustup target add x86_64-unknown-linux-musl cargo build --release --target=x86_64-unknown-linux-musl but the project build output like…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
16
votes
2 answers

Forcing 64-bit long doubles?

I'm building musl-libc statically for a project on an aarch64 (ARM 64-bit) platform. I'd like to avoid any soft floating point libraries such as GCC's soft float library routines. However, these are still appearing in the library archives even when…
tonysdg
  • 1,335
  • 11
  • 32
14
votes
3 answers

How to compile a static musl binary of a Rust project with native dependencies?

I have a project with dependencies on Hyper and Diesel, and because of that, on native libraries OpenSSL and libpq. The project builds on nightly Rust because it uses compiler plugins. My current attempt is to build on a Docker container. I have the…
GolDDranks
  • 3,272
  • 4
  • 22
  • 30
13
votes
2 answers

Complete and isolated LLVM/musl toolchain

What I'm trying to achieve is to compile an GNU independent and isolated LLVM toolchain using musl as clib. Recently LLVM 4.0 has been released with lot's of new cool features, including production ready LLD, so also the linking step could be…
Stefano Azzalini
  • 1,027
  • 12
  • 21
10
votes
1 answer

Can musl libc be built on OS X?

I'm trying to build musl-libc on a machine running OS X 10.11.5. Unfortunately, I get the following error while running make: clang: warning: optimization flag '-fexcess-precision=standard' is not supported clang: warning: optimization flag…
Jules
  • 14,200
  • 13
  • 56
  • 101
9
votes
3 answers

"undefined reference to `__stat_time64'" when cross-compiling rust project on musl 1.2.0

I'm trying to cross-compile a rust project for arm-linux-musleabihf and am hitting a linker error when using musl-cross-make. The rust project has a dependency on libgit2 and this is the dependency that seems to be causing the problem. Using: the…
growse
  • 3,554
  • 9
  • 43
  • 66
9
votes
2 answers

How to actually detect musl libc?

The musl team claims that there is no need of a way of detecting musl libc because they only implement standard functionality and have no quirks that need detecting. Up until today, that claim may well have been true, but it is no longer true.…
Joshua
  • 40,822
  • 8
  • 72
  • 132
9
votes
1 answer

Building GNATCOLL in an Alpine Linux Docker Container

I can't seem to get GNATCOLL to compile in an Alpine Linux based Docker Container. My container so far is: FROM alpine:edge # Add extra repositories RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories; \ echo…
LambdaBeta
  • 1,479
  • 1
  • 13
  • 25
9
votes
0 answers

Running musl apps on glibc system (using libc.so shared library)

How can I build and run a program compiled with musl-gcc (without static linking) on a glibc based system? If I build a simple hello world c program, objdump -p only shows libc.so as NEEDED Dynamic Section: NEEDED libc.so …
user3761898
  • 1,143
  • 1
  • 8
  • 7
8
votes
2 answers

standard_init_linux.go:219: exec user process caused: no such file or directory

I am trying to move my rust server from Heroku to Google Cloud or AWS. Even though I like the simplicity of having a git push build and deploy to Heroku with just a buildpack specified, the service is not cost effective for me. I identified Google…
manonthemat
  • 6,101
  • 1
  • 24
  • 49
8
votes
2 answers

musl-gcc: undefined reference to __memcpy_chk

I need to compile a C program against musl-libc to make it run on an embedded device. However, I'm failing to compile the program. The source depends on a couple libraries which I pass to the linker like so: /usr/local/musl/bin/musl-gcc app.c -o app…
Gilrich
  • 305
  • 3
  • 13
8
votes
2 answers

How to circumvent "attempt to use poisoned malloc/calloc" errors with GCC?

I'm building a native musl compiler (GCC 8.3.0) with a cross musl compiler (same version) and I'm getting this error: In file included from /usr/local/x86_64-cros-linux-musl/include/pthread.h:30, from…
S.S. Anne
  • 15,171
  • 8
  • 38
  • 76
7
votes
2 answers

Using an alternative libc in a cmake project

I have a C/C++ project that is built using CMake. While trying to compile a static binary, I've run into issues with different GLIBC versions on my computer and the target machine. In a different question on SO, the accepted answer to a similar…
janoliver
  • 7,744
  • 14
  • 60
  • 103
6
votes
1 answer

qemu-x86_64: Could not open '/lib/ld-musl-x86_64.so.1': No such file or directory

Has anyone come across this error when trying to execute a docker-compose up command. I have tried to resolve it by looking at other articles that touch on something similar but I am having no success. I am trying to run my spring boot app using a…
codeskin
  • 147
  • 1
  • 1
  • 8
6
votes
1 answer

Compiling dotnet core app for linux-musl-arm

I tried compiling a simple .NET Core hello world app for OpenWRT on ARM Cortex A7 using linux-musl-arm with the following command: dotnet publish --configuration Release --runtime linux-musl-arm --self-contained But i get the following error when i…
Ludovic Feltz
  • 11,416
  • 4
  • 47
  • 63
1
2 3
9 10