package/imagemagick: disable opencl
PATCH 1/1 package/imagemagick: disable opencl
Some packages installs libOpenCL without declaring BR2_PACKAGE_PROVIDES_LIBOPENCL (e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.
To prevent that situation, this patch explicitly disable opencl support.
--- package/imagemagick/imagemagick.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
package/imagemagick/imagemagick.mk +5 -1
@@ -18,10 +18,13 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config endif -IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64 +IMAGEMAGICK_CONF_ENV = \ + ac_cv_sys_file_offset_bits=64 \ + ax_cv_check_cl_libcl=no IMAGEMAGICK_CONF_OPTS = \ --program-transform-name='s,,,' \ + --disable-opencl \ --disable-openmp \ --without-djvu \ --without-dps \
@@ -152,6 +155,7 @@ IMAGEMAGICK_CONF_OPTS += --without-bzlib endif HOST_IMAGEMAGICK_CONF_OPTS = \ + --disable-opencl \ --disable-openmp \ --without-djvu \ --without-dps \
Signature · 1 line
2.21.0
PATCH 1/1 package/imagemagick: disable opencl
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Julien" == Julien Olivain <[email protected]> writes:
Some packages installs libOpenCL without declaring
BR2_PACKAGE_PROVIDES_LIBOPENCL(e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.To prevent that situation, this patch explicitly disable opencl support.
Signed-off-by Julien Olivain <[email protected]>--- package/imagemagick/imagemagick.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)package/imagemagick/imagemagick.mk +0
-0
package/imagemagick/imagemagick.mk ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) · line 23
Quoted 7 lines
package/imagemagick/imagemagick.mk +3
-1@@ -18,10 +18,13 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config endif -IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64 +IMAGEMAGICK_CONF_ENV = \ + ac_cv_sys_file_offset_bits=64 \ + ax_cv_check_cl_libcl=no
Why is this needed? From a quick look at m4/ax_opencl.m4, this only seems to be used when we do not pass --disable-opencl?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/imagemagick: disable opencl
Hi Peter,
Quoted 25 lines · Peter Korsgaard
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Julien" == Julien Olivain <[email protected]> writes:
Some packages installs libOpenCL without declaring
BR2_PACKAGE_PROVIDES_LIBOPENCL(e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.To prevent that situation, this patch explicitly disable opencl support.
Review
Quoted 6 lines
Signed-off-by Julien Olivain <[email protected]>--- package/imagemagick/imagemagick.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/package/imagemagick/imagemagick.mkpackage/imagemagick/imagemagick.mk ifeq
Quoted 4 lines
index
0bac0b4fc3..58c8637efc100644package/imagemagick/imagemagick.mk +0
-0@@ -18,10 +18,13 @@ ifeq($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy)
Quoted 2 lines
package/imagemagick/imagemagick.mk +0
-0IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config endif
Quoted 7 lines
package/imagemagick/imagemagick.mk ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) · line 23
Quoted 4 lines
package/imagemagick/imagemagick.mk +3
-1-IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64 +IMAGEMAGICK_CONF_ENV = \ + ac_cv_sys_file_offset_bits=64 \ + ax_cv_check_cl_libcl=noWhy is this needed? From a quick look at m4/ax_opencl.m4, this only seems to be used when we do not pass --disable-opencl?
For some reasons, just passing --disable-opencl will not set $ax_cv_check_cl_libcl to "no", but to an empty string, when tested at:
https://github.com/ImageMagick/ImageMagick/blob/7.0.8-59/configure.ac#L1725
This test will still enable the need of libltdl.
Forcing ax_cv_check_cl_libcl to "no" is a workaround this behavior.
Do you want me to add this comment in the .mk file and update the patch?
Best regards,
Julien.
PATCH 1/1 package/imagemagick: disable opencl
In reply to Julien OlivainQuoted 9 lines · On Fri, 23 Aug 2019 21:14:17 +0200 Julien Olivain <[email protected]> wrote:
Some packages installs libOpenCL without declaring
BR2_PACKAGE_PROVIDES_LIBOPENCL(e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.To prevent that situation, this patch explicitly disable opencl support.
Signed-off-by Julien Olivain <[email protected]>
FYI, I've started looking into this. First, there is an upstream commit that fixes using disable_opencl instead of enable_opencl. Then I fixed up the configure.ac to use the "no_cl" variable that the OpenCL M4 macro defines. But then even with --disable-opencl, the build fails because MAGICKCORE__OPENCL is defined. I'm still trying to figure out why.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/imagemagick: disable opencl
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Quoted 8 lines · On Fri, 23 Aug 2019 21:14:17 +0200 Julien Olivain <[email protected]> wrote:
Some packages installs libOpenCL without declaring
BR2_PACKAGE_PROVIDES_LIBOPENCL(e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.To prevent that situation, this patch explicitly disable opencl support.
Quoted 8 lines
Quoted 1 line
Signed-off-by Julien Olivain <[email protected]>FYI, I've started looking into this. First, there is an upstream commit that fixes using
disable_openclinstead ofenable_opencl. Then I fixed up the configure.ac to use the "no_cl" variable that the OpenCL M4 macro defines. But then even with --disable-opencl, the build fails becauseMAGICKCORE__OPENCLis defined. I'm still trying to figure out why.
I don't see that issue any more (In fact, the only references to that symbol seems to be in Magick{Core,Wand}/studio.h), and the IMAGEMAGICK_CONV_ENV tweak isn't needed any more, so I dropped that and committed - Thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/imagemagick: disable opencl
Quoted 23 lines
Quoted 14 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"Peter" == Peter Korsgaard <[email protected]> writes:
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Quoted 8 lines · On Fri, 23 Aug 2019 21:14:17 +0200 Julien Olivain <[email protected]> wrote:
Some packages installs libOpenCL without declaring
BR2_PACKAGE_PROVIDES_LIBOPENCL(e.g. imx-gpu-viv). ImageMagick will detect the library and will require libtool. Since libtool is not in dependencies, build might fail.To prevent that situation, this patch explicitly disable opencl support.
Quoted 8 lines
Quoted 1 line
Signed-off-by Julien Olivain <[email protected]>FYI, I've started looking into this. First, there is an upstream commit that fixes using
disable_openclinstead ofenable_opencl. Then I fixed up the configure.ac to use the "no_cl" variable that the OpenCL M4 macro defines. But then even with --disable-opencl, the build fails becauseMAGICKCORE__OPENCLis defined. I'm still trying to figure out why.
Quoted 4 lines
I don't see that issue any more (In fact, the only references to that symbol seems to be in
Magick{Core,Wand}/studio.h), and theIMAGEMAGICK_CONV_ENVtweak isn't needed any more, so I dropped that and committed - Thanks.
Committed to 2019.02.x and 2019.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard