Bug 196099 - graphics/sdl_image and graphics/sdl2_image: direct linking instead of dlopen(3)
Summary: graphics/sdl_image and graphics/sdl2_image: direct linking instead of dlopen(3)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-18 15:36 UTC by Jan Beich
Modified: 2019-03-01 19:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mva)


Attachments
add --disable-*-shared (1.06 KB, patch)
2014-12-18 15:36 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2014-12-18 15:36:53 UTC
Created attachment 150725 [details]
add --disable-*-shared

To avoid hiding runtime issues when dependencies are updated. dlopen is only useful for optional dependencies i.e., those not always pulled with the package. Idea from Gentoo.

Alternatively, LIB_DEPENDS should be replaced with BUILD_DEPENDS.
Comment 1 Bugzilla Automation freebsd_committer 2014-12-18 15:36:53 UTC
Auto-assigned to maintainer mva@FreeBSD.org
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2016-11-16 21:11:41 UTC
In reality this should not be an issue, since we advise a rebuild (or do a revision bump on all related ports) or shared library updates.

If we stop using shared libraries, we just need BUILD_DEPENDS. This however may impose security risks (e.g. png vulnerabilities) that may not be covered by a rebuild (as far as I remember, BUILD_DEPENDS are not recorded in a package).
Comment 3 Rene Ladan freebsd_committer 2017-01-22 22:33:28 UTC
Maintainer reset
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-31 23:06:50 UTC
The Makefile is more than once reworked since this time. I think this is overcome by events and coulc be closed.
Comment 5 Tobias Kortkamp freebsd_committer 2019-01-27 08:56:41 UTC
Yes, I think we can close.

This was rejected in comment #2 by the previous maintainer and has not been
contested by jbeich@ since.
Comment 6 Dmitry Marakasov freebsd_committer 2019-01-27 18:54:31 UTC
Static linking is definitely not acceptable. However it would make sense to disable dynamic loading of shared library to proper linking in build time. I don't see a way to enable this via build arguments though.
Comment 7 Dmitry Marakasov freebsd_committer 2019-01-28 16:08:25 UTC
It turns out that these options do just what we want - disable dlopen. These do not involve static linking. So the patch is good, I'm going to commit it after some testing along with port updates.
Comment 8 commit-hook freebsd_committer 2019-03-01 19:19:57 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Mar  1 19:18:57 UTC 2019
New revision: 494313
URL: https://svnweb.freebsd.org/changeset/ports/494313

Log:
  - Switch sdl_image and sdl2_image from dynamic loading of dependency
    libraries to normal shared linking
  - While here, add USES=sdl and localbase add LICENSE_FILE and strip library

  PR:		196099
  Submitted by:	jbeich

Changes:
  head/graphics/sdl2_image/Makefile
  head/graphics/sdl_image/Makefile