Ticket #2065 (new enhancement)

Opened 7 months ago

Last modified 7 months ago

GDAL apps over-linking issue

Reported by: frankie Assigned to: warmerdam
Priority: normal Milestone: 1.6.0
Component: ConfigBuild Version: unspecified
Severity: normal Keywords:
Cc: mloskot

Description

Recent dpkg-shlibs in Debian sid is able to auto-detect linking against unused libraries. See for instance:

http://buildd.debian.org/fetch.cgi?pkg=gdal;ver=1.4.4-1;arch=amd64;stamp=1196773651

and looks for "shouldn't be linked with" warnings. The primary result is having programs over-depending on other packages in order to have ld happy at loading time. The practice of linking against all Gdal dependency libraries should be discouraged iff the specific platform does not require so. Libtool supports subdependencies as stated in

http://www.gnu.org/software/libtool/manual.html#Inter_002dlibrary-dependencies

but the gdal build system relink against all other inter-dep libs again and again for all binaries or so. Without libtool inter-deps need to be manually tracked per app, I think.

Change History

12/06/07 10:35:36 changed by mloskot

  • cc set to mloskot.

Here is related ticket #2066

12/07/07 15:51:01 changed by warmerdam

  • milestone set to 1.6.0.

This is not something we dare fiddle with for 1.5, setting for 1.6.

12/17/07 04:38:32 changed by frankie

It is also of interest seeing if -Wl,--as-needed could be a suitable trick without issues for C++ linkage. See http://www.gentoo.org/proj/en/qa/asneeded.xml for more information. Binutils folks could add that as default in the next future.