Questions tagged [shared-library]

The tag has no usage guidance.

53
votes
2answers
14k 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 ...
43
votes
6answers
48k views

What C library version does my system use?

How can I tell for sure what userland C library my system uses? Possible reasons to need this information include: There's a gigantic source package I am considering downloading which I'm sure will ...
25
votes
3answers
13k views

Why nm shows no symbols for /lib/i386-linux-gnu/libc.so.6?

I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
22
votes
5answers
9k views

What system call is used to load libraries in Linux?

In strace outputs, the paths to the libraries that executables call are in calls to open(). Is this the system call used by executables that are dynamically linked? What about dlopen()? open() isn't a ...
17
votes
1answer
2k views

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

I have a binary executable named "alpha" that requires a linked library (libz.so.1.2.7) which is placed at /home/username/myproduct/lib/libz.so.1.2.7 I export the same to my terminal instance before ...
11
votes
3answers
49k views

How to check if a shared library is installed?

My question originates from my problem in getting ffmpeg started. I have installed ffmpeg and it is displayed as installed: whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/bin/X11/ffmpeg /usr/share/...
9
votes
2answers
7k views

Why can't I install multiple versions of a shared library?

There are often instances where a certain program will depend on library version x.y and another on x.z but, as far as I'm aware, no package manager will allow me to install both x.y and x.z. ...
9
votes
2answers
18k views

How do I find out the version number of an installed library?

Question relevant to RedHat/CentOS. I'm a little confused between package and library and how to pin them to a fixed version. There's an X11 rollover bug in recent libxcb versions that affects my C ...
8
votes
1answer
3k views

Shared library mappings in /proc/pid/maps

Why does /proc/pid/maps contain a few records for the same library ? Here is an example: 7fae7db9f000-7fae7dc8f000 r-xp 00000000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++....
8
votes
3answers
27k views

LD_LIBRARY_PATH always blank after sudo

I get shared library errors whenever I seem to install software manually. Upon executing echo $LD_LIBRARY_PATH it shows up as.. nothing. I've tried adding /usr/local/lib to a .conf file in /etc/ld.so....
8
votes
1answer
808 views

Tool to trace library calls in Linux/ARM

I am searching for a tool that allows to trace calls to functions in shared libraries in Linux/ARM. Basically, I want to be able to specify a command line and let this tool produce a record of called ...
6
votes
2answers
411 views

Why are .so packages provided by the devel packages?

I've seen an interesting pattern in RPM packaging. The main library package will include the shared library itself: /usr/lib64/libavcodec.so.54 The -devel package will provide headers and a symlink: ...
6
votes
3answers
3k views

How to make a portable Linux app?

I'd like to make a "portable" version of Emacs 24.3. I am using some Debian 7 systems, where I don't have root access. Since Debian 7 is missing Emacs 24, I'd like to build a portable version of it, ...
5
votes
1answer
2k views

Why can't I execute Android x86 executables on Linux

I am trying to port Android apps to Linux (don't laugh :) and I have come across a problem. When trying to execute an Android executable (app_process) after adding the executable permission with ./...
5
votes
2answers
8k views

Relationship between ldconfig and ld.so.cache

After I restart my computer, ld.so.cache still has the information in it, so my questions are as follows: Is the information always kept there? Isn't it being removed after restart or something like ...
4
votes
3answers
1k views

Centos 7, I thought “yum install ___” was supposed to get all the dependencies, too?

I want to install Trillian onto my CentOS 7 box. I went to www.trillian.im/get/linux/6.1/linux.html and downloaded the rpm package trillian-6.1.0.5-1.fc25.x86_64.rpm. It was my understanding that ...
4
votes
1answer
500 views

Fix hardcoded dynamic linking for executable

I have an executable file called reg with the following shared library dependencies: [terminal]$ ldd ./reg linux-vdso.so.1 => (0x00007ffc40d90000) libpthread.so.0 => /lib64/libpthread.so.0 (...
4
votes
1answer
7k views

What is the purpose of libimf.so?

I am running Ubuntu 14.04 and am having various issues with libimf.so (see my questions on Ask Ubuntu: 1, 2). While waiting to sort those issues out, I am trying to figure out what libimf.so is ...
4
votes
1answer
7k views

Is the vdso shared library (linux-vdso.so) the library that contains the kernel object code (system calls)?

I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls? I know that ...
4
votes
2answers
5k views

Is it OK to sort /etc/ld.so.conf

I am wondering if I can keep the entries in /etc/ld.so.conf sorted. My ld.so.conf looks now like this: /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/lib64/Xaw3d /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /...
4
votes
1answer
14k views

How to change the paths to shared libraries (.so files) for a single terminal instance

I want to remove some of the paths the linker uses to find .so libraries for testing purposes. I have found a way to add library paths: export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/library" ...
4
votes
1answer
430 views

what is the syntax of INPUT in so file

When I study the Clang for x86_64 Ubuntu 16.04 Pre-Built Binaries, I see that the libc++.so is not a soft link to the real shared library, it is a text file with text: INPUT(libc++.so.1 -lc++abi) So ...
4
votes
1answer
877 views

Why do some files of working packages return “not found” for some libraries of ldd's output?

I'm finding a bunch of stuff where working packages contain files where ldd returns "not found" for some libraries. For example... /usr/lib64/thunderbird/libprldap60.so libldap60.so => not ...
4
votes
1answer
2k views

How to deal with conflicting names of two shared libraries?

On my Linux Mint 17.3 system, I installed the packages libglfw2 and libglfw-dev. Since GLFW v3 is not available in repositories, I chose to compile it manually using instructions here. Almost all ...
4
votes
1answer
66 views

Placed library in /usr/lib, but ldconfig doesn't put it in cache

I'm starting a project that requires an external shared library third-party.so. I've placed it in /usr/lib. However, when I run sudo ldconfig -v, it's not listed. ldconfig -p | grep third-party.so ...
4
votes
1answer
915 views

anaconda Qt vs system Qt

The anaconda python framework includes its own Qt shared libraries, among other ones. Because of the nature of the framework, it must appear first in the PATH environment variable so its python ...
3
votes
1answer
69 views

Breaking down rpm's identifiers for shared-library files

If I run something like: rpm -q --fileprovide foo-1.0.0-0.x86_64 I get a list of files, and some of them have an identifier on the right for them, like: /usr/lib64/bar.so.4 bar.so.4()(64bit) ...
3
votes
2answers
231 views

What does 10 mean in libgmp10 library?

My system has libgmp.so.10.2.0 while official source says current version is 6.1.2. Is this specific to GMP? Would having libgmp.so.42.0.0 be OK? Debian adds another number "2" to the mix (ignoring ...
3
votes
3answers
5k views

How do I detect running processes using a library package?

This command is doing the rounds for detecting currently running processes using glibc: lsof | grep libc | awk '{print $2}' | sort | uniq I find it intensely annoying, since /libc/ matches not only ...
3
votes
1answer
716 views

How to ensure that a shared library will have its memory pages shared by several processes?

Let me first describe what I want to do, followed by what I manage to do, and finally my issue. Goal: implementing flush+flush cache attack in C I am trying to implement in C the flush+flush cache ...
3
votes
1answer
1k views

How to add shared library dependencies to debian/control?

I am trying to make a debian package from a Qt application relying on OpenCV. What I did so far: I set up an Ubuntu in a Virtualbox I installed the neccessary software to compile and run the ...
3
votes
1answer
41 views

error while loading shared libraries; file too short

I am working on a CentOS 7 workstation. I had installed Rstudio and it was working fine until recently. But now, if I try to launch it at http://localhost:8787/ I get an error that says Unable to ...
3
votes
1answer
119 views

Shared library minor version management

I have a simple program called main: #include <iostream> #include "random.h" int main() { std::cout << "The program has started\n"; return get_another_random_number(); } ...
3
votes
2answers
14k views

Text file busy when I copy some files

I have this error when I want to copy some files My command: cp -rf /sasech/xgedff/pur/liv/v15h30050-DLIV0177521/dmesa/bin/* /applis/rgedff/pur/bin Results: cp: /applis/rgedff/pur/bin/../bin/lib/...
3
votes
1answer
2k views

How to compile shared library on AIX

I have a simple shared library that is currently compiled on Linux using: gcc -c -fPIC foo.c -o foo.o gcc -shared -o foo.so foo.o I need to relay instructions to a colleague for compiling the same ...
3
votes
1answer
769 views

Does the Linux loader (ld.so) follow symlinks?

I have stumbled upon a problem by trying to move the ld.so.cache file to another location. I have tried to create a symlink for it in its previous location -- /etc/ -- but it seems that the loader ...
3
votes
1answer
789 views

Shared library on NFS mount not found from one host, works fine from another

I am experiencing some very weird behaviour regarding the loading of a shared library from an NFS4 mount, and am hoping someone can shed light on it. Consider the following: $ ucto ucto: error ...
3
votes
1answer
1k views

Why when loading an SO file does it append a version to the end?

I use CMake and Ninja to build a test executable of mine written in C++. I use gcc 4.8. I'm on Ubuntu 14. I run CMake to configure the ninja build scripts, then I run ninja to build. I specify the ...
3
votes
1answer
2k views

Grub-customizer: error while loading shared libraries: libarchive.so.13: cannot open shared object file: No such file or directory

I wrote this question at stackoverflow and got recommended I prob would have a better shot here. So I'm trying to install grub customizer so I can make Windows the default OS to boot since I use that ...
3
votes
1answer
274 views

Satisfying lib dependency

I have a program (which I will call foo here) compiled for x64 (my current arch). When I try to run it, it goes: ./foo: error while loading shared libraries: libgmp.so.3: cannot open shared object ...
3
votes
2answers
61 views

Optimize file layout for minimal seek in specific situations

Starting VLC is slow on my system. The reason: it reads more than 1000 different .so files. Is there a way to make it read those files faster? I think if all the files followed immediately after each ...
2
votes
3answers
949 views

Why does linux not allow multiple versions in the central repository?

It seems to me that a lot of the problems using Linux is because of mismatched dependencies. Specifically that you can't install two versions of a library. So if program A requires "lib1.2" and ...
2
votes
1answer
467 views

What does “unused direct dependencies” mean?

When using the ldd command there is an option, -u, to print unused direct dependencies as stated in the on-line help. For example: ldd -u /bin/gcc Unused direct dependencies: /lib64/...
2
votes
2answers
3k views

How to chroot to provide a new glibc version to an app?

I am trying to run a program, but when I execute it the following error appears : ./app: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./app) At first I read to ...
2
votes
1answer
2k views

What do the multiple GLIBC versions mean in the output of ldd?

The ldd program reports some missing shared libraries that my shared library needs. (I built it on a different machine with Red Hat Linux 7 and want to run it on another with Red Hat Linux 6.) In the ...
2
votes
1answer
476 views

Are shared library ABI compatible as long as their versions are the same?

Suppose I have a program compiled that's linked against libc.so.6 on one system (e.g., Ubuntu x64). If I take this binary to another system that has the same libc version 6 (e.g., Fedora x64), it ...
2
votes
1answer
1k views

How to know if bash has readline library support?

This question is related to https://askubuntu.com/q/826288/295286 In my search online, I could find no mention of whether bash 3.2 comes with readline support. Thus, I would like to know, if there is ...
2
votes
1answer
621 views

non-reentrant libraries in shared memory?

I found this Q&A saying shared libraries can be shared between processes using shared memory. It seems like it would be impossible, though, to share code between processes without some pretty ...
2
votes
2answers
2k views

how an expression which contains LD_DEBUG is processed?

An example usage of LD_DEBUG looks like this: LD_DEBUG=libs applicationName LD_DEBUG=libs is just an assignment - so how it works (prints result) in bash ?
2
votes
1answer
787 views

Types of dynamic linking in Unix/Linux environments

When creating a windows static library, we simply create a .lib file which should be included in the linker path. When creating a windows shared library, along with the .dll, we also a generate a ....