Hi ports@!
Most probably the question was discussed a lot of times, but I have not found a definitive answer.
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both libfoo and libbar?
Simple example (outdated, but the first thing you see in Porter's Handbook): games/oneko is linked with the command
cc -o oneko -L/usr/local/lib oneko.o -lXext -lX11 -lm -Wl,-rpath,/usr/local/lib
suggesting direct dependencies libXext and libX11. However, ldd oneko gives
libXext.so.6
libX11.so.6
libm.so.5
libc.so.7
libxcb.so.1
libthr.so.3
libsys.so.7
libXau.so.6
libXdmcp.so.6
Of course, libXau, libXdmcp, and libxcb are coming from libX11. The port
USES= imake xorg
Additionally, should it just depend on direct dependencies
USE_XORG= x11 xext
or the full dependency list?
USE_XORG= x11 xau xcb xdmcp xext
More complicated example: cad/freecad depends on cad/opencascade that depends on multimedia/ffmpeg4 with default options (can be switched off).
Should freecad port LIB_DEPENDS on ffmpeg4, as it is now, or should it track opencascade options, or should it not depend on ffmpeg4 at all?
Thank you in advance,
Alexey
On 6/13/26 20:21, Bugs Beastie wrote:
Hi ports@!
Most probably the question was discussed a lot of times, but I have not found a definitive answer.
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both libfoo and libbar?
Simple example (outdated, but the first thing you see in Porter's Handbook): games/oneko is linked with the command
cc -o oneko -L/usr/local/lib oneko.o -lXext -lX11 -lm -Wl,-rpath,/usr/local/lib
suggesting direct dependencies libXext and libX11. However, ldd oneko gives >>
libXext.so.6
libX11.so.6
libm.so.5
libc.so.7
libxcb.so.1
libthr.so.3
libsys.so.7
libXau.so.6
libXdmcp.so.6
Of course, libXau, libXdmcp, and libxcb are coming from libX11. The port
USES= imake xorg
Additionally, should it just depend on direct dependencies
USE_XORG= x11 xext
or the full dependency list?
USE_XORG= x11 xau xcb xdmcp xext
More complicated example: cad/freecad depends on cad/opencascade that depends on multimedia/ffmpeg4 with default options (can be switched off).
Should freecad port LIB_DEPENDS on ffmpeg4, as it is now, or should it track opencascade options, or should it not depend on ffmpeg4 at all?
Thank you in advance,
Alexey
In other words(?): Where does the responsibility for handling the
transitive closure of the dependencies reside?
On 6/13/26 20:21, Bugs Beastie wrote:Hi, from a principle point of view the port should add only libfoo unless it also uses directly libbar.
[rCa.]In other words(?): Where does the responsibility for handling the
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both libfoo and libbar?
[...]
transitive closure of the dependencies reside?
I would claim that the above effectively means that the responsibilitysource
for indirect dependencies essentially needs to be split across the
automated build process and the automated installation process and, at
the scale involved, cannot reasonably/generally be handled at the =
code stage for tracking the indirect dependencies.
On 6/13/26 20:21, Bugs Beastie wrote:
[....]In other words(?): Where does the responsibility for handling the transitive closure of the dependencies reside?
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both libfoo and libbar?
[...]
Hi, from a principle point of view the port should add only libfoo unless it also uses directly libbar.
This because tomorrow morning the maintainer of libfoo might decide to stop using libbar and use libbaz instead, so your app does not need libbar anymore and dependency becomes implicitly:
app -> libfoo -> libbaz.
Most probably the question was discussed a lot of times, but I haveIf the app is only linked with libfoo, the port should only list libfoo
not found a definitive answer.
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both
libfoo and libbar?
Bugs Beastie <bugsbeastie@gmail.com> writes:
Most probably the question was discussed a lot of times, but I have
not found a definitive answer.
If an app depends on libfoo that depends on libbar:
app -> libfoo -> libbar
Should the port of app add LIB_DEPENDS only on libfoo or on both
libfoo and libbar?
If the app is only linked with libfoo, the port should only list libfoo
in LIB_DEPENDS.
As a practical matter, it is safe to err on the side of shorter
LIB_DEPENDS, because you will get an error if you should also have
included libbar but didn't.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 74 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 01:35:56 |
| Calls: | 1,194 |
| Files: | 1,353 |
| D/L today: |
2 files (1,590K bytes) |
| Messages: | 290,985 |