`pkg-config --libs libspatialindex` lacks '-lspatialindex' flag

Bug #1019477 reported by Harris Hancock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
spatialindex (Debian)
Fix Released
Unknown
spatialindex (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu release: 12.04 LTS
Package affected: libspatialindex-dev 1.7.0-1 amd64

The pkg-config file for libspatialindex does not actually provide a linker flag to link against the library.

$ cat /usr/lib/pkgconfig/libspatialindex.pc | grep Libs
Libs: -L${exec_prefix}/lib -Wl,-z,defs

Illustration of the problem:

$ g++ program_requiring_libspatialindex.cc `pkg-config --cflags --libs libspatialindex`
/tmp/cc2gkSiw.o: In function `main':
program_requiring_libspatialindex.cc:46: undefined reference to `SpatialIndex::StorageManager::createNewDiskStorageManager(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int)'
... etc ...

Adding the requisite '-lspatialindex' to the linker command line allows the program in question to link correctly.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libspatialindex-dev 1.7.0-1
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Fri Jun 29 19:07:23 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: spatialindex
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Harris Hancock (vortrab) wrote :
Changed in spatialindex (Debian):
status: Unknown → New
Changed in spatialindex (Debian):
status: New → Fix Committed
Changed in spatialindex (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Logan Rosen (logan) wrote :

This bug was fixed in the package spatialindex - 1.8.1-2

---------------
spatialindex (1.8.1-2) unstable; urgency=low

  * Update pkg-config patch to remove LDFLAGS from Libs.
    (closes: #735039)

 -- Bas Couwenberg <email address hidden> Sun, 12 Jan 2014 14:08:10 +0100

spatialindex (1.8.1-1) unstable; urgency=low

  * New upstream release.
  * Add myself to Uploaders.
  * Update watch file including sepwatch changes.
  * Update Homepage to github documentation instead of code.
  * Use canonical URLs in Vcs-* fields.
  * Change priority from extra to optional.
  * Bump debhelper compatibility to 9.
  * Use minimal dh rules with dh-autoreconf.
    (closes: #734827, #722835)
  * Support Multi-Arch build.
  * Add misc:Depends for libspatialindex-dev.
  * Don't start description synopsis with an article.
  * Change library packages to match SONAME, and use correct description.
    (closes: #642482)
  * Add debug package for the shared library.
  * Update copyright file using copyright-format 1.0.
  * Add lintian override for debian-watch-may-check-gpg-signature,
    upstream doesn't provide signatures for verification.
  * Remove .la files before install.
  * Add symbols files using pkgkde-symbolshelper.
  * Bump Standards-Version to 3.9.5, changes: minimal dh rules, Multi-Arch,
    Vcs-* fields, shared library changes, copyright.
  * Add patch to modernize the build system.
  * Add patch to include linking to libspatialindex in pkg-config file.
    (closes: #679690)

 -- Bas Couwenberg <email address hidden> Fri, 10 Jan 2014 20:30:00 +0100

Changed in spatialindex (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.