trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: December 2011

Re: [trinity-devel] KOffice 3.5.13 FTBFS

From: Darrell Anderson <humanreadable@...>
Date: Wed, 7 Dec 2011 22:07:11 -0800 (PST)
> Some progress. :) I merges some *magick related patches
> from Fedora.
> 
> I finally found a way to build GraphicsMagick 1.1.15 in
> Slackware 13.1. I had to create a gcc43 patch and a patch to
> explicitly include libpng12/png.h rather than
> libpng14/png.h. Slackware 13.1 includes both but defaults to
> libpng14.
> 
> With or without GraphicsMagick 1.1.15, the build fails as
> before with all of the /usr/lib/libMagickCore.so: undefined
> reference errors.
> 
> Adding -l/usr/lib/libMagickWand.so to the LDFLAGS does not
> help.
> 
> When I remove ImageMagick and have GraphicsMagick 1.1.15
> installed then KOffice builds. Yet only chalk and
> krossrunner build.
> 
> An hour and 20 minutes for the build and the build is
> incorrect. :(

When I run the readelf command against ImageMagick /usr/lib/libMagick* libraries, looking for any that contain references to DrawSetStrokeLineCap, I see the following:

readelf --symbols --wide /usr/lib/libMagick* | grep DrawSetStrokeLineCap

readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: /usr/lib/libMagick++.la: Failed to read file header
  1978: 00000000     0 FUNC    GLOBAL DEFAULT  UND DrawSetStrokeLineCap
  1978: 00000000     0 FUNC    GLOBAL DEFAULT  UND DrawSetStrokeLineCap
  1978: 00000000     0 FUNC    GLOBAL DEFAULT  UND DrawSetStrokeLineCap
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: /usr/lib/libMagickCore.la: Failed to read file header
  1598: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND DrawSetStrokeLineCap
  1598: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND DrawSetStrokeLineCap
  1598: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND DrawSetStrokeLineCap
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: /usr/lib/libMagickWand.la: Failed to read file header
   871: 00076880   335 FUNC    GLOBAL DEFAULT   10 DrawSetStrokeLineCap
   871: 00076880   335 FUNC    GLOBAL DEFAULT   10 DrawSetStrokeLineCap
   871: 00076880   335 FUNC    GLOBAL DEFAULT   10 DrawSetStrokeLineCap


I selected the DrawSetStrokeLineCap symbol arbitrarily from the build log failures.

When I run the ld command against those three ImageMagick libraries, I see the following:

ld /usr/lib/libMagick++.so
ld: warning: cannot find entry symbol _start; not setting start address

ld /usr/lib/libMagickWand.so
ld: warning: cannot find entry symbol _start; not setting start address

ld /usr/lib/libMagickCore.so
ld: warning: cannot find entry symbol _start; not setting start address
/usr/lib/libMagickCore.so: undefined reference to `DrawPathStart'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetViewbox'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFont'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopPattern'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFillPatternURL'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeDashArray'
/usr/lib/libMagickCore.so: undefined reference to `DrawAllocateWand'
/usr/lib/libMagickCore.so: undefined reference to `PushDrawingWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathClose'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetRedQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawScale'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetTextUnderColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawLine'
/usr/lib/libMagickCore.so: undefined reference to `PopDrawingWand'
/usr/lib/libMagickCore.so: undefined reference to `DestroyPixelWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFontSize'
/usr/lib/libMagickCore.so: undefined reference to `DrawTranslate'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathMoveToAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `DrawAnnotation'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeAntialias'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushDefs'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathFinish'
/usr/lib/libMagickCore.so: undefined reference to `DestroyMagickWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawRoundRectangle'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopDefs'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetQuantumColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetFillColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawComposite'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawRender'
/usr/lib/libMagickCore.so: undefined reference to `DrawEllipse'
/usr/lib/libMagickCore.so: undefined reference to `DrawComment'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathLineToAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetBlueQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeLineJoin'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushPattern'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetColor'
/usr/lib/libMagickCore.so: undefined reference to `DrawPushClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeLineCap'
/usr/lib/libMagickCore.so: undefined reference to `DrawArc'
/usr/lib/libMagickCore.so: undefined reference to `NewMagickWandFromImage'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetOpacityQuantum'
/usr/lib/libMagickCore.so: undefined reference to `DrawPopClipPath'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetClipRule'
/usr/lib/libMagickCore.so: undefined reference to `NewPixelWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawRotate'
/usr/lib/libMagickCore.so: undefined reference to `DrawRectangle'
/usr/lib/libMagickCore.so: undefined reference to `DestroyDrawingWand'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokeWidth'
/usr/lib/libMagickCore.so: undefined reference to `DrawPathEllipticArcAbsolute'
/usr/lib/libMagickCore.so: undefined reference to `DrawSetStrokePatternURL'
/usr/lib/libMagickCore.so: undefined reference to `PixelSetGreenQuantum'

I'm thinking the problem is not how koffice links to ImageMagick, but ImageMagick itself.

I grabbed the sources for ImageMagick-6.5.3-3, which is the version that came with Slackware 13.0. (I had to add a patch to force using libpng12 rather than libpng14.) I rebuilt the package and ran the ld command against all three libraries. No 'undefined reference' errors.

Something changed between 6.5.3-3 and 6.5.9-6. Something in 6.5.9-6 does not build correctly.

Any ideas what? Something in the config options? Compiler flags? My searching the web revealed nothing.

Darrell