glibc

How to validate self-build GNU toolchain and newlib?

How to validate self-build GNU toolchain and newlib? I am working on an embedded system, where there is ARM SOC and RTOS. I have built GNU toolchain with newlib for this embedded system, and did very basic testing. Now before I can be sure to use the self-build toolchain, I want to test it (and …

Total answers: 1

Does mtrace() still work in modern distros?

Does mtrace() still work in modern distros? tldr: Does mtrace still work or am I just doing it wrong? I was attempting to use mtrace and have been unable to get it to write data to a file. I followed the instructions in man 3 mtrace: t_mtrace.c: #include <mcheck.h> #include <stdlib.h> #include <stdio.h> int main(int …

Total answers: 1

What does "6" mean in glibc.so.6?

What does "6" mean in glibc.so.6? When exploring the C++ binary, I find that libstdc++.so.6 is dyn-linked into libm.so.6 and libc.so.6: $ ldd /lib/x86_64-linux-gnu/libstdc++.so.6 linux-vdso.so.1 (0x00007ffcb737b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd3b2295000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd3b1c00000) /lib64/ld-linux-x86-64.so.2 (0x00007fd3b2396000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd3b2275000) My questions are: What does 6 mean in the name? I originally thought it was …

Total answers: 2

Changing the path opened by openat of a program using LD_PRELOAD

Changing the path opened by openat of a program using LD_PRELOAD I want to change a path that a program actually opens on filesystem for some paths. The reason is that I want to run a program in parallel, but that program uses /tmp/somedir/ as its temporary directory and parallel instances run into conflicts. I …

Total answers: 1

Why is MB_CUR_MAX 6 instead of 4 for UTF-8? (Linux, glibc)

Why is MB_CUR_MAX 6 instead of 4 for UTF-8? (Linux, glibc) MB_CUR_MAX is defined by glibc as ‘a positive integer expression that is the maximum number of bytes in a multibyte character in the current locale.’ If I print the value I get 1. I assume that this is because C uses the C locale …

Total answers: 1

Version scheme change of libc6 libraires from focal to jammy

Version scheme change of libc6 libraires from focal to jammy Hello Ubuntu community, I notice that the Version scheme changes on libc6 libraries from focal to Jammy (i.e On the jammy libc6 packages i observe that on the libraries name minor version has been dropped out and only major is present which is not the …

Total answers: 1

Do you have to install newer Debian versions to use newer software?

Do you have to install newer Debian versions to use newer software? I am still on Debian Buster, which has old libraries in its repository. I am unable to use newer software, because for example, they require a libc.so.6 library with version GLIBC_2.30, which doesn’t exist in the buster main repository. People write that you …

Total answers: 1

Man pages, syscalls, and libc

Man pages, syscalls, and libc Why is epoll_create not listed as a library function (man pages, section 3), but accept is? While both functions are provided by libc and both refers to kernel syscalls? I know that "why" questions are not usually welcomed, but it’s my way to ask for a better fine-grained understanding on …

Total answers: 1

Install libc-bin 2.36 on Debian 11

Install libc-bin 2.36 on Debian 11 I need to upgrade libc-bin from the current stable version to 2.36 on Debian 11. I have tried to do so by downloading the .deb package from http://ftp.us.debian.org/debian/pool/main/g/glibc/libc-bin_2.36-8_amd64.deb, however when I install it with dpkg –install package.deb, I am then unable to use apt install because it asks me …

Total answers: 1

Ubuntu 22.04: Both eye of gnome and gimp failing with undefined symbol error

Ubuntu 22.04: Both eye of gnome and gimp failing with undefined symbol error Since a few days both eog and gimp fail when launched from the command line. I get the same error message from both: gimp: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE eog: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version …

Total answers: 1

Why is `man 3 printf` almost one year behind `glibc ver 2.35`?

Why is `man 3 printf` almost one year behind `glibc ver 2.35`? glibc ver 2.35 was released 0n Feb 3, 2022, and added the %b and %B binary conversion specifiers. This is a long wished-for feature to display values as a string of "ones and zeros". I’d like to use it. I am running Ubuntu …

Total answers: 1

What happened to llseek and e2fsck?

What happened to llseek and e2fsck? lseek man page: When users complained about data loss caused by a miscompilation of e2fsck(8), glibc 2.1.3 added the link-time warning "the llseek function may be dangerous; use `lseek64 instead." This makes this function unusable if one desires a warning-free compilation. Since glibc 2.28, this function symbol is no …

Total answers: 1

build binary on one distribution to run on other distribution

build binary on one distribution to run on other distribution I want build a quite simple command line client application on a docker container to provide that application to customers. The application uses a CAN to USB adapter from PEAK (company building this adapter). PEAK provides a library (libpcanbasic), that the application is using to …

Total answers: 1

Is it safe to snprintf with output to NULL and size 0?

Is it safe to snprintf with output to NULL and size 0? Is it safe to call snprintf(NULL, 0, "…", …)? I can also ask in other way: Does snprintf write the NUL char if size is 0? The example in Linux man-pages manpage printf(3) provides an example that does that, but in the rest of …

Total answers: 1

Why do I have libc.so.6 under /usr/lib/x86_64-linux-gnu directory?

Why do I have libc.so.6 under /usr/lib/x86_64-linux-gnu directory? After I read this question difference between libc6-dev and libc6 , I started a fresh Ubuntu 20.04 LTS VPS and went checking what files are included in some Ubuntu packages. I checked libc6-dev (https://packages.ubuntu.com/focal/amd64/libc6-dev/filelist) and libc6 (https://packages.ubuntu.com/focal/amd64/libc6/filelist). As we can see, the libc6-dev have those share libraries …

Total answers: 1

How to run sublime text in Musl LibC (Void Linux)

How to run sublime text in Musl LibC (Void Linux) How i can run sublime text in Void Linux with musl LibC (not glibc) without using chroot or flatpak? Asked By: hasanfirdaus79 || Source Since sublime text is shareware, you’re probably not in the position to re-link it to your own libc. So, no. It …

Total answers: 2

How to uninstall glibc

How to uninstall glibc I was trying to install and launch a Mathematica on a server, but it couldn’t find glibc: /lib64/libc.so.6: version `GLIBC_2.14′ not found I installed a glibc-2.0 in my account, but I didn’t install it correctly. I couldn’t run almost any command after installing it. For example, when I ran ls, I …

Total answers: 1

How to upgrade libc6 (glibc) beyond v 2.31 on Ubuntu 20.04?

How to upgrade libc6 (glibc) beyond v 2.31 on Ubuntu 20.04? I am using the Stockfish chess engine within some GUI, but yesterday it stopped working. I hadn’t changed the engine, nor the interface, but when I tried to run the engine it "terminated with code…", but it didn’t output any code. The only thing …

Total answers: 2

Install kernel 5.15.0 on Ubuntu 18.04

Install kernel 5.15.0 on Ubuntu 18.04 I installed the newer 5.15.0 kernel onto my Linux Mint 19.3 (Ubuntu 18.04) by https://github.com/pimlie/ubuntu-mainline-kernel.sh . All worked fine, but not for kernel headers which gave me an installation error due to the expected LIBC version that must be >= 2.34, instead of Ubuntu 18.04 that is shipped with …

Total answers: 2

Why is the integer value of SIGRTMIN (first real-time signal) 34 and not 32?

Why is the integer value of SIGRTMIN (first real-time signal) 34 and not 32? Examining the output of kill -l command $ kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) …

Total answers: 1