<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">thanks Rainer, for the explanation (and for confirming this is actually a defect). I filed a bug: <a href="https://trac.macports.org/ticket/55371" class="">https://trac.macports.org/ticket/55371</a></div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 21 Nov 2017, at 11:57, Rainer Müller <<a href="mailto:raimue@macports.org" class="">raimue@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 2017-11-20 17:38, Peter Brommer wrote:<br class=""><blockquote type="cite" class="">Hi,<br class=""><br class="">According to port deps mplayer-devel, this port has the following dependencies:<br class=""><br class="">Fetch Dependencies: subversion, git<br class="">Build Dependencies: pkgconfig, yasm<br class="">Library Dependencies: jpeg, openjpeg15, lame, libiconv, libmad, gnutls, libogg, libopus, libpng, libtheora, libvorbis, lzo2, ncurses, zlib, bzip2, liboil, libass<br class=""><br class="">However, on one of my machines I now find mplayer-devel to be a broken port, as a number of library files are not available:<br class="">* /opt/local/lib/libdvdnav.4.dylib<br class="">* /opt/local/lib/librtmp.1.dylib<br class="">* /opt/local/lib/libfaad.2.dylib<br class="">* /opt/local/lib/libdca.0.dylib<br class="">* /opt/local/lib/libmpg123.0.dylib<br class="">* /opt/local/lib/libdvdread.4.dylib<br class=""><br class="">These libraries are provided by libdvdnav, rtmpdump, faad2, libdca, mpg123, libdvdread, none of which are in the dependency list.<br class=""><br class="">Is this a bug?<br class=""></blockquote><br class="">Yes.<br class=""><br class="">We usually refer to this as "opportunistic linking" when the build<br class="">system picks up additional libraries without being explicitly instructed<br class="">to do so.<br class=""><br class=""><blockquote type="cite" class="">If not, can (and should) a macports package use files provided by packages that are present at compile time (but are not formal dependencies of the package to be installed), which are then silently used, and will cause the port to break if they are removed at any point?<br class=""><br class="">The “cure” is obviously to rebuild this port once libraries have been removed, it’s more a question of principle.<br class=""></blockquote><br class="">The configure instructions in the Portfile need to written such that the<br class="">port only uses libraries that are explicitly listed in the dependencies.<br class="">Most configure scripts will just try to link with all libraries that are<br class="">available, but something like 'configures.args --disable-foo' should<br class="">prevent the linking with the library.<br class=""><br class="">In case of mplayer-devel, it looks like the port is supposed to link<br class="">with the checked out version of libdvdnav and libdvdread. However,<br class="">nothing in the Portfile or configure script seems to use that at all, so<br class="">it gets the system libraries via pkg-config instead.<br class=""><br class="">For the others, it just looks like the corresponding --disable-foo flags<br class="">and variants are missing.<br class=""><br class="">Rainer<br class=""></div></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">-- <br class="">Peter Brommer<br class=""></div></div></div></div></body></html>