7.0.2 Patch 8 won't compile on Fedora 22

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
omega13a
Posts: 2
Joined: 2013-01-05T13:16:48-07:00
Authentication code: 6789

7.0.2 Patch 8 won't compile on Fedora 22

Post by omega13a »

I went to go compile 7.0.2 Patch 8 today to make an RPM. Everything went normal until it went to go compile the file coders/jpeg.c . This is what happened:
libtool: compile: apgcc -DHAVE_CONFIG_H -I. -I./config -I. -I. -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/OpenEXR -I/usr/include/libdrm -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/openjpeg-2.1 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -fopenmp -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -c coders/jpeg.c -fPIC -DPIC -o coders/.libs/coders_jpeg_la-jpeg.o
# ligcc -DHAVE_CONFIG_H -I. -I./config -I. -I. -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/OpenEXR -I/usr/include/libdrm -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/openjpeg-2.1 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -fopenmp -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -c coders/jpeg.c -fPIC -DPIC -o coders/.libs/coders_jpeg_la-jpeg.o
# Situation: compile
# @files: is coders/jpeg.c
# gcc -I/usr/lib/libuild -include /home/omega13a/.config/libuild/apsymbols.h -DLIBUILD_VERSION="2.1.0" -fno-stack-protector -U_FORTIFY_SOURCE coders/jpeg.c -DHAVE_CONFIG_H -I. -I./config -I. -I. -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -pthread -I/usr/include/OpenEXR -I/usr/include/libdrm -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/openjpeg-2.1 -I/usr/include/graphviz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -fopenmp -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -c -fPIC -DPIC -o coders/.libs/coders_jpeg_la-jpeg.o
coders/jpeg.c: In function 'WriteProfile':
coders/jpeg.c:1948:58: error: format not a string literal and no format arguments [-Werror=format-security]
CoderWarning,"ExifProfileSizeExceedsLimit",image->filename);
^
cc1: some warnings being treated as errors
Makefile:9523: recipe for target 'coders/coders_jpeg_la-jpeg.lo' failed
make[1]: *** [coders/coders_jpeg_la-jpeg.lo] Error 1
make[1]: Leaving directory '/home/omega13a/rpmbuild/BUILD/ImageMagick-6.8.8-10/ImageMagick-7.0.2-8'
Makefile:5129: recipe for target 'all' failed
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.u1bUdV (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.u1bUdV (%build)
kwash
Posts: 17
Joined: 2016-04-30T20:47:29-07:00
Authentication code: 1151

Re: 7.0.2 Patch 8 won't compile on Fedora 22

Post by kwash »

Maybe the configuration in Fedora compiler flags is causing this error. I can tell that IM 7.0.2-8 and 7.0.2-9 are building perfectly in Arch Linux x86_64.

Check if you have "-Werror=format-security" in your RPM macros that define compiler flags. If yes, try to remove it and see if it works.

Some RPM macros to look at:
%{__global_cflags}
%{optflags}
$RPM_OPT_FLAGS

Some possible macro locations:
/usr/lib/rpm/macros
/etc/rpm/macros
$HOME/.rpmmacros
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 7.0.2 Patch 8 won't compile on Fedora 22

Post by magick »

Compile against 7.0.2-9. 7.0.2-8 had the transient bug you reported and its fixed in 7.0.2-9.
Post Reply