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
1
vote
0 answers

UnsatisfiedLinkError when switch to Temurin Alpine from AdoptOpenJDK Alpine

My project has shard libraries we load into Java via System.load(). Previously, we were using the AdoptOpenJDK Alpine docker image, but we are now trying to migrate to the Eclipse Temurin Alpine image. With the former image, everything works, but…
MiketheCalamity
  • 1,229
  • 1
  • 15
  • 32
1
vote
1 answer

Docker image for Nodejs and Couchbase SDK

So we have a nodejs micro-service using the NodeJS Couchbase SDK 3.2 We are trying to build a minimal docker image for our App using the Alpine base image but it seems the sdk needs more than what we have added to our base image. Here is our…
SpartanX1
  • 201
  • 2
  • 8
1
vote
0 answers

qemu riscv user mode C++/musl segfault

I'm new to qemu and trying to run riscv binaries in user mode. Not sure if I'm running into a bug or just doing something wrong. System I'm using is pretty straightforward Fedora 35 on x86_64. For reference, C++ hello world works fine for mipsel…
RickySmith
  • 11
  • 3
1
vote
0 answers

x86_64-linux-musl-g++: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory, on alpine container

I am having a problem compiling C/C++ code on an alpine (and ubuntu) container with MUSL toolchain (http://musl.cc/x86_64-linux-musl-cross.tgz ) The error is seen when the container is run on a CentOS workstation (and also Ubuntu) [user@centoshost…
1
vote
1 answer

Include standard library functions in a specific memory section

In C, we can force the linker to put a specific function in a specific section from the source code, using something like the following example. Here, the function my_function is tagged with the preprocessor macro PUT_IN_USER_SECTION in order to…
noureddine-as
  • 453
  • 4
  • 12
1
vote
1 answer

How can I load a DSO with no versioning information?

How can I make the dynamic loader load a library with no versioning information for a library/executable that requires versioning information? For example, say I am trying to run /bin/bash which requires symbol S with version X.Y.Z and libtinfo.so.6…
peachykeen
  • 4,143
  • 4
  • 30
  • 49
1
vote
1 answer

Executing script with musl-built tclsh8.6 gives `No such file or directory`

I am trying to run a simple tcl script with tclsh8.6 that I compiled from source using a musl toolchain on x86_64 Debian. The script, hello.tcl, looks like this: puts hello and when I try to run it I get the following error: $…
peachykeen
  • 4,143
  • 4
  • 30
  • 49
1
vote
1 answer

rust: building a statically linked binary including external C libraries

I'm trying to statically build my rust application, using MUSL. My application uses sqlcipher. This means a statically built executable must include the openssl and sqlcipher C libraries. I'm using https://github.com/emk/rust-musl-builder, so I…
Emmanuel Touzery
  • 9,008
  • 3
  • 65
  • 81
1
vote
0 answers

dynamically linked rust binary with musl library

I have a rust program, would like to link with musl-libc library because I would like to keep the run time memory foot print small. I can link musl and build a static binary easily. But I would like to create a dynamically linked binary with musl…
Pradeep Jagadeesh
  • 85
  • 1
  • 2
  • 10
1
vote
2 answers

Building MariaDB with musl: /usr/bin/ld cannot find -lgcc_s

I am trying to build MariaDB v10.3 with a musl tool chain on x86_64 Debian kernel v4.19. I have mainly been using the musl-gcc gcc wrapper to achieve this. The relevant packages I installed are as follows: musl (1.1.21-2): standard C…
peachykeen
  • 4,143
  • 4
  • 30
  • 49
1
vote
2 answers

What are the __NR_-prefixed symbols in glibc?

I'm trying to compile Box86 on Alpine Linux, a Linux distribution which uses the musl libc implementation rather than glibc. At 46% completion, the compilation halts with the following errors: /home/newbyte/box86/src/emu/x86syscall.c:124:11: error:…
Newbyte
  • 2,421
  • 5
  • 22
  • 45
1
vote
2 answers

Purpose of saving an incoming pthread address on the stack before syscall in MUSL's x86_64 __syscall_cp_asm wrapper?

This is from musl's source code: 1 __syscall_cp_asm: 2 __cp_begin: 3 mov (%rdi),%eax 4 test %eax,%eax 5 jnz __cp_cancel 6 mov %rdi,%r11 7 mov %rsi,%rax 8 mov %rdx,%rdi 9 mov %rcx,%rsi 10 mov…
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
1
vote
0 answers

Compiling gcc fails while trying to link libgcc

I am trying to build gcc for my linux. I'm cross compiling since I don't have a preexisting gcc. I'm using musl as libc. I configured gcc like this: export CFLAGS="-pipe -march=native -fstack-protector-strong -fno-plt -pie…
Peter Lamby
  • 285
  • 2
  • 7
1
vote
1 answer

How to find which libc.so will `rustc --target=$TARGET` link against?

I want to find the libc.so file that's being used in a Rust build so that I can query it with --version. (Some libcs expose their version information via C macros, so an alternative for them would be to use the cc crate in a build script. But others…
dubiousjim
  • 4,722
  • 1
  • 36
  • 34
1
vote
1 answer

Go libstd.so with errors on Alpine

I'm trying to build a Go executable with shared libraries. In Ubuntu, which uses GNU libc, it works. But when I try to use the same procedure on Alpine (Docker image golang:alpine, or 1.14.1-alpine3.11), which uses MUSL libc, the generated libstd.so…