glibc, glib and gnulib

glibc is a core C runtime library. It provides things like printf(3) and fopen(3). glib is an object-based event loop and utility library written in C. gnulib is a library that provides an adapter from the POSIX API to the native API. All three are used for completely different tasks.

GLIBCXX versions

Use readelf -a and objdump -x to inspect ELF files in preference to strings. Actually, all the GLIBCXX_* versions don’t apply to the entire library, but to each symbol (symbol versioning, see DSO-howto). So you can have e.g: std::char_traits<wchar_t>::eq@@GLIBCXX_3.4.5 and std::ios_base::Init::~Init()@@GLIBCXX_3.4 on the same library file. The fact that your program needs GLIBCXX_3.4.9 probably means … Read more

Error while importing Tensorflow in Python 2.7 in Ubuntu 12.04. ‘GLIBC_2.17 not found’

I’ve just managed to install tensorflow 0.12rc0 on CentOS 6.5 with glibc 2.12, without having root privileges. Simply installing tensorflow binary via pip was giving me an error, related to GLIBC version as well. Basically, you have 4 options how to deal with this (each with some advantages and disadvantages): Option 1 – Upgrade your … Read more

What is _GLIBCXX_USE_NANOSLEEP all about?

When libstdc++ is built its configure script tests your system to see what features are supported, and based on the results it defines (or undefines) various macros in c++config.h In your case configure determined that the POSIX nanosleep() function is not available and the macro is not defined. However, as you say, nanosleep() is available … Read more

What is __i686.get_pc_thunk.bx? Why do we need this call?

This call is used in position-independent code on x86. It loads the position of the code into the %ebx register, which allows global objects (which have a fixed offset from the code) to be accessed as an offset from that register. Position-independent code is code that can be loaded and executed, unmodified, at different addresses. … Read more

What’s the meaning of the %m formatting specifier?

m conversion specifier is not C but is a GNU extension to printf: From GNU documentation: http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html The ‘%m’ conversion prints the string corresponding to the error code in errno. See Error Messages. Thus: fprintf (stderr, “can’t open `%s’: %m\n”, filename); is equivalent to: fprintf (stderr, “can’t open `%s’: %s\n”, filename, strerror (errno)); The ‘%m’ … Read more