Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
@ 2019-08-23 19:14 Julien Olivain
  2019-08-25  7:04 ` Peter Korsgaard
  2019-09-24  9:47 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Olivain @ 2019-08-23 19:14 UTC (permalink / raw)
  To: buildroot

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 <juju@cotds.org>
---
 package/imagemagick/imagemagick.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk
index 0bac0b4fc3..58c8637efc 100644
--- a/package/imagemagick/imagemagick.mk
+++ b/package/imagemagick/imagemagick.mk
@@ -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 \
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
  2019-08-23 19:14 [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl Julien Olivain
@ 2019-08-25  7:04 ` Peter Korsgaard
  2019-08-25 10:47   ` juju at cotds.org
  2019-09-24  9:47 ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2019-08-25  7:04 UTC (permalink / raw)
  To: buildroot

>>>>> "Julien" == Julien Olivain <juju@cotds.org> 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 <juju@cotds.org>
 > ---
 >  package/imagemagick/imagemagick.mk | 6 +++++-
 >  1 file changed, 5 insertions(+), 1 deletion(-)

 > diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk
 > index 0bac0b4fc3..58c8637efc 100644
 > --- a/package/imagemagick/imagemagick.mk
 > +++ b/package/imagemagick/imagemagick.mk
 > @@ -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?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
  2019-08-25  7:04 ` Peter Korsgaard
@ 2019-08-25 10:47   ` juju at cotds.org
  0 siblings, 0 replies; 6+ messages in thread
From: juju at cotds.org @ 2019-08-25 10:47 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On 2019-08-25 09:04, Peter Korsgaard wrote:
>>>>>> "Julien" == Julien Olivain <juju@cotds.org> 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 <juju@cotds.org>
>  > ---
>  >  package/imagemagick/imagemagick.mk | 6 +++++-
>  >  1 file changed, 5 insertions(+), 1 deletion(-)
> 
>  > diff --git a/package/imagemagick/imagemagick.mk
> b/package/imagemagick/imagemagick.mk
>  > index 0bac0b4fc3..58c8637efc 100644
>  > --- a/package/imagemagick/imagemagick.mk
>  > +++ b/package/imagemagick/imagemagick.mk
>  > @@ -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?

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
  2019-08-23 19:14 [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl Julien Olivain
  2019-08-25  7:04 ` Peter Korsgaard
@ 2019-09-24  9:47 ` Thomas Petazzoni
  2020-02-03 16:02   ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2019-09-24  9:47 UTC (permalink / raw)
  To: buildroot

On Fri, 23 Aug 2019 21:14:17 +0200
Julien Olivain <juju@cotds.org> 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 <juju@cotds.org>

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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
  2019-09-24  9:47 ` Thomas Petazzoni
@ 2020-02-03 16:02   ` Peter Korsgaard
  2020-03-07 21:06     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2020-02-03 16:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Fri, 23 Aug 2019 21:14:17 +0200
 > Julien Olivain <juju@cotds.org> 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 <juju@cotds.org>

 > 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.

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.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl
  2020-02-03 16:02   ` Peter Korsgaard
@ 2020-03-07 21:06     ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2020-03-07 21:06 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
 >> On Fri, 23 Aug 2019 21:14:17 +0200
 >> Julien Olivain <juju@cotds.org> 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 <juju@cotds.org>

 >> 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.

 > 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.

Committed to 2019.02.x and 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-07 21:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-23 19:14 [Buildroot] [PATCH 1/1] package/imagemagick: disable opencl Julien Olivain
2019-08-25  7:04 ` Peter Korsgaard
2019-08-25 10:47   ` juju at cotds.org
2019-09-24  9:47 ` Thomas Petazzoni
2020-02-03 16:02   ` Peter Korsgaard
2020-03-07 21:06     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox