Opened 12 years ago

Closed 3 years ago

#3212 closed defect (wontfix)

gdal-config --libs listing lots of unnecessary things to link against

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: ConfigBuild Version: unspecified
Severity: normal Keywords: gdal-config
Cc: Mateusz Łoskot, dustymugs, l


On systems like linux the GDAL shared library internally depends on various sublibraries; however, it is not necessary for applications linking against GDAL to also link against these sublibraries.

An example of this if GDAL is built against mysql, gdal-config --libs lists something like "-L/usr/lib/mysql -lmysqlclient" amoung lots of other things. But an application linking against does *not* need to link against the mysqlclient library.

If a packaged GDAL is being used to build another package, like MapServer?, this extra linking will force MapServer? to need the mysql-dev package (with when really the only requirment is the runtime package (with something like This is the case with MapServer? ticket 3199:

Somehow we need to work out how to limit gdal-config --libs to only listing required libraries for applications building against the GDAL library. I would think in most cases this would be only "-L/wrk/home/warmerda/gdal -lgdal".

Change History (4)

comment:1 Changed 10 years ago by Mateusz Łoskot

Cc: Mateusz Łoskot added

comment:2 Changed 9 years ago by dustymugs

Cc: dustymugs added

comment:3 Changed 5 years ago by l

Cc: l added

Could gDal use dlopen to avoid forcing users to have unused libraries around in their systems? I am way over my head here, but please check for further clarification on my meaning.

comment:4 Changed 3 years ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to if it is not already reported there.

Note: See TracTickets for help on using tickets.