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

Override file access functions with statically linked musl (to implement a read-only virtual FS)

If dlsym is available in dynamic linking setup, I can get access to the original impl pointers using dlsym with RTLD_NEXT and use them in my overrides, e.g. as follows: // paste these in main.c #define _GNU_SOURCE #include #include…
Vadim Kantorov
  • 930
  • 1
  • 10
  • 28
0
votes
2 answers

Musl mmap ENOMEM

I compiled some cross compilers against musl(x86_64, i686, arm). I need to compile code, that allocate like 2048 Mb +- 200Mb. However I noticed some errors with i686 musl compiler: #include #include #include…
Rainbow
  • 29
  • 6
0
votes
0 answers

strace compiled with aarch64-musl-gcc do not support -k option and can not track user space function?

I meet a problem these days. I ported strace for an aarch64 device and the compiler gcc I use is bond to musl not glibc. when I used -k option to track user space function I found that -k option is not supported. So what can I do to make -k option…
yooky
  • 1
0
votes
1 answer

how to build perf tools with riscv64-linux-musl-x86_64?

build perf tools in linux_5.10 kernel make CROSS_COMPILE=riscv64-unknown-linux-musl- ARCH=riscv64 Makefile.config:417: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. Makefile.perf:232: recipe for target 'sub-make'…
0
votes
1 answer

Compile error with aarch64-linux-musl-cross but not with gcc/g++ (error: ‘string’ in namespace ‘std’ does not name a type)

I'm trying to cross compile vSOMEIP and CommonAPI for ARM with musl (aarch64-linux-musl-cross). I use the following versions: CommonAPI 3.1.10.1 - successfully compiled Boost 1.59.0 vsomeip 2.14.16 - compile error Further, I'm using a Docker…
Thomas K
  • 42
  • 6
0
votes
0 answers

DT_HASH and DT_GNU_HASH produce different values

I am reading the dynamic symbol table .dynsym and checking the DT_HASH and DT_GNU_HASH entries. Oddly, I found out that the values are different. I know that DT_GNU_HASH can be a bit complicated to implement however to start I am simply using musl…
Setheron
  • 3,520
  • 3
  • 34
  • 52
0
votes
1 answer

How can I extract only executable path and args from cmdline in linux?

I am writing a python application, which uses Popen to start other exectutables. I then use Psutil to collect information about them. One of the things I need is the exact CMD I used to start the application. For example: >>> p = psutil.Popen( …
Slav
  • 147
  • 2
  • 13
0
votes
1 answer

Static build of Nginx

I am preparing a Docker image that intends to use a static build of Nginx RUN set -ex \ && wget -qO- github.com/nginx/nginx/archive/"$NGINX_HASH".tar.gz | tar zx --strip-components=1 \ && ./auto/configure --without-http_rewrite_module…
Rodrigo
  • 135
  • 4
  • 45
  • 107
0
votes
1 answer

3rd party library complains about types when building on alpine

I'm trying to build a static version of libnfnetlink on an alpine build container. It uses the usual autogen->configure->make->make install route but for some reason it complains at the make stage about unknown types (u_int8_t, u_int16_t etc) The…
incubus
  • 681
  • 1
  • 5
  • 21
0
votes
1 answer

Buildroot cross-compiling - compile works but linking can't find various SDL functions

I have some code that I could cross-compile with an older toolchain that used uClibc, but the project is moving to musl libc, and I can't seem to get the code to compile with that toolchain. It always fails during the linking stage with a bunch of…
Nathan Friedly
  • 7,837
  • 3
  • 42
  • 59
0
votes
1 answer

Undefined reference in static library to global symbol included in an earlier included static library?

I am trying to build an application statically for RISC-V without standard includes and without a standard lib, and instead am trying to link in a statically built musl-libc using its libc.a and crt1.o files (Note, I built crt1.o into a static…
ballsmahoney
  • 141
  • 1
  • 6
0
votes
1 answer

How to compile C program using Clang and libc other than provided by system, eg. musl?

According to clang's documentation, Clang supports a wide variety of C standard library implementations. But it lacks the information about how to actually use desired libc. For example, how to use clang with musl if my system provides Glibc by…
Anthony
  • 1,877
  • 17
  • 21
0
votes
1 answer

How to determine which compiler flag/option causes "--p" to be passed to assembler?

I am trying to build the musl C library using a custom risc-v toolchain that uses GNU gcc version 8.1.0, GNU assembler version 2.34. The error I get is the following: home/guillermo/toolchain/as: invalid option -- 'p' However, using the verbose…
ballsmahoney
  • 141
  • 1
  • 6
0
votes
1 answer

Problems with using Qemu user mode to run an ARM64 binary

I'm trying to run an ARM64 binary on my Kali Linux machine using Qemu user mode. This is the binary ~$ file arm_binary arm_binary: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1,…
Revoltechs
  • 195
  • 3
  • 9
0
votes
0 answers

gettext won't build libintl.so

I am trying to get libintl.so compiled on musl-based distro, but running ./configure && make in the directory containing source code, which I get from https://savannah.gnu.org/projects/gettext/ does not build any libintl objects. Furthermore,…
beardeadclown
  • 327
  • 2
  • 14
1 2 3
9
10