# cannot update ImageMagick



## robbtek (Jul 28, 2012)

I tried to update ImageMagick from version 6.7.7.7_1 to 6.7.8-6 on my FreeBSD 9.0-RELEASE-p3 GENERIC (with gcc46 , gcc47 and gcc48) but this does not work.


```
mondounix.com# cd /usr/ports/graphics/ImageMagick/ && make install clean

...

 install  -o root -g wheel -m 555 magick/Magick-config magick/MagickCore-config wand/Wand-config wand/MagickWand-config Magick++/bin/Magick++-config '/usr/local/bin'
( cd PerlMagick && gmake CC='gcc46 -std=gnu99 -std=gnu99' && \
gmake CC='gcc46 -std=gnu99 -std=gnu99' install )
gmake[3]: Entering directory `/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6/PerlMagick'
rm -f blib/arch/auto/Image/Magick/Magick.so
LD_RUN_PATH="/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6/PerlMagick/../magick/.libs" g++46  -L../magick/.libs -lMagickCore -shared  -L/usr/local/lib -fstack-protector -L/usr/local/lib -L/usr/local/lib -R/usr/local/lib -L/usr/local/lib -L/usr/local/lib Magick.o  -o blib/arch/auto/Image/Magick/Magick.so         \
   -L/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6/PerlMagick/../magick/.libs -lMagickCore -lm       \
  
Magick.o: In function `XS_Image__Magick_QueryOption':
Magick.c:(.text+0x759): undefined reference to `__stack_chk_fail_local'
Magick.o: In function `XS_Image__Magick_QueryFormat':
Magick.c:(.text+0xc41): undefined reference to `__stack_chk_fail_local'
Magick.o: In function `XS_Image__Magick_QueryFont':
Magick.c:(.text+0x12e4): undefined reference to `__stack_chk_fail_local'
Magick.o: In function `XS_Image__Magick_QueryColor':
Magick.c:(.text+0x1877): undefined reference to `__stack_chk_fail_local'
Magick.o: In function `XS_Image__Magick_DESTROY':
Magick.c:(.text+0x1c82): undefined reference to `__stack_chk_fail_local'
Magick.o:Magick.c:(.text+0x200a): more undefined references to `__stack_chk_fail_local' follow
/usr/local/bin/ld: blib/arch/auto/Image/Magick/Magick.so: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/local/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
gmake[3]: *** [blib/arch/auto/Image/Magick/Magick.so] Error 1
gmake[3]: Leaving directory `/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6/PerlMagick'
gmake[2]: *** [install-exec-perl] Error 2
gmake[2]: Leaving directory `/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6'
gmake[1]: *** [install-am] Error 2
gmake[1]: Leaving directory `/usr/ports/graphics/ImageMagick/work/ImageMagick-6.7.8-6'
gmake: *** [install] Error 2
*** Error code 2

Stop in /usr/ports/graphics/ImageMagick.
```


----------



## zhoopin (Jul 28, 2012)

1. Update your ports tree.
2. Clean port working directory

`% make clean`

3.Build the port using the standard compiler (4.2.1),Not gcc46 , gcc47 and gcc48.
And take a look at 
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/custom-gcc/article.html
for *Excluding ports that do not build with new version of GCC*


----------



## robbtek (Jul 28, 2012)

Thanks !!! I've solved this problem 


```
mondounix.com# gcc --version
gcc (GCC) 4.2.1 20070831 patched [FreeBSD]

mondounix.com# cd /usr/ports/graphics/ImageMagick
mondounix.com# make clean
mondounix.com# make install clean

...

===>   Registering installation for ImageMagick-6.7.8.6
===>  Cleaning for ImageMagick-6.7.8.6
```


----------

