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
2
votes
2 answers

A POSIX compliant OS usually extends an existing implementation of the C Standard Library?

One of the Units of Functionality that POSIX states an OS needs to provide to be POSIX compliant is POSIX_C_LANG_SUPPORT. Basically this is the whole C Standard Library with some more things. My question is simple: developers of POSIX compliant OSes…
user4546925
2
votes
1 answer

convert data/time to tm/time_point against musl and glibc. Common way

I would like to convert string data to struct tm (c) or std::chrono::time_point. The problem is I wanna working solution for both standard libc (glibc and musl). I have tree standard formats that I wanna parse. RFC-1123 Sun, 06 Nov 1994 08:49:37…
S.R
  • 2,411
  • 1
  • 22
  • 33
2
votes
1 answer

Docker + older version of Elixir/Phoenix

I have been requested to move an Elixir/Phoenix app to Docker, with which I have no prior experience. The app uses non-latest versions of Elixir and Phoenix so I have had to diverge from the code online which generally focuses on latest versions.…
Simon H
  • 20,332
  • 14
  • 71
  • 128
2
votes
0 answers

getpwent_r and alpine musl libc

I am trying to compile an app with a dependency on a shared object with a single call to getpwent_r() (I didn't write the lib). As far as I can tell, getpwent_r() is a glibc extension, and not POSIX compliant. Any way to get that functionality,…
deitch
  • 14,019
  • 14
  • 68
  • 96
2
votes
1 answer

How to get a smaller toolchain from scratch?

I have built a custom toolchain from scratch for a MIPS 24kc (dragino) target platform, using gcc-6.3.0, musl-1.1.16 and binutils-2.27. That toolchain is completely functional. However, the size of my-custom toolchain is five times bigger than size…
aicastell
  • 2,182
  • 2
  • 21
  • 33
2
votes
1 answer

compile libstdc++ against musl

I have to compile some c++ programs with musl-gcc wrapper and so i need c++ headers and libs. Before i can i use them, i guess that i have to compile the libstdc++ source against musl, with musl-gcc itself. I got the libstdc++ source from the latest…
Carmine Ingaldi
  • 856
  • 9
  • 23
2
votes
1 answer

How to build statically against musl-libc on gentoo (glibc profile) and clang?

I'm not sure if this belongs on superuser instead of stackoverflow, at least for the first part, but for starters, how do I install sys-libs/musl (or any other alt libc for that matter) without replacing glibc or switching to the musl profile;…
Aioi Yuuko
  • 118
  • 7
1
vote
0 answers

Cannot build GCC against Musl. Error during installation on 'install-c++tools' step

I need to build a GCC and all necessary libraries (libc, libstdc++, etc.) against the Musl library. I'd been trying to build version 13 and the stable one (on 10.07.2023). Musl version 1.2.4 had been chosen. My final configuration of builds…
1
vote
2 answers

How to Fix Undefined Reference To PThread on Musl x86_64 LibC?

I've been trying to compile against Musl for a while now. My goal is to make a game engine binary which can execute on as many x86_64 Linux distros as possible with the same binary. The problem is, symbols such as pthread_mutex_init are not found by…
Alexis
  • 81
  • 7
1
vote
0 answers

How to get the prebuilt binary of `uclibc`?

I'm planing to collect the libc.so generated by uclibc/musl in different arch(arm,aarch64,mips,etc) to do some reverse enigneering work. But I find it slow to build a whole toolchain on different arch using buildroot. Is there a platform holds the…
syheliel
  • 151
  • 1
  • 7
1
vote
0 answers

I'm unable to run rust winit application on Alpine (Wayland)

I'm following this tutorial to create a winit window with Rust on Alpine Linux. When I started the demo application described in the tutorial using cargo run it not compile. But after installing build-base cmake musl-dev libpng-dev freetype-dev…
maurict
  • 11
  • 3
1
vote
1 answer

rocket.rs 0.5-rc2 compilation in alpine linux

I recently upgraded my application to rocket v0.5-rc2 and I'm encountering new errors where the linker fails to find crti.o ARG BINARY_NAME=rocketdieselstack FROM rust:alpine3.16 as builder RUN rustup update nightly && rustup default…
crlsktr
  • 105
  • 1
  • 15
1
vote
1 answer

Cross building sys based crates

I try to cross building some rust package with their -sys crates. The host is x86_64 (Ubuntu 22.04 ) and target is aarch64 (Alpine) So I use these crate with vendored flag enabled to build them. I install musl-tools and musl-dev on the host, because…
Vana
  • 753
  • 3
  • 11
  • 20
1
vote
1 answer

How one pthread waits for another to finish via futex in linux?

I want to create thread via linux clone() and and wait for it to finish. Such a seemingly simple case has become difficult for me because I don’t know how to wait in the calling thread for the end of the called. Linux wait() does not work for…
xperious
  • 239
  • 3
  • 10
1
vote
0 answers

How can I enable different features of bindgen dependening on the host env?

Rustup's musl toolchain breaks dynamic libraries by design, meaning that bindgen's runtime feature which loads libclang.so at runtime cannot be used. Now, I want my crate to compile in both musl and gnu environments, so I'm trying to detect the…
msrd0
  • 7,816
  • 9
  • 47
  • 82