Sponsored Content
Top Forums UNIX for Advanced & Expert Users Naming conventions for shared libraries in Linux Post 302259651 by Corona688 on Tuesday 18th of November 2008 03:33:14 PM
Old 11-18-2008
They are version numbers, and are there for two reasons; so that you can safely and easily upgrade your libraries, and so you can have more than one version of them installed at the same time.

When there's two numbers there's a major and a minor version. libncursesw.so.5.6 has major version 5 and minor version 6; in theory any minor version of the same major version is compatible without recompiling, so programs that linked to libncursesw.so.5 wouldn't miss a beat if you upgraded to 5.7 for a bugfix. If you had an ancient program demanding version 4, you could safely install a 4.x library alongside the 5.x ones, and nothing but that program would use it.

Sometimes programmers don't think that far ahead though; they might link to a too specific version, breaking their program every time you upgrade a library, or link to libncursesw.so itself, causing crashes and/or strange runtime errors when the library's not what they expected.
 

10 More Discussions You Might Find Interesting

1. Programming

Shared libraries

Hello everybody, I am having major problems at the moment with shared libraries and I have to little knowledge of them to solve them. So please, please help me :) Ok this is the problem: I have a library A, which uses B and C, and C uses again D. If I try to run A as plugin in apache,... (0 Replies)
Discussion started by: Micky
0 Replies

2. Programming

shared libraries

I am compiling code which produces .a and .la libraries. How can I produce .so libraries? I know that gcc -shared does but how? (2 Replies)
Discussion started by: thalex
2 Replies

3. Linux

Shared Libraries

How do i make a library shared say i have a library a.so which i have just compiled. I want to make it shared how do i make it Next Queation is what is the difference between a.so.0 a.so.1 a.so.2 & a.so :rolleyes: (1 Reply)
Discussion started by: wojtyla
1 Replies

4. Programming

how to view loaded shared libraries by running processes in linux

anybody knows how to view loaded shared libraries by running processes in linux enviornment? any command or tool ? thanks a lot (3 Replies)
Discussion started by: princelinux
3 Replies

5. UNIX Desktop Questions & Answers

Naming convention for Libraries..

Hi All, I need to know standard naming convention for Unix libraries (including all flavours of unix)..As I have gone through some sites and found out The UNIX convention for naming of libraries is lib<name>.so.<major>.<minor>.<revision> so is it statndard . also does it change... (0 Replies)
Discussion started by: rkshukla14
0 Replies

6. UNIX for Advanced & Expert Users

static and shared libraries

can someone explain whether my understanding is correct lets suppose we have a program that uses library x. if x is static then the code of x will be part of our program, so if we're going to have 5 executables of our program, then each executable will have x as part of it. Also, x does not... (2 Replies)
Discussion started by: JamesByars
2 Replies

7. Solaris

A query on Disk naming conventions in Solaris.

These are findings by me with my little experience with Solaris 10. Please correct me if wrong.. In x86 systems with ide hard disk: c= controller d=disk s=slice 1.Here controller c0 means the primary ide controller ide0. controller c1 means the secondary ide controller ide1. ... (5 Replies)
Discussion started by: saagar
5 Replies

8. Solaris

Iscsi shared disk - same naming across server

Hi all, Is there anyway i can control the naming of the disk device ? I have added an iscsi disk on server1 using iscsiadm , devfsadm and it is now showing as /dev/dsk/c2t0d0 in node1 However, i am worried that the same disk will appear as /dev/dsk/cXtXd0 in node2 This iscsi disk(lun)... (0 Replies)
Discussion started by: javanoob
0 Replies

9. Programming

C/C++ shared libraries on Linux.

This is the first time that I created a dynamic library in linux and although the program works, I do not get the correct information about the library when executing ldd. I explain the details: 1) Source code: bye_fn.c: #include <stdio.h> #include "hello.h" void bye (const char*... (9 Replies)
Discussion started by: jose_spain
9 Replies

10. Cybersecurity

Proper naming conventions

Hey guys, not sure should I post it here or in 'What is on Your Mind?' I'm discussing usage of DSL (domain specific language) in security tools with my colleagues. We haven't been able to reach an agreement over naming conventions. There are many tools using DSL: splunk, sumologic,... (2 Replies)
Discussion started by: Tobby P
2 Replies
ldconfig(8)						      System Manager's Manual						       ldconfig(8)

NAME
ldconfig - configure dynamic linker run-time bindings SYNOPSIS
ldconfig [OPTION...] DESCRIPTION
ldconfig creates, updates, and removes the necessary links and cache (for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and /lib). ldconfig checks the header and file names of the libraries it encounters when determining which versions should have their links updated. ldconfig ignores symbolic links when scanning for libraries. ldconfig will attempt to deduce the type of ELF libs (ie. libc 5.x or libc 6.x (glibc)) based on what C libraries if any the library was linked against, therefore when making dynamic libraries, it is wise to explicitly link against libc (use -lc). ldconfig is capable of storing multiple ABI types of libraries into a single cache on architectures which allow native running of multiple ABIs, like ia32/ia64/x86_64 or sparc32/sparc64. Some existing libs do not contain enough information to allow the deduction of their type, therefore the /etc/ld.so.conf file format allows the specification of an expected type. This is only used for those ELF libs which we can not work out. The format is like this "dirname=TYPE", where type can be libc4, libc5 or libc6. (This syntax also works on the command line). Spaces are not allowed. Also see the -p option. Directory names containing an = are no longer legal unless they also have an expected type specifier. ldconfig should normally be run by the super-user as it may require write permission on some root owned directories and files. If you use -r option to change the root directory, you don't have to be super-user though as long as you have sufficient right to that directory tree. OPTIONS
-v --verbose Verbose mode. Print current version number, the name of each directory as it is scanned and any links that are created. -n Only process directories specified on the command line. Don't process the trusted directories (/usr/lib and /lib) nor those speci- fied in /etc/ld.so.conf. Implies -N. -N Don't rebuild the cache. Unless -X is also specified, links are still updated. -X Don't update links. Unless -N is also specified, the cache is still rebuilt. -f conf Use conf instead of /etc/ld.so.conf. -C cache Use cache instead of /etc/ld.so.cache. -r root Change to and use root as the root directory. -l Library mode. Manually link individual libraries. Intended for use by experts only. -p --print-cache Print the lists of directories and candidate libraries stored in the current cache. -c --format=FORMAT Use FORMAT for the cache file. Choices are old, new and compat (the default). -i --ignore-aux-cache Ignore auxiliary cache file. -? --help --usage Print usage information. -V --version Print version and exit. EXAMPLES
# /sbin/ldconfig -v will set up the correct links for the shared binaries and rebuild the cache. # /sbin/ldconfig -n /lib as root after the installation of a new shared library will properly update the shared library symbolic links in /lib. FILES
/lib/ld-linux.so.* execution time linker/loader /etc/ld.so.conf File containing a list of newline separated directories in which to search for libraries. /etc/ld.so.cache File containing an ordered list of libraries found in the directories specified in /etc/ld.so.conf. This file is not in human readable format, and is not intended to be edited. lib*.so.version shared libraries SEE ALSO
ldd(1), ld.so(8). BUGS
ldconfig, being a user process, must be run manually and has no means of dynamically determining and relinking shared libraries for use by ld.so when a new shared library is installed. AUTHORS
Andreas Jaeger. Manual page written by David Engel and Mitch D'Souza. 25 February 2008 ldconfig(8)
All times are GMT -4. The time now is 12:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy