Skip to content

freeimage: apply Debian patches to unbundle libraries #220708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Apr 19, 2025

Similar patches are also applied in pretty much all Linux distros. Went with Debian's as easiest to apply multiple patches. The original source of unbundle patches is from Fedora but they are on a SVN revision so their latest patches won't apply.

For now just doing this on Linux as macOS will need additional work, i.e. requires updating our dylib patch and will need another OpenEXR patch.

EDIT: bundled libraries had issues on newer macOS so trying to unbundle now.

@cho-m cho-m force-pushed the freeimage-debian-patch branch from c6feab7 to 616b48a Compare April 19, 2025 06:34
@cho-m cho-m marked this pull request as draft April 19, 2025 06:34
@cho-m cho-m force-pushed the freeimage-debian-patch branch from 616b48a to fdc7554 Compare April 19, 2025 07:19
@cho-m cho-m added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Apr 19, 2025
@cho-m cho-m changed the title freeimage: apply Debian patches to unbundle on Linux freeimage: apply Debian patches to unbundle libraries Apr 19, 2025
@cho-m cho-m force-pushed the freeimage-debian-patch branch from fdc7554 to 0ab9360 Compare April 19, 2025 22:11
@cho-m cho-m added the CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. label Apr 19, 2025
@cho-m
Copy link
Member Author

cho-m commented Apr 19, 2025

May need to rebuild dependents as our previous Linux patch modified the SONAME incorrectly so was using macOS naming rather than the Linux naming.

@github-actions github-actions bot added the long build Set a long timeout for formula testing label Apr 19, 2025
@cho-m cho-m force-pushed the freeimage-debian-patch branch from 55a7bce to d1be468 Compare April 19, 2025 22:50
@SMillerDev
Copy link
Member

Have we tried streaming this patch?

@cho-m
Copy link
Member Author

cho-m commented Apr 20, 2025

Have we tried streaming this patch?

For Debian patches:

  1. Unbundling was requested at least 13 years ago by Gentoo at https://sourceforge.net/p/freeimage/feature-requests/40/. The Debian patch will be rejected as-is since it disables features that use private headers from bundled libs.
  2. CVE patches are all upstreamed already and part in SVN. Just lacking a release
  3. libraw patches are also in SVN

For Homebrew patches:

  1. debian-to-homebrew.patch is a patch for Debian's patch since I didn't want us to have to maintain the entire copy. Nothing to upstream here.
  2. libtiff-warning.patch is also a patch for Debian's patch (actually Fedora's modified code) as the output is noisy. Could just not apply this but will end up with stderr flooding warnings. Nothing that can be upstreamed here.
  3. imath-int64.patch can't be upstreamed as the bundled copy is older so not compatible. Will require upstream to update to OpenEXR 3 first: https://sourceforge.net/p/freeimage/feature-requests/61/ and https://sourceforge.net/p/freeimage/patches/151/
  4. macos.patch is a modification of Makefile.gnu / Makefile.fip which is not actually intended to be used for macOS. The Makefile.osx exists but it doesn't build everything we want.

I was tempted to try to deprecate/remove formula but it is a dependency for multiple formulae that are maintained.

Perhaps a fork will gain traction in the future that will allow us to switch. There is one used by T2 SDE (https://github.com/danoli3/FreeImage) that has CMake support for external libraries. However, not used by major distros so not worth consideration yet.

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label May 22, 2025
@github-actions github-actions bot closed this May 29, 2025
@github-actions github-actions bot deleted the freeimage-debian-patch branch May 29, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. long build Set a long timeout for formula testing stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants