Skip to main content

Questions tagged [glibc]

glibc is GNU's implementation of the Standard C library.

Filter by
Sorted by
Tagged with
78 votes
2 answers
35k views

Why and how are some shared libraries runnable, as though they are executables?

On 32-bit Linux systems, invoking this $ /lib/libc.so.6 and on 64-bit systems this $ /lib/x86_64-linux-gnu/libc.so.6 in a shell, provides an output like this: GNU C Library stable release version ...
Ho1's user avatar
  • 2,634
63 votes
3 answers
237k views

How to update glibc to 2.14 in CentOS 6.5

I want to install Android NDK on my CentOS 6.5 machine. But when I ran the program, it says it needs glibc 2.14 to be able to run. My CentOS 6.5 only has Glibc 2.12 installed. So I tried to update ...
tonga's user avatar
  • 811
45 votes
4 answers
110k views

What is the difference between i686 and x86_64 packages?

I have a machine with both glibc i686 and x86_64, and a very annoying problem with glibc. Is it normal to have two libraries of the same name installed on one computer? How can I know which library ...
MUY Belgium's user avatar
  • 1,264
37 votes
4 answers
4k views

Does bash open files in O_APPEND when using ">>" on linux?

If we use echo 1234 >> some-file then Documentation says that the output is appended. My guess is that, if some-file does not exist, then O_CREAT will make a new file. If > was used, then ...
Prem's user avatar
  • 3,360
31 votes
3 answers
27k views

Can new glibc versions be used with an old kernel?

Apparently glibc can be compiled with --enable-kernel to support older kernel versions. However, I haven't been able to find information on what kernel versions are supported on a particular glibc ...
netvope's user avatar
  • 1,105
29 votes
2 answers
3k views

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) ...
syheliel syheliel's user avatar
29 votes
3 answers
38k views

How to deal with missing libcrypt.so.1 on Arch Linux?

How do you deal with a missing libcrypt.so.1 on Arch Linux? Trying to run openoffice4 (the LibreOffice binary) results in: /opt/openoffice4/program/javaldx: error while loading shared libraries: ...
blazingchrome's user avatar
29 votes
5 answers
38k views

Why is almost every program complaining about my locale?

I'm using Arch Linux, and I've followed the directions on the wiki about setting my locale. Nearly every program that runs complains about the locale - even locale. It looks like this: % locale ...
Shawn J. Goff's user avatar
26 votes
1 answer
1k views

What would be the best way to work around this glibc problem?

I administer a Gentoo Hardened box that uses file capabilities to eliminate most of the need for setuid-root binaries (e.g. /bin/ping has CAP_NET_RAW, etc). Infact, the only binary I have left is ...
Aaron Jones's user avatar
25 votes
2 answers
5k views

Why doesn't the Linux kernel have optimized functions like glibc does (e.g., memchr, strchr)?

When I try to implement the C string library myself, I found that glibc and the Linux kernel have a different way to implement some functions. For instance, glibc memchr and glibc strchr use some ...
Windsooon's user avatar
  • 385
23 votes
3 answers
166k views

Need to install glibc >= 2.14 on Wheezy

I am trying to get Protractor working for performing e2e angular testing, but protractor requires Selenium which requires ChromeDriver which requires glibc 2.14. My current development box is running ...
chris's user avatar
  • 503
21 votes
3 answers
7k views

SIGINFO on GNU Linux (Arch Linux) missing

I am developing an application and I would like it to print some runtime stats to the console on demand. kill and signals came to my mind immediately. Reading through Unix signals on Wiki, SIGINFO ...
Robert Rossmann's user avatar
20 votes
3 answers
30k views

how to run new software without updating GLIBC?

I installed Mathematica 9 on an old Red Hat Enterprise Linux AS release 4 system. After the installation, I tried to start Mathematica, but following message came out: /home/wcbao/M/Wolfram/...
user15964's user avatar
  • 713
17 votes
1 answer
13k views

Using alternate libc with ld-linux.so hacks; cleaner method?

I have a legacy system with a very old glibc, which we can't upgrade without incurring a mountain of testing/validation work. I have needed to run newer programs (such as Java 1.7) on that system ...
dataless's user avatar
  • 1,739
17 votes
1 answer
14k views

Installing two glibc alongside in debian/ubuntu

Is it possible to install and use two different glibc versions on the same machine. Where one version is only used to run legacy software, which relies on old glibc binaries? Is it possible to do ...
Elazar Leibovich's user avatar
15 votes
2 answers
5k views

How to make linux 'perf record' work for libc and libstdc++ symbols?

I'm using perf record -g on x86-64 Linux to profile a program. Several symbols in libc or libstdc++ have 0 as a parent: __GI___strcmp_ssse3 (libc) and strcmp@plt (libstdc++) for example. (I can ...
Benjamin Redelings's user avatar
14 votes
1 answer
52k views

How to fix "skipping incompatible /usr/lib/libc.a"

I get the following error when I try to build an embedded Linux target on a 64 bit Fedora 16 (Verne): make[3]: Entering directory `/export/home/git/minerva-5.x/third_party/multifiles' mips-linux-gnu-...
jacknad's user avatar
  • 243
14 votes
1 answer
8k views

Cross compiling GLIBC for my ARM SoC

I am seeing something really weird inside a chroot-ed Debian armel environment. But first, a bit of backstory... This is long, but the question is complex and any potential help depends on knowing ...
ttsiodras's user avatar
  • 2,371
14 votes
1 answer
7k views

Is there an easy method for installing binary builds of glibc?

Time and time again I see questions such as these: GLIBCXX 3.4.15 on Centos 6 CentOS 4.8 and glibc 2.5 And these are the types of solutions we're typically pushing: how to run new software without ...
slm's user avatar
  • 373k
13 votes
4 answers
3k views

uname is broken: how do I determine the currently running kernel?

> uname -r FATAL: kernel too old > cat /proc/cmdline FATAL: kernel too old There are 3 *.vmlinuz-linux files in /boot. How do I determine which kernel is currently running? Note that I'm ...
William Pursell's user avatar
13 votes
1 answer
7k views

Ghost Vulnerability - CVE-2015-0235

Does the Ghost Vulnerability require access (as in being a logged in user) to the effected OS in question? Can someone clarify the 'remote attacker that is able to make an application call'? I only ...
devnull's user avatar
  • 5,491
13 votes
1 answer
6k views

Unexpected sort order in en_US.UTF-8 locale

While trying to answer this question about SQL sorting, I noticed a sort order I did not expect: $ export LC_ALL=en_US.UTF-8 $ echo "T-700A Grouped" > sort.txt $ echo "T-700 AGrouped" >> ...
Andomar's user avatar
  • 288
13 votes
1 answer
7k views

What is in the output of "getent ahosts"?

What are the fields printed by getent ahosts DOMAIN? The output for getent hosts is a simple combination of IP and hostname. The getent ahosts has an additional third field that is, in all my test, ...
gioele's user avatar
  • 2,189
12 votes
2 answers
15k views

No 32 development library error after install glibc-devel.i686

I am trying to install gcc 4.9.0 on centOS 6. During ./configure there is an error coming up: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgcc_s.so when searching for -...
Gosere's user avatar
  • 223
11 votes
1 answer
31k views

How to properly upgrade glibc?

The firmware of my NAS comes with a rather old version of glibc, namely 2.5. In order to cope with some precompiled binaries linked* to glibc 2.15, I would like to upgrade it. From some simple testing ...
Tobias Kienzler's user avatar
10 votes
2 answers
12k views

Rpmdb checksum is invalid - Trying to install gcc in a CentOS 7.2 docker image

So I'm trying to create a Docker image that contains gcc. I'm running the command RUN yum -y install gcc within my Dockerfile. It downloads the package until it finally fails trying to install a ...
Strobe_'s user avatar
  • 435
10 votes
1 answer
5k views

How does glibc within a Docker image survive different container host kernels?

Docker containers share the kernel of the host, but they do include their own applications and libraries. Is it correct that glibc is one of these libraries? If so, how come there is no problem of ...
Overv's user avatar
  • 203
9 votes
3 answers
30k views

Yum says a package is installed, and not installed, and it's blocking other packages from being installed

I am trying to install a new package (glibc-static), and I get the following error ---> Package nss-softokn-freebl.i686 0:3.14.3-18.el6_6 will be installed --> Finished Dependency Resolution ...
Alan C.'s user avatar
  • 251
9 votes
1 answer
544 views

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 ...
user3528438's user avatar
9 votes
1 answer
13k views

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

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) ...
Paulo Tomé's user avatar
  • 3,792
9 votes
1 answer
18k views

How do I change the output of `date` back to 24-hour format?

Apparently a recent change (in Glibc 2.29?) causes the date command to start printing times in 12-hour format: $ date Fri 23 Aug 2019 07:34:13 PM PDT This is for my default locale $ cat /etc/locale....
Metamorphic's user avatar
  • 1,209
9 votes
2 answers
1k views

Would it be possible to compile and bootstrap GNU?

A new Guix release came out some time ago. And I got the idea that if I can bootstrap glibc, gcc, and guix to HURD and Mach, I can have a non-Linux GNU system. But I also need some software like bash, ...
toxemicsquire's user avatar
9 votes
1 answer
10k views

What is syscall-template.S?

I've come across a file syscall-template.S more specifically its location is .../sysdeps/unix/syscall-template.S What is this file? Where is it. It is not on my system and I cannot find it in source ...
HandyGandy's user avatar
  • 2,219
8 votes
1 answer
2k views

Why doesn't unsetenv() modify /proc/pid/environ?

I was just looking at this question and wrote a noddy program to demonstrate unsetenv() modifying /proc/pid/environ. To my surprise it has no effect! Here's what I did: #include <stdio.h> #...
Flup's user avatar
  • 8,225
8 votes
1 answer
1k views

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:...
TopherIsSwell's user avatar
8 votes
1 answer
15k views

Locally-installing glibc-2.23 causes all programs to segfault

I'm trying to upgrade glibc on a system on which I do not have root access. Therefore, I'm installing to a local prefix. I would like some help understanding best practices for setting this up, as ...
Kulluk007's user avatar
  • 293
8 votes
1 answer
5k views

Docker container shows, "sleep: cannot read realtime clock: Operation not permitted"

When I run apt-get dist-upgrade in Docker container, I'm getting, Unpacking libc6:i386 (2.31-1) over (2.30-8) ... Setting up libc6:i386 (2.31-1) ... Checking for services that may need to be restarted....
Evan Carroll's user avatar
  • 32.3k
8 votes
1 answer
19k views

Upgrading Ubuntu 14.04 to glibc 2.20 or greater

I have an application written in Go that is crashing frequently and I think it's related to an issue that was fixed in glibc 2.20. My Ubuntu 14.04.3 LTS has glibc 2.19 according to ldd --version. I'...
Brent's user avatar
  • 303
7 votes
1 answer
1k views

ld.so.cache and libc.so.6 memory-mapped for every call?

Playing with strace, it appears to me that ld.so.cache and libc.so.6 are opened and mapped to memory for almost every process. At least those processes that I experimented with. Doesn't this mean ...
smolloy's user avatar
  • 173
7 votes
3 answers
9k views

Where is stddef.h defined in Linux?

If I want to find the values of stddef.h, where is it defined? The /usr/include/linux/stddef.h almost has nothing, /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef ...
Evan Carroll's user avatar
  • 32.3k
7 votes
1 answer
3k views

How to rebuild glibc on Arch Linux?

It seems like MATLAB is royally screwed up on Linux, because it "dynamically loads some libs with static TLS", which doesn't mean anything to me other than I get bunches of errors. The suggested work ...
StrongBad's user avatar
  • 5,341
6 votes
3 answers
5k views

Can I build a linux distro with libc instead of glibc

I recently had a conversation with a friend who is a highly skill software engineer, and he showed me some articles outlining the fact libc was much better than glibc. I wonder if its possible to ...
yakamok's user avatar
  • 500
6 votes
1 answer
9k views

difference between libc6-dev and libc6

libc6-dev:amd64 package in Debian contains all the common header files in C programming like stdio.h, ctype.h, time.h, etc. Am I correct that libc6:amd64, which is as far as I know required by ...
Martin's user avatar
  • 7,686
6 votes
1 answer
11k views

Run a program with a newer libc

How do I run a program that was compiled against glibc 2.14 on an old system? I'm unable to update anything. Can I download newest glibc and somehow have the program use it instead of the installed ...
glo's user avatar
  • 61
6 votes
1 answer
42k views

How can I downgrade a glibc version?

I upgraded glibc for a reason that isn't around anymore so I want to downgrade it. The stupid thing is a lot of programs rely on glibc at the moment. I still have the 2.4 version on the system as the ...
almightyBob's user avatar
6 votes
1 answer
28k views

libc6 does not want to update to 2.29

I tried to install KiCad after i updated my Debian box to Debian 10, but i got the following error. The following packages have unmet dependencies: kicad : Depends: libc6 (>= 2.29) but 2.28-10 is to ...
Fletcher's user avatar
6 votes
1 answer
985 views

Where to find the source file of function pause(void) and sigsuspend(set)

I want to find the source file of pause and sigsuspend in the glibc-2.14.1 package. I grep the package and find the file sysdeps/posix/pause.c has a definition of function pause, the code is int ...
Jerome's user avatar
  • 193
6 votes
3 answers
2k views

Debian: How to solve ln: relocation error?

I am running Debian 7.1. I tried to apt-get install -f, and messed up. All command line returns ln: relocation error: /lib/arm-linux-gnueabihf/libc.so.6: symbol _dl_find_dso_for_object, version ...
Jill Clover's user avatar
5 votes
3 answers
7k views

Is the Solaris libc based on the GNU libc?

On Solaris: basename.c #include <stdio.h> #include <libgen.h> int main(int argc, char* argv[]) { int len = strlen(argv[0]); char *bsname = basename(argv[0]); printf("%s\n", ...
fliu's user avatar
  • 61
5 votes
6 answers
33k views

Why does "yum update" fails with many duplicates, after many months of no upgrades?

After many months (> 6) of no software upgrades, I logged into an EC2 instances running: Linux version 2.6.32-358.23.2.el6.x86_64 ([email protected]) (gcc version 4.4.7 ...
Kode Charlie's user avatar

1
2 3 4 5
7