6.9.0-0 : Bogus -march=penryn appended to CFLAGS

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
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Post by mi »

The CFLAGS I'm specifying to configure script are:

Code: Select all

-O2 -pipe -march=core2  -I/opt/include/graphviz -I/opt/include/freetype2 -fstack-protector -fno-strict-aliasing
For some reason, after configure finishes, it reports:

Code: Select all

  CFLAGS          = -I/opt/include/lqr-1 -I/opt/include/glib-2.0 -I/opt/lib/glib-2.0/include -I/opt/include -I/opt/include/freetype2 -I/opt/include/libpng15 -O2 -pipe -march=core2 -I/opt/include/graphviz -I/opt/include/freetype2 -fstack-protector -fno-strict-aliasing -Wall -march=penryn -fexceptions -D_THREAD_SAFE -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
The penryn-processor has capabilities, that my core2 does not have -- such as SSE4.1. This causes IM to die from illegal instruction at random places (such as upon the first invocation of floor()).

The OS is FreeBSD-10.1/i386 (32-bit). Why would IM do such a thing -- append its own march-switch after the user's specification?!
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Post by dlemstra »

Is this also the cause of the problem reported here: viewtopic.php?f=3&t=26745?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Post by magick »

ImageMagick utilizes a configure script generated by the automake / autoconf toolchain. You may need to make a bug report to the automake / autoconf maintainers. In the mean-time, edit Makefile and remove the -march flag from the CFLAGS define, then type rebuild, reinstall ImageMagick.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: 6.9.0-0 : Bogus -march=penryn appended to CFLAGS

Post by mi »

Is this also the cause of the problem reported here: viewtopic.php?f=3&t=26745?
No. As I write in that thread, that problem can be seen -- by running under valgrdin --- even on a different CPU-architecture (amd64).
ImageMagick utilizes a configure script generated by the automake / autoconf toolchain. You may need to make a bug report to the automake / autoconf maintainers.
Yes, apparently, the fault lies with the ax_gcc_archflag-macro, triggered by using --with-gcc-arch argument with configure...

I'm not sure, however, the responsibility for bringing it up with the authors should be mine -- the script came (to me) with the ImageMagick bundle...
Post Reply