By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 353

Summary: KOffice will not build with GraphicsMagick 1.3.12 or 1.2.10 installed
Product: TDE Reporter: Darrell <darrella>
Component: non-core programsAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: major CC: albator78, bugwatch, darrella
Priority: P1    
Version: 3.5.13 [Trinity]   
Hardware: All   
OS: All   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Removes GraphicsMagick support if version is >= 1.2.0
Chalk GraphicsMagick 1.3.12 patch
Fixed version of GraphicsMagick 1.3.12 patch

Description Darrell 2010-10-07 12:35:08 CDT
KOffice will not build with GraphicsMagick 1.3.12 or 1.2.10 installed. KOffice compiles with GraphicsMagick 1.1.15 installed.

The build always fails in filters/krita/gmagick.

The discussion in the KDE3 bug report might help:

http://bugs.kde.org/show_bug.cgi?id=161770

Looks like a minor patch was created (follow the bug report thread).

The problem seems to still affect the KDE4 version of Krita:

http://blog.cberger.net/category/open-source/krita/page/2/

http://blog.cberger.net/2009/11/13/the-last-bit-of-magick-dependency-is-now-gone-from-krita/

kdebase has some hooks into GM but builds with the newer versions.
Comment 1 Timothy Pearson 2011-10-23 16:59:54 CDT
Can you verify that this is still a problem?  None of the patches mentioned in the bug report are applicable to the Trinity source, and I have yet to see a build failure myself in the offending area.
Comment 2 Francois Andriot 2011-11-22 15:33:07 CST
Hello, I cannot compile koffice with GraphicsMagick installed under Fedora 16.
GM version is 1.3.12 .
Without GM installed it builds correctly, but 'krita' is missing.

The error message is below:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I. -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../chalk -I../../../chalk/core -I../../../chalk/sdk -I../../../chalk/core/tiles -I../../../chalk/chalkcolor -I../../../chalk/ui -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../lib/interfaces -I../../../lib/kopainter -I../../../lib/kopainter -I/usr/include/GraphicsMagick -I/opt/trinity/include -I/usr/lib64/qt-3.3/include -I. -include tqt.h -I/opt/trinity/include/tqt -DQT_THREAD_SUPPORT -D_REENTRANT -DNDEBUG -DNO_DEBUG -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-exceptions -fno-check-new -fno-common -I/opt/trinity/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -fexceptions -c magickexport.cpp  -fPIC -DPIC -o .libs/magickexport.o
kis_image_magick_converter.cc: In function 'void {anonymous}::setAnnotationsForImage(const Image*, KisImageSP)':
kis_image_magick_converter.cc:185:33: error: 'const Image' has no member named 'generic_profiles'
kis_image_magick_converter.cc:189:41: error: 'const Image' has no member named 'generic_profile'
kis_image_magick_converter.cc:189:71: error: 'const Image' has no member named 'generic_profile'
kis_image_magick_converter.cc:191:72: error: 'const Image' has no member named 'generic_profile'
kis_image_magick_converter.cc: In member function 'KisImageBuilder_Result KisImageMagickConverter::decode(const KURL&, bool)':
kis_image_magick_converter.cc:483:80: error: 'Downscale' was not declared in this scope
kis_image_magick_converter.cc:515:41: warning: 'const PixelPacket* AcquireCacheView(void* const*, long int, long int, long unsigned int, long unsigned int, ExceptionInfo*)' is deprecated (declared at /usr/include/GraphicsMagick/magick/deprecate.h:68) [-Wdeprecated-declarations]
kis_image_magick_converter.cc:515:90: warning: 'const PixelPacket* AcquireCacheView(void* const*, long int, long int, long unsigned int, long unsigned int, ExceptionInfo*)' is deprecated (declared at /usr/include/GraphicsMagick/magick/deprecate.h:68) [-Wdeprecated-declarations]
kis_image_magick_converter.cc:537:57: error: 'Downscale' was not declared in this scope
kis_image_magick_converter.cc:581:62: error: 'Downscale' was not declared in this scope
kis_image_magick_converter.cc:611:62: error: 'Downscale' was not declared in this scope
kis_image_magick_converter.cc: In member function 'KisImageBuilder_Result KisImageMagickConverter::buildFile(const KURL&, KisPaintLayerSP, vKisAnnotationSP_it, vKisAnnotationSP_it)':
kis_image_magick_converter.cc:815:58: error: 'Upscale' was not declared in this scope
kis_image_magick_converter.cc:851:57: error: 'Upscale' was not declared in this scope
kis_image_magick_converter.cc:882:58: error: 'Upscale' was not declared in this scope
kis_image_magick_converter.cc: In static member function 'static QString KisImageMagickConverter::readFilters()':
kis_image_magick_converter.cc:993:23: warning: unused variable 'matches' [-Wunused-variable]
kis_image_magick_converter.cc: In static member function 'static QString KisImageMagickConverter::writeFilters()':
kis_image_magick_converter.cc:1067:23: warning: unused variable 'matches' [-Wunused-variable]
make[4]: *** [kis_image_magick_converter.lo] Error 1
make[4]: Leaving directory `/home/albator/rpmbuild/BUILD/applications/koffice/filters/chalk/gmagick'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/albator/rpmbuild/BUILD/applications/koffice/filters/chalk'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/albator/rpmbuild/BUILD/applications/koffice/filters'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/albator/rpmbuild/BUILD/applications/koffice'
make: *** [all] Error 2
Comment 3 Francois Andriot 2011-11-23 16:10:11 CST
Created attachment 157 [details]
Removes GraphicsMagick support if version is >= 1.2.0

The attached patch allows to compile Koffice with GraphicksMagick support disabled if installed version is >= 1.2.0 .
Comment 4 Darrell 2011-11-23 18:39:16 CST
Tim,

On Slackware 13.1, I am unable to build GraphicsMagick 1.1.15 or 1.2.10. I am able to build 1.3.12.

I installed 1.3.12 and could not build koffice.

Here is the build log:

http://humanreadable.nfshost.com/trinity/build_logs/koffice-3.5.13-i486-1-build.log.gz
Comment 5 Darrell 2011-11-23 19:48:34 CST
In Slackware 13.1, when I remove the GraphicsMagick 1.3.12 package, and with ImageMagick installed, koffice FTBFS.

Log:

http://humanreadable.nfshost.com/trinity/build_logs/koffice-3.5.13-i486-1-build-2.log.gz

I can build koffice only if I remove ImageMagick and install the GraphicsMagick 1.1.15 package I built for Slackware 12.2.
Comment 6 Darrell 2012-01-07 00:15:41 CST
Created attachment 255 [details]
Chalk GraphicsMagick 1.3.12 patch

Update:

Not directly related but I now can build GraphicsMagick 1.1.15 and 1.2.10 on Slackware 13.1. I had to create two patches. I could already build 1.3.12 on 13.1.

I can build koffice on 3.5.10 and 3.5.13 on 13.1, but I have to rebuild ImageMagick with the --with-modules=yes option.

I can build koffice on 3.5.10 and 3.5.13 on 13.1 with GraphicsMagick 1.1.15 installed.

I can build koffice on 3.5.10 and 3.5.13 on 13.1 with GraphicsMagick 1.3.12 installed.

I'm attaching a patch for building koffice with GraphicsMagick 1.3.12 installed. Please let me know whether the patch works for other distros too.

This patch should render the previous GraphicsMagick check >= 1.2.10 as no longer needed. :)
Comment 7 Timothy Pearson 2012-01-08 00:29:27 CST
This is the second patch that has failed to apply due to incorrect numbers within the @@ ... @@ fields.  I have attached a repaired version so that you can see what is different; I don't know if this might be due to a bug in your diff program.

As I don't know why the #ifdef 0 was added (thus disabling a section of code) I have commented that modification out.  I am build testing the result and will commit it to GIT if it builds successfully.
Comment 8 Timothy Pearson 2012-01-08 00:37:16 CST
Created attachment 257 [details]
Fixed version of GraphicsMagick 1.3.12 patch
Comment 9 Timothy Pearson 2012-01-08 00:40:41 CST
(In reply to comment #7)
> I am build testing the result and will
> commit it to GIT if it builds successfully.

It seems that Debian does not use GraphicsMagick support, which is why I never saw the FTBFS.

Can you apply my fixed patch and ensure that everything builds correctly?

Thanks!
Comment 10 Francois Andriot 2012-01-08 02:30:02 CST
Hello, the original patch from Darrell was applied successfully on Fedora 16 and I've managed to build Koffice with it, even though the line number seems strange in the last part of the patch.

Now I'm trying your updated patch, to see if it works too.
Comment 11 Francois Andriot 2012-01-08 03:15:24 CST
OK, apparently the "#if 0" was not there by accident.
Now I've got the following FTBFS :

make[4]: entrant dans le répertoire « /home/albator/rpmbuild/BUILD/applications/koffice/filters/chalk/gmagick »
/bin/sh ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -I. -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../chalk -I../../../chalk/core -I../../../chalk/sdk -I../../../chalk/core/tiles -I../../../chalk/chalkcolor -I../../../chalk/ui -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../lib/interfaces -I../../../lib/kopainter -I../../../lib/kopainter -I/usr/include/GraphicsMagick -I/opt/trinity/include -I/usr/lib64/qt-3.3/include -I. -include tqt.h  -I/opt/trinity/include/tqt   -DQT_THREAD_SUPPORT  -D_REENTRANT  -DNDEBUG -DNO_DEBUG -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-exceptions -fno-check-new -fno-common -I/opt/trinity/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -fexceptions -c -o kis_image_magick_converter.lo kis_image_magick_converter.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I. -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../chalk -I../../../chalk/core -I../../../chalk/sdk -I../../../chalk/core/tiles -I../../../chalk/chalkcolor -I../../../chalk/ui -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store -I../../../lib/kwmf -I../../../lib/kwmf -I../../../lib/kopalette -I../../../lib/kopalette -I../../../lib/interfaces -I../../../lib/kopainter -I../../../lib/kopainter -I/usr/include/GraphicsMagick -I/opt/trinity/include -I/usr/lib64/qt-3.3/include -I. -include tqt.h -I/opt/trinity/include/tqt -DQT_THREAD_SUPPORT -D_REENTRANT -DNDEBUG -DNO_DEBUG -O2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-exceptions -fno-check-new -fno-common -I/opt/trinity/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DHAVE_KNEWSTUFF -fexceptions -c kis_image_magick_converter.cc  -fPIC -DPIC -o .libs/kis_image_magick_converter.o
distcc[9832] ERROR: compile /var/cache/ccache/tmp/kis_image_.tmp.aria.vtf.9829.ii on localhost failed
kis_image_magick_converter.cc: In function ‘void<unnamed>::setAnnotationsForImage(const Image*, KisImageSP)’:
kis_image_magick_converter.cc:186: erreur: ‘const struct _Image’ has no member named ‘generic_profiles’
kis_image_magick_converter.cc:190: erreur: ‘const struct _Image’ has no member named ‘generic_profile’
kis_image_magick_converter.cc:190: erreur: ‘const struct _Image’ has no member named ‘generic_profile’
kis_image_magick_converter.cc:192: erreur: ‘const struct _Image’ has no member named ‘generic_profile’
kis_image_magick_converter.cc: In member function ‘KisImageBuilder_Result KisImageMagickConverter::decode(const KURL&, bool)’:
kis_image_magick_converter.cc:517: attention : ‘const PixelPacket* AcquireCacheView(void* const*, long int, long int, long unsigned int, long unsigned int, ExceptionInfo*)’ is deprecated (declared at /usr/include/GraphicsMagick/magick/deprecate.h:68)
kis_image_magick_converter.cc:517: attention : ‘const PixelPacket* AcquireCacheView(void* const*, long int, long int, long unsigned int, long unsigned int, ExceptionInfo*)’ is deprecated (declared at /usr/include/GraphicsMagick/magick/deprecate.h:68)
kis_image_magick_converter.cc: In static member function ‘static QString KisImageMagickConverter::readFilters()’:
kis_image_magick_converter.cc:994: attention : unused variable ‘matches’
kis_image_magick_converter.cc: In static member function ‘static QString KisImageMagickConverter::writeFilters()’:
kis_image_magick_converter.cc:1068: attention : unused variable ‘matches’
make[4]: *** [kis_image_magick_converter.lo] Erreur 1
make[4]: quittant le répertoire « /home/albator/rpmbuild/BUILD/applications/koffice/filters/chalk/gmagick »
make[3]: *** [all-recursive] Erreur 1
make[3]: quittant le répertoire « /home/albator/rpmbuild/BUILD/applications/koffice/filters/chalk »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/albator/rpmbuild/BUILD/applications/koffice/filters »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/albator/rpmbuild/BUILD/applications/koffice »
make: *** [all] Erreur 2
Comment 12 Francois Andriot 2012-01-08 04:00:48 CST
Compilation is successful with Tim's patch and re-added "#if 0" at the beginning of the patch.
Comment 13 Timothy Pearson 2012-01-09 00:43:00 CST
Did koffice fail to build when the #ifdef 0 was commented out?
Comment 14 Francois Andriot 2012-01-09 11:05:20 CST
Yes, it FTBFS if I comment out the "#if 0", see log in comment #11 .
Comment 15 Darrell 2012-01-09 12:24:05 CST
I could be in left field with this, but I have a note and if-then statement in my koffice build script to apply the chalk GraphicsMmagick patch only when ImageMagick is >=6.5.3-3. Or, for Slackware systems, the patch is needed for 6.5.9-6 or higher. I don't know the resolution in between versions as I only use Slackware and those were the ImageMagick versions provided with each Slackware release.

I don't remember why I have that note or why the GraphicsMmagick patch is affected by ImageMagick.

I don't know whether I can find time to test this specific issue (I'll try), but to anybody interested, the DO_NOT_COMPILE environment variable allows building koffice with reduced components, which reduces the time required to test variations of the patch. Something like the following will reduce build times yet build chalk and associated filters:

DO_NOT_COMPILE="example karbon kpresenter kugar kplato kexi kchart kformula kivio kword kspread"

Place that variable in the command line when running the build script or directly in the build script.
Comment 16 Timothy Pearson 2012-01-09 13:21:21 CST
(In reply to comment #14)
> Yes, it FTBFS if I comment out the "#if 0", see log in comment #11 .

OK, sorry I didn't see that earlier.

Upon inspection it appears that the affected code was deprecated in 2003(!) (http://www.graphicsmagick.org/ChangeLog-2003.html), the filter already uses the new method for obtaining the data, and the #ifdef-ed code can be safely removed without loss of functionality.
Comment 17 Timothy Pearson 2012-01-11 17:33:01 CST
Committed to GIT in hash c1904c6.

Thanks for reporting, and for the patch!