[Bug 997938] Re: The linker doesn't find dynamic (shared object) libraries in /usr/lib

Matthias Klose doko at ubuntu.com
Wed Jun 11 11:56:57 UTC 2014


you are missing the -dev package fox sox

** Changed in: gcc-defaults (Ubuntu)
       Status: New => Invalid

** Package changed: gcc-defaults (Ubuntu) => ubuntu

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/997938

Title:
  The linker doesn't find dynamic (shared object) libraries in /usr/lib

Status in Ubuntu:
  Invalid

Bug description:
  This is the (usual) test program:
  /*File: p.c*/
  #include <stdio.h>

  int main() {
    printf( "Hello world!\n" );
    return 0;
  }
  /*EOF*/

  If I compile it like this:
  gcc -o p p.c -lpq # I add an extra useless library to be linked
  Averything works fine. I currently have this:
  ~  ls -l /usr/lib/libpq*
  -rw-r--r-- 1 root root 242018 mar  6 12:50 /usr/lib/libpq.a
  lrwxrwxrwx 1 root root     12 mar  6 12:49 /usr/lib/libpq.so -> libpq.so.5.4
  lrwxrwxrwx 1 root root     12 mar  6 12:49 /usr/lib/libpq.so.5 -> libpq.so.5.4
  -rw-r--r-- 1 root root 163308 mar  6 12:50 /usr/lib/libpq.so.5.4

  So both shared object and static libraries are present.
  If I try instead this compilation:

  ~ gcc -o p p.c -lsox
  /usr/bin/ld: cannot find -lsox
  collect2: ld returned 1 exit status

  where there is no static libary for libsox:

  ~ ls -l /usr/lib/libsox*
  lrwxrwxrwx 1 root root     15 dic 27 22:39 /usr/lib/libsox.so.1 -> libsox.so.1.0.0
  -rw-r--r-- 1 root root 562436 dic 27 22:39 /usr/lib/libsox.so.1.0.0

  It used to work fine as of 11.10.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: g++ 4:4.6.3-1ubuntu5
  ProcVersionSignature: Ubuntu 3.2.0-24.38-generic-pae 3.2.16
  Uname: Linux 3.2.0-24-generic-pae i686
  ApportVersion: 2.0.1-0ubuntu7
  Architecture: i386
  Date: Fri May 11 09:55:12 2012
  InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
  SourcePackage: gcc-defaults
  UpgradeStatus: Upgraded to precise on 2012-04-27 (14 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/997938/+subscriptions



More information about the foundations-bugs mailing list