all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24290: ImageMagick optimized for the host processor type on x86_64 and i686
@ 2016-08-23  2:00 Leo Famulari
  2016-08-23  2:40 ` bug#24290: [PATCH 0/1] Potential solution Leo Famulari
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-08-23  2:00 UTC (permalink / raw)
  To: 24290

When building ImageMagick on i686 and x86_64, the '-mtune' GCC option
[0] is automatically set to optimize the output for the host processor
[1].

My understand of the GCC documentation is that the binaries will still
run on other processor types, which is why we haven't noticed any
related problems with ImageMagick so far.

But, this definitely makes the ImageMagick package non-reproducible.

Potential solutions:

* Set '-mtune=generic' when building on x86_64 and i686.
* Patch the build system to not try setting this flag at all. I'm not
sure how to achieve this, but I'm sure it's possible.
* Your great idea here :)

These are the two files that contain the string '-mtune' in the
ImageMagick source tree:

http://git.imagemagick.org/repos/ImageMagick/blob/ImageMagick-6/m4/ax_gcc_archflag.m4

I recommend *not* opening this file in your browser. It's very long and
might crash your browser. Try cloning the Git repo instead.
hXXp://git.imagemagick.org/repos/ImageMagick/blob/ImageMagick-6/configure

[0]
https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options

[1]
http://hydra.gnu.org/build/1441619/log#line-2626
[...]
checking whether C compiler accepts -mtune=haswell... yes
checking for gcc architecture flag... -mtune=haswell
[...]

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

* bug#24290: [PATCH 0/1] Potential solution
  2016-08-23  2:00 bug#24290: ImageMagick optimized for the host processor type on x86_64 and i686 Leo Famulari
@ 2016-08-23  2:40 ` Leo Famulari
  2016-08-23  2:40   ` bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations Leo Famulari
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-08-23  2:40 UTC (permalink / raw)
  To: 24290

I found this bug report on a related issue:
https://fedorahosted.org/fesco/ticket/1443

They suggested building with '--without-gcc-arch', and it seems to work
for me. At least, '-mtune' is not mentioned anywhere in the build log.

Leo Famulari (1):
  gnu: imagemagick: Don't build with processor-specific optimizations.

 gnu/packages/imagemagick.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.3

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

* bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations.
  2016-08-23  2:40 ` bug#24290: [PATCH 0/1] Potential solution Leo Famulari
@ 2016-08-23  2:40   ` Leo Famulari
  2016-08-23  4:53     ` Eric Bavier
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-08-23  2:40 UTC (permalink / raw)
  To: 24290

* gnu/packages/imagemagick.scm (imagemagick)[arguments]: Pass --without-gcc-arch
to #:configure-flags.
---
 gnu/packages/imagemagick.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index b7054c8..a554b73 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -51,7 +51,7 @@
                "00arcvyhsy9i5gp3b0lhfvs04qwhxpmq0bfsv4ipllinb6mjgxf5"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--with-frozenpaths")
+     `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
        #:phases (modify-phases %standard-phases
                   (add-before
                    'build 'pre-build
-- 
2.9.3

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

* bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations.
  2016-08-23  2:40   ` bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations Leo Famulari
@ 2016-08-23  4:53     ` Eric Bavier
  2016-08-23 16:45       ` Leo Famulari
  2016-08-24 20:00       ` Leo Famulari
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Bavier @ 2016-08-23  4:53 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 24290

On Mon, 22 Aug 2016 22:40:02 -0400
Leo Famulari <leo@famulari.name> wrote:

> * gnu/packages/imagemagick.scm (imagemagick)[arguments]: Pass --without-gcc-arch
> to #:configure-flags.
> ---
>  gnu/packages/imagemagick.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
> index b7054c8..a554b73 100644
> --- a/gnu/packages/imagemagick.scm
> +++ b/gnu/packages/imagemagick.scm
> @@ -51,7 +51,7 @@
>                 "00arcvyhsy9i5gp3b0lhfvs04qwhxpmq0bfsv4ipllinb6mjgxf5"))))
>      (build-system gnu-build-system)
>      (arguments
> -     `(#:configure-flags '("--with-frozenpaths")
> +     `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
>         #:phases (modify-phases %standard-phases
>                    (add-before
>                     'build 'pre-build

This seems like a good solution to me.  We commonly target SSE2 as a
lcd.  Can we make sure that ImageMagick compiles for SSE2 at least?

`~Eric

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

* bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations.
  2016-08-23  4:53     ` Eric Bavier
@ 2016-08-23 16:45       ` Leo Famulari
  2016-08-24 20:00       ` Leo Famulari
  1 sibling, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-08-23 16:45 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 24290


[-- Attachment #1.1: Type: text/plain, Size: 320 bytes --]

On Mon, Aug 22, 2016 at 11:53:52PM -0500, Eric Bavier wrote:
> This seems like a good solution to me.  We commonly target SSE2 as a
> lcd.  Can we make sure that ImageMagick compiles for SSE2 at least?

Sure, but I don't know how to check for that :)

I've attached the log of the configure phase with my patch applied.

[-- Attachment #1.2: imagemagick-configure-log.xz --]
[-- Type: application/octet-stream, Size: 8104 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations.
  2016-08-23  4:53     ` Eric Bavier
  2016-08-23 16:45       ` Leo Famulari
@ 2016-08-24 20:00       ` Leo Famulari
  1 sibling, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-08-24 20:00 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 24290

On Mon, Aug 22, 2016 at 11:53:52PM -0500, Eric Bavier wrote:
> On Mon, 22 Aug 2016 22:40:02 -0400
> Leo Famulari <leo@famulari.name> wrote:
> 
> > * gnu/packages/imagemagick.scm (imagemagick)[arguments]: Pass --without-gcc-arch
> > to #:configure-flags.
> > ---
> >  gnu/packages/imagemagick.scm | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
> > index b7054c8..a554b73 100644
> > --- a/gnu/packages/imagemagick.scm
> > +++ b/gnu/packages/imagemagick.scm
> > @@ -51,7 +51,7 @@
> >                 "00arcvyhsy9i5gp3b0lhfvs04qwhxpmq0bfsv4ipllinb6mjgxf5"))))
> >      (build-system gnu-build-system)
> >      (arguments
> > -     `(#:configure-flags '("--with-frozenpaths")
> > +     `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
> >         #:phases (modify-phases %standard-phases
> >                    (add-before
> >                     'build 'pre-build
> 
> This seems like a good solution to me.  We commonly target SSE2 as a
> lcd.  Can we make sure that ImageMagick compiles for SSE2 at least?

Mark pointed out on IRC that we don't want to assume support for SSE for
our i686 packages, and that SSE/SSE2 is part of the base specification
for x86_64.

So, I pushed this patch as 00831624, and I'm not going to do anything
related to SSE.

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

end of thread, other threads:[~2016-08-24 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23  2:00 bug#24290: ImageMagick optimized for the host processor type on x86_64 and i686 Leo Famulari
2016-08-23  2:40 ` bug#24290: [PATCH 0/1] Potential solution Leo Famulari
2016-08-23  2:40   ` bug#24290: [PATCH 1/1] gnu: imagemagick: Don't build with processor-specific optimizations Leo Famulari
2016-08-23  4:53     ` Eric Bavier
2016-08-23 16:45       ` Leo Famulari
2016-08-24 20:00       ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.