I'm not sure at which imagemagick version this compilation problem started, but at least with the latest 6.7.4.0 and 6.7.3.0, it fails to compile if I have "-O3" set. It works with "-O2". They both fail at decorate.c: (consuming all my memory, I believe :s...) /bin/sh ./libtool --silent --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I./config -I./ltdl -I./ltdl -I/usr/include/freetype2 -O3 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -Wall -pthread -c -o magick/magick_libMagickCore_la-decorate.lo `test -f 'magick/decorate.c' || echo './'`magick/decorate.c x86_64-pc-linux-gnu-gcc: Internal error: Killed (program cc1) * ERROR: media-gfx/imagemagick-6.7.3.0 failed (compile phase): * ERROR: media-gfx/imagemagick-6.7.4.0 failed (compile phase): Reproducible: Always
(Oh, I'm using gcc 4.5.3-r1)
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
Why? Does it compile with -O3 for you? (Even with gcc 4.5ish?)
According to the URL, we still do not support -O3. -O3: This is the highest level of optimization possible, and also the riskiest. It will take a longer time to compile your code with this option, and in fact it should not be used system-wide with gcc 4.x. The behavior of gcc has changed significantly since version 3.x. In 3.x, -O3 has been shown to lead to marginally faster execution times over -O2, but this is no longer the case with gcc 4.x. Compiling all your packages with -O3 will result in larger binaries that require more memory, and will significantly increase the odds of compilation failure or unexpected program behavior (including errors). The downsides outweigh the benefits; remember the principle of diminishing returns. Using -O3 is not recommended for gcc 4.x. Also, according to the limited output you posted, the compiler got killed, probably because it ran out of memory to allocate. Install more RAM, use MAKEOPTS with fewer jobs, remove -pipe from your CFLAGS. But don't think there's a bug to fix here.