Package Details: lib32-freeimage 3.18.0-1

Git Clone URL: https://aur.archlinux.org/lib32-freeimage.git (read-only, click to copy)
Package Base: lib32-freeimage
Description: Library project for developers who would like to support popular graphics image formats
Upstream URL: http://freeimage.sourceforge.net
Licenses: GPL, custom:FIPL
Submitter: None
Maintainer: ducakar
Last Packager: ducakar
Votes: 14
Popularity: 0.000000
First Submitted: 2011-02-20 20:34 (UTC)
Last Updated: 2020-06-11 21:34 (UTC)

Latest Comments

1 2 3 Next › Last »

MarsSeed commented on 2025-03-04 12:11 (UTC)

The package also does not follow Arch package guidelines like extra/freeimage does in relying on shared libraries.

Instead, it builds and bundles the needed llibraries inside a static libfreeimageplus.a; e.g. the old versions of the following ones: libraw, openexr, libjpeg, libpng, libtiff4, zlib, openjpeg, libwebp, libjxr.

Then it goes on to discard the bundled libfreeimageplus.a file.

dreieck commented on 2025-03-04 11:31 (UTC)

Build fails with gzlib.c:14:17: error: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimplicit-function-declaration] and subsequent errors (see below for more detailed log).

A workaround is to add
-Wno-error=implicit-function-declaration
to the CFLAGS and CXXFLAGS in the build() function in the PKGBUILD.
Patch:

--- PKGBUILD.orig   2025-03-04 12:27:16.926730823 +0100
+++ PKGBUILD    2025-03-04 12:29:12.770069026 +0100
@@ -25,2 +25,2 @@
-  export CFLAGS="${CFLAGS/-march=x86-64} -O3 -fPIC -fvisibility=hidden -DNO_LCMS"
-  export CXXFLAGS="${CXXFLAGS/-march=x86-64} -O3 -fPIC -fvisibility=hidden"
+  export CFLAGS="${CFLAGS/-march=x86-64} -O3 -fPIC -fvisibility=hidden -DNO_LCMS -Wno-error=implicit-function-declaration"
+  export CXXFLAGS="${CXXFLAGS/-march=x86-64} -O3 -fPIC -fvisibility=hidden -DNO_LCMS -Wno-error=implicit-function-declaration"

Please add this workaround if upstream does not fix this code for new GCC versions.

Here more detailed build log:

[...]
gcc -march=i686 -m32 -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -flto=auto -O3 -fPIC -fvisibility=hidden -DNO_LCMS -DOPJ_STATIC -DNO_LCMS -DDISABLE_PERF_MEASUREMENT -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/ZLib/zutil.c -o Source/ZLib/zutil.o
Source/ZLib/gzlib.c: In function ‘gz_open’:
Source/ZLib/gzlib.c:14:17: error: implicit declaration of function ‘lseek’; did you mean ‘fseek’? [-Wimplicit-function-declaration]
   14 | #  define LSEEK lseek
      |                 ^~~~~
Source/ZLib/gzlib.c:252:9: note: in expansion of macro ‘LSEEK’
  252 |         LSEEK(state->fd, 0, SEEK_END);  /* so gzoffset() is correct */
      |         ^~~~~
Source/ZLib/gzwrite.c: In function ‘gz_comp’:
Source/ZLib/gzwrite.c:89:20: error: implicit declaration of function ‘write’; did you mean ‘fwrite’? [-Wimplicit-function-declaration]
   89 |             writ = write(state->fd, strm->next_in, put);
      |                    ^~~~~
      |                    fwrite
Source/ZLib/gzwrite.c: In function ‘gzclose_w’:
Source/ZLib/gzwrite.c:661:9: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
  661 |     if (close(state->fd) == -1)
      |         ^~~~~
      |         pclose
gcc -march=i686 -m32 -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -flto=auto -O3 -fPIC -fvisibility=hidden -DNO_LCMS -DOPJ_STATIC -DNO_LCMS -DDISABLE_PERF_MEASUREMENT -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -fPIC -c Source/LibOpenJPEG/bio.c -o Source/LibOpenJPEG/bio.o
make[1]: *** [Makefile.gnu:61: Source/ZLib/gzlib.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.gnu:61: Source/ZLib/gzwrite.o] Error 1
Source/ZLib/gzread.c: In function ‘gz_load’:
Source/ZLib/gzread.c:35:15: error: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
   35 |         ret = read(state->fd, buf + *have, get);
      |               ^~~~
      |               fread
Source/ZLib/gzread.c: In function ‘gzclose_r’:
Source/ZLib/gzread.c:651:11: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
  651 |     ret = close(state->fd);
      |           ^~~~~
      |           pclose
make[1]: *** [Makefile.gnu:61: Source/ZLib/gzread.o] Error 1
make[1]: Leaving directory '/var/cache/makepkg/build/lib32-freeimage/src/FreeImage'
make: *** [Makefile:21: default] Error 2
==> ERROR: A failure occurred in build().

Regards and thanks for the package!

ducakar commented on 2016-05-28 08:12 (UTC)

Thanks. Fixed and reported the issue.

balwierz commented on 2016-05-24 23:55 (UTC)

Unfortunately compilation fails with gcc 6.1.1 20160501 ``` Source/LibRawLite/./internal/dcraw_common.cpp: In member function ‘void LibRaw::vng_interpolate()’: Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of ‘128’ from ‘int’ to ‘signed char’ inside { } [-Wnarrowing] }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; ^ Source/LibRawLite/./internal/dcraw_common.cpp:4545:3: error: narrowing conversion of ‘136’ from ‘int’ to ‘signed char’ inside { } [-Wnarrowing] Makefile.gnu:64: recipe for target 'Source/LibRawLite/./internal/dcraw_common.o' failed make[1]: *** [Source/LibRawLite/./internal/dcraw_common.o] Error 1 ``` I checked the code, and there are indeed 0x80 and 0x88 inside static const _signed_ char { } I suggest adding -std=c++98 to CXX flags (to disable c++11) && contacting the upstream.

rcrath commented on 2015-06-30 23:07 (UTC)

that worked, thanks!

ducakar commented on 2015-06-28 14:59 (UTC)

Look like GCC 5 checks syntax of macros even when they are not processed. I've fixed it in the update.

rcrath commented on 2015-06-27 04:51 (UTC)

Hi, I am running into the following error when compiling from MAKEPKG as well as from source: ===== Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c:43:48: error: invalid character ' ' in raw string delimiter "srl %["#R"], %["#R"], 24 \n\t" ===== I found this cryptic message from the dev at http://sourceforge.net/p/freeimage/discussion/36110/thread/605ef8e4/?limit=25#779a but cannot figure it out. ===== Hi, The code for dsp.upsampling_mips_dsp_r2.c is disabled because of the directive included in this file if defined(WEBP_USE_MIPS_DSP_R2) So your compiler shouldn't try to analyse the code. Hervé ===== Any ideas what I need to do? THanks you!

Agt commented on 2015-04-27 20:12 (UTC)

Actually lib32-freeimage-3.17.0-1 compiles fine with default /etc/makepkg.conf. It failed because I had replaced "-march=x86-64 -mtune=generic" by "-march=native" in this file (https://wiki.archlinux.org/index.php/Makepkg#Architecture.2C_compile_flags). Sorry.

Agt commented on 2015-04-27 18:45 (UTC)

Sorry for the confusion. I don't use testing. Enabled repositories are: $ grep '^\[' /etc/pacman.conf | fgrep -v '[options]' [core] [extra] [community] [multilib]