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

Rust Cargo cross-compile with musl fails due to missing libc

I am compiling a bindgen sys-crate using the cross Docker containers. The target platform is armv5te-unknown-linux-musleabi. I use cargo as well as build.rs to generate the bindings. This fails with the following message: error: linking with…
Netzdoktor
  • 526
  • 4
  • 15
1
vote
1 answer

Do internal libc function calls have to go through .plt

A program linked against libc.so calls a libc function through the plt, let's say setenv(). Internally within setenv() it calls malloc(), at least according to musl libc. Does the setenv()->malloc() call always have to go through the plt and got?…
nox
  • 23
  • 3
1
vote
1 answer

How to run Newlib applications using QEMU?

I wrote an application that uses several trigonometric functions (sin, tan, cos, ...). My objective is to study the different implementations of these functions in the GNU C library, MUSL, and Newlib. To do that for glibc and musl I just built a…
noureddine-as
  • 453
  • 4
  • 12
1
vote
1 answer

How am I able to run a shared library as an executable from the terminal?

from the musl libc FAQ Q: Where is ldd? musl’s dynamic linker comes with ldd functionality built in. Just create a symlink from ld-musl-$ARCH.so to /bin/ldd. If the dynamic linker was started as “ldd”, it will detect that and print the appropriate…
Adham Zahran
  • 1,973
  • 2
  • 18
  • 35
1
vote
1 answer

golang's handling of localhost

I have an alpine linux system which uses the musl libc and therefore has no /etc/nsswitch.conf. According to tcpdump on this system, net.LookupIP("localhost") actually does a query for localhost.a.b.c, where a.b.c is taken from domain a.b.c in…
Tom
  • 7,269
  • 1
  • 42
  • 69
1
vote
1 answer

How do I create Rust programs statically linked for musl on ARMv7 using Raspian/Debian?

I am trying to create a statically linked version of a Rust program on ARMv7 (Raspian/Debian) by using the armv7-unknown-linux-musleabihf target in Cargo. The build fails for the dependency backtrace-sys v0.1.28 with error: failed to run custom…
Thomas
  • 311
  • 2
  • 17
1
vote
0 answers

Error when building cx_Freeze for OpenWrt: "undefined reference to `__finite'", and others

I am attempting to package the Python module cx_Freeze for OpenWrt. I have written the Makefile (included below) and am comfortable with how it works and what I've defined (it's my understanding that Build/Compile/PyMod will effectively run…
user2583109
  • 185
  • 4
  • 12
1
vote
0 answers

Odoo 9 with Python 2.7.13 on Alpine 3.5 segfault

I wanted to post this as a bug, but I don't even have a clue to whom should I report it. Here it is. I have installed Odoo 9.0 on a standard Alpine 3.5, with both the packaged Python 2.7.13 and I have also tried with the same version of python…
dcb
  • 531
  • 3
  • 15
1
vote
2 answers

musl fails to link libc.a into shared library

I have a C99 shared library that I want to link in a few statically static libraries (via --whole-archive). Note: All the static libs are built with -fPIC I also would like to build a universal linux binary and thus have decided to use musl. When I…
bge0
  • 901
  • 2
  • 10
  • 25
1
vote
1 answer

GOMP without GLIBC

I would like to use musl with OpenMP. However, when I compile a simple OpenMP program such as int main() { int i; #pragma omp parallel for for(i=0; i<100; i++) { printf("asdf\n"); } } with musl-gcc -fopenmp foo.c I get the…
Z boson
  • 32,619
  • 11
  • 123
  • 226
0
votes
1 answer

undefined reference to `sigsetjmp' in rust static library musl build with openssl

The previous question that gives a bit of background to this one: undefined reference to symbol 'clock_gettime@@GLIBC_2.4 In rust static library for musl target Now when compiling the c++ program i get the…
Szybet
  • 5
  • 1
0
votes
2 answers

undefined reference to symbol 'clock_gettime@@GLIBC_2.4 In rust static library for musl target

I'm trying to use a second rust library ( via cbindgen ) with my cpp program on a musl target. I use cross to crosscompile. The exact error…
Szybet
  • 5
  • 1
0
votes
0 answers

x86_64-unknown-linux-musl/bin/ld: skipping incompatible /usr/lib/aarch64-linux-gnu/libpq.a when searching for -lpq

I am building the rust docker image in macOS 13.2 with M1 chip using this command: docker build -f ./Dockerfile -t="reddwarf-pro/alt-server:v1.0.0" . after add the diesel dependencies and PostgreSQL query code, the compile process shows error: #13…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
0
votes
0 answers

Cannot Add Graphics Driver to SDL

I've successfully built and ran a game engine I'm writing in Rust and am powering the graphics by SDL. The only problem is, SDL does not have the ability to load graphics support while compiled for x86_64-linux-musl. When I compiled the X Server…
Alexis
  • 81
  • 7
0
votes
0 answers

Build yara static lib with a musl-gcc for rust project

I am trying to build yara static lib with a musl-gcc for my rust project. But when it is running CC="musl-gcc" \ CFLAGS="-I/usr/local/musl/include -I/usr/include/linux -I/usr/include/x86_64-linux-musl" \ LDFLAGS="-L/usr/local/musl/lib…