Magick++ library broken in Ubuntu 11.10: wrong signature of Magick::Geometry::Geometry

Bug #885862 reported by Dima Ryazanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
imagemagick (Debian)
Fix Released
Unknown
imagemagick (Ubuntu)
Fix Committed
Undecided
Unassigned

Bug Description

The signature of the Magick::Geometry's constructor has changed between Ubuntu 11.04 and 11.10, even though there was no change in the library version numbers, and no change in the upsteam code. This breaks any application that depends on that function.

Upstream code, from https://www.imagemagick.org/subversion/ImageMagick/trunk/Magick++/lib/Magick++/Geometry.h:

    Geometry ( size_t width_,
        size_t height_,
        ::ssize_t xOff_ = 0,
        ::ssize_t yOff_ = 0,
        bool xNegative_ = false,
        bool yNegative_ = false );

Ubuntu 11.04 code, in /usr/include/ImageMagick/Magick++/Geometry.h (equivalent to upstream):

    Geometry ( size_t width_,
        size_t height_,
        ssize_t xOff_ = 0,
        ssize_t yOff_ = 0,
        bool xNegative_ = false,
        bool yNegative_ = false );

Ubuntu 11.10 code, in /usr/include/ImageMagick/Magick++/Geometry.h:

    Geometry ( unsigned int width_,
        unsigned int height_,
        unsigned int xOff_ = 0,
        unsigned int yOff_ = 0,
        bool xNegative_ = false,
        bool yNegative_ = false );

Note the change from size_t to int. The header and the /usr/lib/libMagick++.so.3.0.0 library are both broken, though in different ways.

Here's a sample program:

#include <Magick++/Geometry.h>
int main() {
  Magick::Geometry(0, 0);
  return 0;
}

It won't link on Ubuntu 11.10:

$ g++ -I /usr/include/ImageMagick/ -lMagick++ test_magick.cc -o test_magick
/tmp/ccghEH0m.o: In function `main':
test_magick.cc:(.text+0x32): undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, unsigned int, unsigned int, bool, bool)'
test_magick.cc:(.text+0x3e): undefined reference to `Magick::Geometry::~Geometry()'
collect2: ld returned 1 exit status

When compiled on Ubuntu 11.04, it will crash on Ubuntu 11.10:

$ ~/test_magick
/home/dima/test_magick: symbol lookup error: /home/dima/test_magick: undefined symbol: _ZN6Magick8GeometryC1Emmllbb

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: libmagick++3 8:6.6.0.4-3ubuntu1 [modified: usr/share/doc/libmagick++3/changelog.Debian.gz]
Uname: Linux 3.0.3 x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Thu Nov 3 13:02:03 2011
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: imagemagick
UpgradeStatus: Upgraded to oneiric on 2011-09-02 (61 days ago)

Revision history for this message
Dima Ryazanov (dima-gmail) wrote :
Changed in imagemagick (Debian):
status: Unknown → Fix Released
Changed in imagemagick (Ubuntu):
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.