Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#47934 closed defect (fixed)

libvpx should be in depends_build not depends_lib

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia), dstrubbe (David Strubbe)
Port: avidemux, ffmpeg, ffmpeg-devel, gd2, gstreamer010-gst-plugins-bad, gstreamer1-gst-plugins-good

Description

libvpx installs a static library only, so dependents should list libvpx in depends_build, not depends_lib. Right? I can make this change, but want to verify with you that it's correct first.

Change History (9)

comment:1 Changed 9 years ago by dbevans (David B. Evans)

I don't know about "should" but I think, theoretically, you're right about making libvpx or any lib that produces only a static library a build dependency. The lib dependency is not "wrong" per se as it doesn't break the port but could be viewed as overkill.

Having said that, I haven't done any real testing of this so why don't you let me handle ffmpeg/ffmpeg-devel and the gstreamer ports and I'll leave avidemux and gd2 to you. I'm tempted to wait on this until libvpx 1.4.0 is committed and do it then along with the required revbump.

Note that dependents of static libraries always need a revdump whenever the libvpx code changes due to the static lib issue. Otherwise, the port could be using a compiled in old version of the library even though the library has been updated.

comment:2 in reply to:  1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to devans@…:

I don't know about "should" but I think, theoretically, you're right about making libvpx or any lib that produces only a static library a build dependency. The lib dependency is not "wrong" per se as it doesn't break the port but could be viewed as overkill.

What I meant was that making it a library dependency causes libvpx to be installed on users' systems when it doesn't need to be. There is no benefit to it being there, for users installing these ports from binaries. I was just hesitating because every port depending on libvpx does it by library dependency, and I wanted to make sure there wasn't some reason why this was needed in this case. But I don't think there is.

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

Agreed. You caught me in a bad mood. Sorry for being "linquistically over-sensitive."

comment:4 Changed 9 years ago by dbevans (David B. Evans)

ffmpeg, ffmpeg-devel fixed in r137058
gstreamer010-gst-plugins-bad fixed in r137067
gstreamer1-gst-plugins-good fixed in r137068

comment:5 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

gd2: r137228
avidemux: r137230

comment:6 Changed 9 years ago by dstrubbe (David Strubbe)

I'm don't think this is a good idea for gd2, because it recommends linking libvpx according to its config binary:

$ gdlib-config --libs
-lgd -ljpeg -lz -L/opt/local/lib -lpng16 -L/opt/local/lib -lfreetype -L/opt/local/lib -lfontconfig -lfontconfig
-L/opt/local/lib -lXpm -L/opt/local/lib -lvpx -L/opt/local/lib -ltiff -liconv

Everything else in this list is depends_lib for gd2. As a result, a code which naturally uses the output of this command in a configure script to decide how to link will fail if libvpx is no longer installed.

On the other hand, the depends_lib port:expat does not seem to be dynamically linked into any library or executable from gd2, so I wonder if it really needs to be depends_lib.

Last edited 9 years ago by dstrubbe (David Strubbe) (previous) (diff)

comment:7 Changed 9 years ago by dstrubbe (David Strubbe)

Cc: dstrubbe@… added

Cc Me!

comment:8 in reply to:  6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to dstrubbe:

I'm don't think this is a good idea for gd2, because it recommends linking libvpx according to its config binary:

$ gdlib-config --libs
-lgd -ljpeg -lz -L/opt/local/lib -lpng16 -L/opt/local/lib -lfreetype -L/opt/local/lib -lfontconfig -lfontconfig
-L/opt/local/lib -lXpm -L/opt/local/lib -lvpx -L/opt/local/lib -ltiff -liconv

Everything else in this list is depends_lib for gd2. As a result, a code which naturally uses the output of this command in a configure script to decide how to link will fail if libvpx is no longer installed.

gd2 no longer uses libvpx as of 2.2.0; see https://github.com/libgd/libgd/issues/129.

On the other hand, the depends_lib port:expat does not seem to be dynamically linked into any library or executable from gd2, so I wonder if it really needs to be depends_lib.

Looks like I added the expat dependency when updating the port to 2.0.34 in 2007 in [2fb64674a09a9a070635c840110f4e208d0be078/macports-ports]. That was probably wrong. expat was probably only an indirect dependency through gettext. That was back when libraries were being overlinked to indirect dependencies. Overlinking was fixed in MacPorts in 2013; see #38010 and [a940ce8fed8df056b8d5720ac69961a6e9c6ecf7/macports-base].

comment:9 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Note: See TracTickets for help on using tickets.