[SOLVED] Compile error in opencl.c
Posted: 2016-08-14T07:57:12-07:00
I'm getting the following compile error when trying to compile ImageMagick:
This error seems to be introduced by the following git commit:
http://git.imagemagick.org/repos/ImageM ... 4dea7e85ac
Commands used:
Using:
OS: Arch Linux x86_64
ImageMagick: git master
Linux: 4.7.0
GCC: 6.1.1
glibc: 2.24
opencl-headers: 2.1.20151224
Code: Select all
MagickCore/opencl.c: In function ‘LoadOpenCLDeviceBenchmark’:
MagickCore/opencl.c:729:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
status;
^~~~~~
MagickCore/opencl.c: In function ‘LoadOpenCLBenchmarks’:
MagickCore/opencl.c:922:10: error: too many arguments to function ‘ConfigureFileToStringInfo’
option=ConfigureFileToStringInfo(filename,exception);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./MagickCore/profile.h:21:0,
from ./MagickCore/image.h:146,
from ./MagickCore/blob.h:21,
from ./MagickCore/cache.h:21,
from MagickCore/opencl.c:45:
./MagickCore/string_.h:88:4: note: declared here
*ConfigureFileToStringInfo(const char *),
^~~~~~~~~~~~~~~~~~~~~~~~~
MagickCore/opencl.c:924:28: warning: passing argument 1 of ‘DestroyStringInfo’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
option=DestroyStringInfo(option);
^~~~~~
In file included from ./MagickCore/profile.h:21:0,
from ./MagickCore/image.h:146,
from ./MagickCore/blob.h:21,
from ./MagickCore/cache.h:21,
from MagickCore/opencl.c:45:
./MagickCore/string_.h:89:4: note: expected ‘StringInfo * {aka struct _StringInfo *}’ but argument is of type ‘const StringInfo * {aka const struct _StringInfo *}’
*DestroyStringInfo(StringInfo *),
^~~~~~~~~~~~~~~~~
MagickCore/opencl.c:898:6: warning: unused variable ‘options’ [-Wunused-variable]
*options;
^~~~~~~
MagickCore/opencl.c: In function ‘CompileOpenCLKernel’:
MagickCore/opencl.c:1347:19: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 8 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
"%s%s%s_%s_%08x_%.20g.bin",GetOpenCLCacheDirectory(),
^
make[1]: *** [Makefile:7853: MagickCore/MagickCore_libMagickCore_7_Q32HDRI_la-opencl.lo] Error 1
make[1]: Leaving directory '/storage/linux/abs/imagemagick-full-git/src/imagemagick-full-git'
make: *** [Makefile:5129: all] Error 2
http://git.imagemagick.org/repos/ImageM ... 4dea7e85ac
Commands used:
Code: Select all
$ git clone http://git.imagemagick.org/repos/ImageMagick.git imagemagick-full-git
$ cd imagemagick-full-git
$ CPPFLAGS="-I/usr/include/FLIF" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-openmp \
--enable-opencl \
--enable-largefile \
--enable-static=no \
--enable-shared=yes \
--enable-fast-install=yes \
--disable-delegate-build \
--enable-cipher \
--enable-hdri \
--enable-hugepages \
--enable-docs \
--with-threads \
--with-modules \
--with-quantum-depth=32 \
--with-magick-plus-plus \
--with-perl \
--with-perl-options="INSTALLDIRS=vendor" \
--with-jemalloc \
--with-umem \
--with-bzlib \
--with-x \
--with-zlib \
--with-autotrace \
--without-dps \
--with-fftw \
--with-flif \
--with-fpx \
--with-djvu \
--with-fontconfig \
--with-freetype \
--with-raqm \
--with-gslib \
--with-gvc \
--with-jbig \
--with-jpeg \
--with-lcms \
--with-openjp2 \
--with-lqr \
--with-lzma \
--with-openexr \
--with-pango \
--with-png \
--with-rsvg \
--with-tiff \
--with-webp \
--with-wmf \
--with-xml \
--with-dejavu-font-dir="/usr/share/fonts/TTF" \
--with-gs-font-dir="/usr/share/fonts/Type1" \
--with-windows-font-dir="/usr/share/fonts/WindowsFonts" \
--with-apple-font-dir="/usr/share/fonts/TTF" \
--with-fontpath="/usr/share/fonts/Type1"
$ make
OS: Arch Linux x86_64
ImageMagick: git master
Linux: 4.7.0
GCC: 6.1.1
glibc: 2.24
opencl-headers: 2.1.20151224