FS#31761 - [freeimage] cannot be used with libjpeg in the same program
Attached to Project:
Community Packages
Opened by J. Berger (jmb) - Tuesday, 02 October 2012, 07:50 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 18 November 2014, 15:52 GMT
Opened by J. Berger (jmb) - Tuesday, 02 October 2012, 07:50 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 18 November 2014, 15:52 GMT
|
Details
Description:
============ FreeImage includes its own copy of the image processing libraries (libjpeg, libpng, etc.) This will cause conflicts for programs that link against both FreeImage and the system libraries. In order to avoid these conflicts, upstream uses the "-fvisibility=hidden" flag to hide the private copies of the image libs from the users. Unfortunately, Arch's package overrides the compilation flags which removes the visibility flag. I believe the following line should be added to the PKGBUILD: export CFLAGS="$CFLAGS -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS" Additional info: ================ * package version(s): 3.15.3-1 Steps to reproduce: =================== This command should not print anything: nm -D /usr/lib/libfreeimage.so | grep jpeg |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Tuesday, 18 November 2014, 15:52 GMT
Reason for closing: Fixed
Tuesday, 18 November 2014, 15:52 GMT
Reason for closing: Fixed
FS#42696CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS
CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
I looked it up and the ?= assignment only does something if the left side isn't allready defined, which is not the case if using the makepkg tool.
So I guess the exports really are necessary.