id summary reporter owner description type status priority milestone component version resolution keywords cc port 55371 mplayer-devel @37869_2: Opportunistic linking to various packages p-bro jeremyhu "The mplayer-devel package in its current version opportunistically links to libraries present at build time, which are not formal dependencies. When the packages are later removed, this breaks the mplayer-devel package. On one of my machines, port rev-update finds the following libraries missing: * /opt/local/lib/libdvdnav.4.dylib * /opt/local/lib/librtmp.1.dylib * /opt/local/lib/libfaad.2.dylib * /opt/local/lib/libdca.0.dylib * /opt/local/lib/libmpg123.0.dylib * /opt/local/lib/libdvdread.4.dylib These libraries are provided by libdvdnav, rtmpdump, faad2, libdca, mpg123, libdvdread, none of which are in the dependency list. Those packages were present when building mplayer-devel for the first time, but have since been removed. This opportunistic linking causes mplayer-devel to break. As I did not do any systematic trialling I cannot guarantee that this list is complete - there may be other libraries that are opportunistically linked, but which I did not attempt to remove. According to Rainer Müller on macports-dev list (2017-11-21 11:57:47 +0000): ""The configure instructions in the Portfile need to written such that the port only uses libraries that are explicitly listed in the dependencies. Most configure scripts will just try to link with all libraries that are available, but something like 'configures.args --disable-foo' should prevent the linking with the library. ""In case of mplayer-devel, it looks like the port is supposed to link with the checked out version of libdvdnav and libdvdread. However, nothing in the Portfile or configure script seems to use that at all, so it gets the system libraries via pkg-config instead. ""For the others, it just looks like the corresponding --disable-foo flags and variants are missing."" " defect closed Normal ports fixed mplayer-devel