Opened 7 years ago

Closed 2 years ago

#55371 closed defect (fixed)

mplayer-devel @37869_2: Opportunistic linking to various packages

Reported by: p-bro Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: mplayer-devel

Description

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."

Change History (5)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: jeremyhu removed
Owner: set to jeremyhu
Priority: LowNormal
Status: newassigned

comment:2 Changed 7 years ago by p-bro

Bug remains present in @37869_3

comment:3 Changed 7 years ago by dbevans (David B. Evans)

libvpx, libmpeg2 and xorg-XScreenSaver addressed in changeset:a044366

Last edited 7 years ago by dbevans (David B. Evans) (previous) (diff)

comment:4 Changed 5 years ago by p-bro

Bug remains present in @38122

comment:5 Changed 2 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.