Package Details: freeimage 3.18.0-25

Git Clone URL: https://aur.archlinux.org/freeimage.git (read-only, click to copy)
Package Base: freeimage
Description: Library project for developers who would like to support popular graphics image formats
Upstream URL: http://freeimage.sourceforge.net/
Licenses: GPL-3.0-only, LicenseRef-FreeImage
Submitter: andreas_baumann
Maintainer: andreas_baumann
Last Packager: andreas_baumann
Votes: 18
Popularity: 0.52
First Submitted: 2025-08-14 09:58 (UTC)
Last Updated: 2026-10-12 19:11 (UTC)

Pinned Comments

andreas_baumann commented on 2026-03-08 09:19 (UTC)

https://www.cvedetails.com/vulnerability-list/vendor_id-15676/product_id-32505/Freeimage-Project-Freeimage.html

Use at your own risk!

Latest Comments

promano commented on 2026-10-12 18:30 (UTC) (edited on 2026-10-12 18:33 (UTC) by promano)

Hi,

Thanks for the recent JXRVersion.h fix! Unfortunately, freeimage 3.18.0-24 still fails to build with jxrlib 1.4.4-3:

`fatal error: JXRGlue.h: No such file or directory`

The Makefile still uses /usr/include/jxrlib, but jxrlib now installs its headers under /usr/include/libjxr/.

I updated the include paths in both Makefile.gnu and Makefile.fip and successfully built and installed the package.

Here's the patch with the fix for PKGBUILD :


diff --git a/PKGBUILD b/PKGBUILD
index 575fe8f..efdf5b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
 # Contributor: scippio <scippio@berounet.cz>
 pkgname=freeimage
 pkgver=3.18.0
-pkgrel=24
+pkgrel=25
 pkgdesc="Library project for developers who would like to support popular graphics image formats"
 arch=('x86_64')
 license=('GPL-3.0-only' 'LicenseRef-FreeImage')
@@ -32,6 +32,10 @@ prepare() {

   patch -p1 -i ../freeimage-libraw-0.20.patch # Fix build with libraw 0.20
   patch -p1 -i ../freeimage-libraw-0.21.patch # Fix build with libraw 0.21
+
+  # Fix include paths for jxrlib 1.4.4
+  local jxr_includes='-I/usr/include/libjxr/common -I/usr/include/libjxr/image -I/usr/include/libjxr/image/x86 -I/usr/include/libjxr/glue -I/usr/include/libjxr/test'
+  sed -i "s@-I/usr/include/jxrlib@${jxr_includes}@g" Makefile.gnu Makefile.fip
   # jxrlib 1.4.3 ships JXRGlue.h including JXRVersion.h but never installs it
   if [[ ! -f /usr/include/jxrlib/JXRVersion.h ]]; then
     cat > JXRVersion.h <<'EOF'

andreas_baumann commented on 2026-10-07 14:52 (UTC)

@jose1711: thanks and added

jose1711 commented on 2026-10-07 07:23 (UTC)

/usr/include/jxrlib/JXRGlue.h:35:10: fatal error: JXRVersion.h: No such file or directory
35 | #include <JXRVersion.h>
| ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile.gnu:54: Source/FreeImage/PluginJXR.o] Error 1

here's the patch for PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index e9d3e64..b25dd5c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -34,6 +34,20 @@ prepare() {

   patch -p1 -i ../freeimage-libraw-0.20.patch # Fix build with libraw 0.20
   patch -p1 -i ../freeimage-libraw-0.21.patch # Fix build with libraw 0.21
+
+  # jxrlib 1.4.3 ships JXRGlue.h including JXRVersion.h but does not install it
+  if [[ ! -f /usr/include/jxrlib/JXRVersion.h ]]; then
+    cat > JXRVersion.h <<'EOF'
+#ifndef JXRVERSION_H
+#define JXRVERSION_H
+#define JXR_VERSION_MAJOR 1
+#define JXR_VERSION_MINOR 4
+#define JXR_VERSION_PATCH 3
+#define JXR_MAKEVERSION(major, minor, patch) (((major) << 16) | ((minor) << 8) | (patch))
+#define JXR_VERSION JXR_MAKEVERSION(JXR_VERSION_MAJOR, JXR_VERSION_MINOR, JXR_VERSION_PATCH)
+#endif
+EOF
+  fi
 }

 build() {

oriba commented on 2026-09-26 20:20 (UTC)

Alternative: freeimagere, FreeImage Re(surrected) https://github.com/agruzdev/FreeImageRe

AUR: https://aur.archlinux.org/packages/freeimagere-git

andreas_baumann commented on 2026-03-08 09:19 (UTC)

https://www.cvedetails.com/vulnerability-list/vendor_id-15676/product_id-32505/Freeimage-Project-Freeimage.html

Use at your own risk!

andreas_baumann commented on 2026-03-06 08:51 (UTC)

@emgym: do you have a build log showing the error? I fail to reproduce the linking problem in a build chroot..

andreas_baumann commented on 2026-03-06 08:51 (UTC)

Sigh, yes. Don't know what to do here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121912

Keeping it around for some projects that have to move fast away, I guest, and I make a pinned remark about the vulnerabilities.

emgym commented on 2026-03-04 03:32 (UTC)

openmp package is needed to build this, otherwise you get the missing -lomp error in build output

bill997 commented on 2025-12-26 06:21 (UTC)

I have packaged freeimagere-git... but be aware that FreeImageRE has a few (minor) differences from FreeImage, it's not a straight drop-in replacement.

oysstu commented on 2025-08-15 12:39 (UTC)

Thanks for packaging this. Note that freeimage was dropped from the extra repo because as it's unmaintained and contains multiple known security issues.

https://gitlab.archlinux.org/archlinux/packaging/packages/freeimage/-/issues/1

There's a maintained fork here: https://github.com/agruzdev/FreeImageRe but I don't have time to package it right now.