91
votes
How to update glibc to 2.14 in CentOS 6.5
You cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc. Here is how:
mkdir ~/glibc_install; cd ~/glibc_install
wget http:...
42
votes
Accepted
Why doesn't the Linux kernel have optimized functions like glibc does (e.g., memchr, strchr)?
The kernel does have optimised versions of some of these functions, in the arch-specific directories; see for example the x86 implementation of memchr (see all the memchr definitions, and all the ...
36
votes
How to deal with missing libcrypt.so.1 on Arch Linux?
I had the same issue and I fixed it by installing the libxcrypt-compat package, which is now available from the core repository.
36
votes
Accepted
What does "6" mean in glibc.so.6?
The 6 suffix is used for historical reasons, detailed in man libc on Linux. Essentially, a fork of the GNU C library was used on Linux; this released major versions 2 through 5. Version 5 used ELF and ...
26
votes
Can new glibc versions be used with an old kernel?
For some versions of glibc, the announcement email says which kernel versions are compatible.
glibc Released Requires Linux kernel version
------------------------------------------------------...
19
votes
Accepted
uname is broken: how do I determine the currently running kernel?
You have upgraded your libc (the most basic system library) and now no program works. To be precise, no dynamically linked program works.
In your particular scenario, rebooting should work. The now-...
16
votes
Accepted
Why doesn't unsetenv() modify /proc/pid/environ?
When a program starts, it receives its environment as an array of pointers to some strings in the format var=value. On Linux, those are located at the bottom of the stack. At the very bottom, you have ...
14
votes
What does "6" mean in glibc.so.6?
It is the ABI (Application Binary Interface) version.
It is only incremented when a breaking change is made, which is now strongly avoided for libc, hence most distributions having been on libc.so.6 ...
14
votes
Accepted
Does mtrace() still work in modern distros?
mtrace still works, but the man page is outdated. The reference documentation explains how to use it:
LD_PRELOAD=/usr/lib64/libc_malloc_debug.so.0 MALLOC_TRACE=/tmp/t ./t_mtrace
(replace with the ...
12
votes
Accepted
difference between libc6-dev and libc6
Check out the package descriptions; for libc6:
Contains the standard libraries that are used by nearly all programs on the system. This package includes shared versions of the standard C library ...
11
votes
Accepted
What happened to llseek and e2fsck?
The problem was that glibc included a llseek symbol, with no corresponding declaration in its header files. e2fsck’s configuration script detected the symbol, and assumed that meant the function was ...
10
votes
Accepted
Rpmdb checksum is invalid - Trying to install gcc in a CentOS 7.2 docker image
I was having this exact issue when creating a Docker image. First installing yum-plugin-ovl, which is a yum plugin for the Docker overlay fs, fixed the issue for me.
Example:
...
RUN yum -y ...
10
votes
What is the difference between i686 and x86_64 packages?
i686 packages are intended to be executed on 686-compatible processors, which includes all Intel 32-bit x86 processors up to and including the Pentium 4, etc. as well as processors
from AMD (AMD K6) ...
10
votes
Accepted
Why is the integer value of SIGRTMIN (first real-time signal) 34 and not 32?
The answer to this question can be found in signal(7) man page, in Real-time Signals section
Real-time Signals
Linux supports real-time signals as originally defined in the POSIX.1b real-time ...
9
votes
How to update glibc to 2.14 in CentOS 6.5
To install glibc 2.14 in parallel, add the configure prefix:
tar zxvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build
../configure --prefix=/opt/glibc-2.14
make -j4
make install
Following this ...
9
votes
Accepted
Why is sigset_t in glibc/musl 128 bytes large on 64-bit Linux?
I don’t know the original reason; back in 1996, the Linux-specific header was added with the following definition:
/* A `sigset_t' has a bit for each signal. Having 32 * 4 * 8 bits gives ...
9
votes
Accepted
How does glibc within a Docker image survive different container host kernels?
Linux kernel is rather binary compatible when considering apps. If you see an incompatibility, it is most likely caused by
a. CPU architecture mismatch (obviously unrelated to kernel version) or
b. ...
8
votes
Accepted
How to perform argument parsing in C?
How can I parse argument using C?
POSIX provides getopt for parsing command-line arguments.
On Linux systems, the GNU C library provides an extended getopt_long function that allows for long named ...
8
votes
Can new glibc versions be used with an old kernel?
You can check in in the sources. General dependency is defined in sysdeps/unix/sysv/linux/configure.ac and currently (in master branch, before 2.32 release) is: 3.2.0
There are some architecture ...
8
votes
How do I change the output of `date` back to 24-hour format?
As suggested by jamespharvey20 on IRC, I just changed LC_TIME to another locale. I set it in /etc/locale.conf:
$ cat /etc/locale.conf
LANG=en_US.UTF-8
LC_TIME=en_GB
I also exported this value of ...
7
votes
Accepted
Are keywords in resolv.conf case sensitive?
They are certainly case sensitive in the glibc resolver libraries. Note the use of strncmp (case sensitive compare) rather than strncasecmp (case insensitive compare) in the MATCH function within ...
7
votes
Accepted
ld.so.cache and libc.so.6 memory-mapped for every call?
Yes, every process gets its own mapping of the libraries it needs.
Yes, most of the data is shared, so every process “sees” the same physical memory (at different linear addresses), assuming the same ...
7
votes
Accepted
How to install man pages for certain libc functions?
You should install manpages-dev, which provides manpages for system calls and a number of library functions, and the -dev and (if any) -doc packages for the libraries you’re developing with.
For ...
7
votes
Why doesn't the Linux kernel have optimized functions like glibc does (e.g., memchr, strchr)?
I remember that I had to fix a kernel core dump bug in Solaris in 2006 that was triggered with a ISO-9660 + Rock Ridge file system created by something other than mkisofs.
That ISO formatting ...
7
votes
Accepted
What mandates the _start entrypoint (kernel, ld-linux.so, etc.)?
The entry point is conventionally named _start, and is defined in the C runtime assembly routine that is linked into the executable. This short piece of code is responsible for setting up the stack, ...
7
votes
Accepted
Can a process background itself?
I just want to answer the literal question here: can a process background itself, as opposed to fork itself, continue execution in the child and exit so that the process waiting for it can resume ...
7
votes
How can I get glibc/libstdc++ sources and set them up for gdb to find?
The simplest way is to extract the package source code somewhere: go to an appropriate directory, then run
apt source glibc
In gdb, add the corresponding directory to the source path by using the ...
6
votes
uname is broken: how do I determine the currently running kernel?
That appears to be the error glibc throws if it's running on a kernel that is older than what the library is compiled to support. The error message is in the DL_SYSDEP_OSCHECK(FATAL) macro in sysdeps/...
6
votes
Accepted
Where is stddef.h defined in Linux?
The C standard does not distinguish compiler features from library features. The distinction is an implementation detail and can vary from platform to platform, but there are common trends. For ...
6
votes
Accepted
Arch Linux - pacman -Syu failed - cannot issue any commands
This is documented on the pacman page of the wiki:
In the case that pacman crashes with a "database write" error while
removing packages, and reinstalling or upgrading packages fails
thereafter,...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
glibc × 310linux × 84
centos × 39
debian × 36
gcc × 32
compiling × 28
rhel × 22
linux-kernel × 18
c × 16
libraries × 16
upgrade × 14
ubuntu × 13
dynamic-linking × 13
kernel × 11
apt × 11
arch-linux × 10
yum × 10
rpm × 10
cross-compilation × 10
lfs × 10
software-installation × 9
locale × 9
package-management × 8
dependencies × 7
shared-library × 7