# Failed to compile graphics/ImageMagick



## alie (Jan 13, 2012)

```
[/usr/home/alie]$ uname -smr
FreeBSD 9.0-STABLE amd64
```


```
make  check-TESTS check-local
PASS: tests/validate-compare.sh
PASS: tests/validate-composite.sh
PASS: tests/validate-convert.sh
PASS: tests/validate-identify.sh
PASS: tests/validate-import.sh
PASS: tests/validate-montage.sh
PASS: tests/validate-pipe.sh
PASS: tests/validate-stream.sh
PASS: tests/validate-formats-in-memory.sh
PASS: tests/validate-formats-on-disk.sh
FAIL: Magick++/tests/exceptions.sh
.
.
.
===========================================
1 of 48 tests failed                                                                                                                                                                                      
See ./test-suite.log                                                                                                                                                                                      
Please report to http://www.imagemagick.org                                                                                                                                                               
===========================================                                                                                                                                                               
*** Error code 1                                                                                                                                                                                          

Stop in /usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.4-4.
*** Error code 1

Stop in /usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.4-4.
*** Error code 1

Stop in /usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.4-4.
*** Error code 1

Stop in /usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.4-4.
*** Error code 1

Stop in /usr/ports/graphics/ImageMagick.
*** Error code 1

Stop in /usr/ports/graphics/ImageMagick.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20120113-5061-wasc01-0 env
 UPGRADE_TOOL=portupgrade UPGRADE_PORT=ImageMagick-6.7.3.4 UPGRADE_PORT_VER=6.7.3.4 make
```

From test-suite.log

```
=========================================
   ImageMagick 6.7.4: ./test-suite.log
=========================================

1 of 48 tests failed.

.. contents:: :depth: 2


FAIL: Magick++/tests/exceptions.sh (exit: 139)
==============================================

Segmentation fault (core dumped)
```
Anyone got same issue?


----------



## zeiz (Jan 13, 2012)

*D*id it today, no problems.


----------



## wblock@ (Jan 13, 2012)

There was a mention of problems with either GCC 4.6 or FreeBSD-10 and ImageMagic on the -ports mailing list recently.  Are either of those involved?


----------



## alie (Jan 13, 2012)

wblock@ said:
			
		

> There was a mention of problems with either GCC 4.6 or FreeBSD-10 and ImageMagic on the -ports mailing list recently.  Are either of those involved?



I am using FreeBSD 9.0-STABLE and *I* am unsure about GCC version.


```
[/usr/ports]$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
```


----------



## ssc (Jan 15, 2012)

Same context here - plain vanilla FreeBSD 9.0, ImageMagick fails a different test though:


```
=========================================
   ImageMagick 6.7.4: ./test-suite.log   
=========================================

1 of 48 tests failed.  

.. contents:: :depth: 2


FAIL: Magick++/tests/coderInfo.sh (exit: 1)
===========================================

Caught exception: coderInfo: unable to load module `/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.4-4/coders/url.la': file not found @ error/module.c/OpenModule/1278
```

don't even know where to start looking for the cause :-(


----------



## gessel (Jan 25, 2012)

Prize!  5 of 48 fail.


```
ImageMagick-nox11
ImageMagick-6.7.4-4
FreeBSD 8.2-RELEASE
gcc-4.4.7.20120117 
CFLAGS="-O2 -pipe -funroll-loops -march=nocona
```

_explicit make.conf test to disable -march=core2 and -O3 optimizations_


```
=========================================
   ImageMagick 6.7.4: ./test-suite.log
=========================================

5 of 48 tests failed.

.. contents:: :depth: 2


FAIL: tests/validate-formats-in-memory.sh (exit: 132)
=====================================================

Illegal instruction (core dumped)

FAIL: tests/validate-formats-on-disk.sh (exit: 132)
===================================================

Illegal instruction (core dumped)

FAIL: Magick++/tests/exceptions.sh (exit: 134)
==============================================

terminate called after throwing an instance of 'int'
Abort trap (core dumped)

FAIL: Magick++/tests/attributes.sh (exit: 134)
==============================================

terminate called after throwing an instance of 'Magick::ErrorMissingDelegate'
  what():  attributes: no decode delegate for this image format `foo' @ error/constitute.c/ReadImage/532
Abort trap (core dumped)

FAIL: Magick++/demo/analyze.sh (exit: 134)
==========================================

terminate called after throwing an instance of 'Magick::ErrorModule'
  what():  analyze: unable to load module `analyze.la': /usr/local/lib/ImageMagick-6.7.4/modules-Q16/filters/analyze.la
 @ error/module.c/InvokeDynamicImageFilter/983
Abort trap (core dumped)
```


----------



## gessel (Jan 25, 2012)

OK, removed make.conf exception and am down to these 2 fails:
(I guess core2/O3 optimizations work now)

```
FAIL: tests/validate-formats-in-memory.sh
FAIL: tests/validate-formats-on-disk.sh
```


----------



## gessel (Jan 25, 2012)

Worked for me:

Run *make config* (if needed) deselect JPEG2000 and SVG (which requires X11 and is on by default in the -nox11 package for some reason).  Otherwise accept defaults although the default of having both LCMS2 and LCMS selected triggers a warning.


----------



## pboehmer (Jun 12, 2012)

No dice with JPEG2000 and SVG unselected. Build still failing on analyze.sh.  A quick pe*e*k at /usr/ports/graphics/ImageMagick/work/Magic++/demo/analyze.log shows:


```
FAIL: Magick++/demo/analyze.sh (exit: 134)
==========================================

Assertion failed: ((*images)->signature == MagickSignature), function analyzeImage, file filters/analyze.c, line 113.
Abort trap (core dumped)
```

This is on FreeBSD 9.0 STABLE amd64 (compiled world on 20120523) and gcc 4.2.1.  I only have this problem on my amd64 boxes.


----------



## MASSER (Jun 15, 2012)

Same problem here...

```
=========================================
   ImageMagick 6.7.7: ./test-suite.log
=========================================

1 of 49 tests failed.

.. contents:: :depth: 2


FAIL: Magick++/demo/analyze.sh (exit: 134)
==========================================

Assertion failed: ((*images)->signature == MagickSignature), function analyzeImage, file filters/analyze.c, line 113.
Abort trap (core dumped)
```
FreeBSD 8.2-STABLE amd64


----------



## underlig (Jun 15, 2012)

I suppose we can agree that something is broken with ImageMagick right now, but just to add to the "me too":  FreeBSD 7.2-RELEASE i386, so it's not only possible to break it on amd64.


----------



## Jonas (Jun 17, 2012)

I also had this problem. In the commit list (graphics/ImageMagick) it says "Re-enable WITH_IMAGEMAGICK_HDRI" in a recent commit, after Re-disabling this option all tests pass here.


----------



## fmw (Jun 18, 2012)

Yep, reproducible failure in analyze.sh.


----------



## pboehmer (Jun 18, 2012)

Looks like Jonas found the solution (at least for me), disabling HDRI option allows all tests to past.
Thanks (again)!


----------



## DutchDaemon (Jun 18, 2012)

I added this information to a PR that was already open on this issue. Hopefully the maintainer can solve it or kick it upstream.


----------



## DutchDaemon (Jun 19, 2012)

Port has just been updated, should be in your ports tree shortly:

http://www.freshports.org/commit.ph...1206191219.q5JCJbNb075227@repoman.freebsd.org


----------

