[MacPorts] #17578: gdal links with libraries it doesn't declare dependencies on
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- gdal links with many libraries that it doesn't declare dependencies on. It declares dependencies on proj, jpeg, tiff, libgeotiff, zlib, libpng, and giflib. However: {{{ $ otool -L /mp/lib/libgdal.1.dylib /mp/lib/libgdal.1.dylib: /mp/lib/libgdal.1.dylib (compatibility version 14.0.0, current version 14.1.0) /mp/lib/libproj.0.dylib (compatibility version 6.0.0, current version 6.4.0) /mp/lib/libgeos_c.1.dylib (compatibility version 6.0.0, current version 6.2.0) /mp/lib/libgeos-3.0.3.dylib (compatibility version 0.0.0, current version 0.0.0) /mp/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0) /mp/lib/libjasper.1.dylib (compatibility version 2.0.0, current version 2.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10) /mp/lib/libgif.4.dylib (compatibility version 6.0.0, current version 6.6.0) /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0) /mp/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0) /mp/lib/libgeotiff.1.2.1.dylib (compatibility version 1.2.1, current version 0.0.0) /mp/lib/libtiff.3.dylib (compatibility version 12.0.0, current version 12.2.0) /mp/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0) /mp/lib/libpng12.0.dylib (compatibility version 34.0.0, current version 34.0.0) /mp/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0) /mp/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /mp/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /mp/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) }}} As you see, it links with those and also X11, openssl, curl, jasper, sqlite3 (even if you don't select the +sqlite3 variant), geos (even if you don't select the +geos variant)... -- Ticket URL: <http://trac.macports.org/ticket/17578> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by seanasy@…): I'm not sure this is a problem. 1. I don't want to create variants for every configure option, but only for 'non-standard' ones that depend on other non-standard ports. 2. I'm assuming it's safe to link things like geos and sqlite3 if they're already installed. 3. Some things should just be linked if they are available. e.g. libz, libcurl. I could be convinced I'm wrong, especially about #2. -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by blb@…): The problem is that (using sqlite3 for the example here) if it links against sqlite3 without declaring the dependency, then the sqlite3 port can be removed with 'port uninstall sqlite3' without complaint. After that, the gdal port is broken since it is now linked against uninstalled files, hence anything linked to libgdal will fail. -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by ryandesign@…): So, the moral is, a port must declare dependencies on things it links with. If the software can optionally link with something, the port must either declare a dependency on it, or it must disable the feature so that it never links with it even if the library is present. If you want to make features available optionally in your port, then you make variants which remove the disable configure switch and add the enable configure switch and the dependency for that feature. -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by seanasy@…): Thank you, both. That clears it up for me. The explanation by ryandesign should be added to the documentation. -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Replying to [comment:4 seanasy@…]:
The explanation by ryandesign should be added to the documentation.
I always like to improve our documentation. Is there a specific section of the Guide where you think it would be most helpful? -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by seanasy@…): Part of the problem is that gdal links with libraries like giflib which link the X11 libraries. I don't see any way around this. -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Replying to [comment:6 seanasy@…]:
Part of the problem is that gdal links with libraries like giflib which link the X11 libraries. I don't see any way around this. It's fine that gdal links with giflib since gdal declares a dependency on giflib. If giflib links with X11 libraries, then giflib must declare dependencies on the X11 libraries; that's ticket #18182. If gdal doesn't use X11 itself, then gdal doesn't need to declare dependencies on X11 itself.
What about sqlite3 and geos? -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: gdal -------------------------------------+-------------------------------------- Comment(by macsforever2000@…): Ryan, does r46597 fix this ticket? -- Ticket URL: <http://trac.macports.org/ticket/17578#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17578: gdal links with libraries it doesn't declare dependencies on --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: seanasy@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: gdal | --------------------------------------+------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:8 macsforever2000@…]:
Ryan, does r46597 fix this ticket? Yes, it looks good, thanks.
-- Ticket URL: <http://trac.macports.org/ticket/17578#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts