[Bug 885862] [NEW] Magick++ library broken in Ubuntu 11.10: wrong signature of Magick::Geometry::Geometry

Dima Ryazanov dima at gmail.com
Thu Nov 3 20:18:40 UTC 2011


Public bug reported:

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)

** Affects: imagemagick (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to imagemagick in Ubuntu.
https://bugs.launchpad.net/bugs/885862

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

Status in “imagemagick” package in Ubuntu:
  New

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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/885862/+subscriptions




More information about the foundations-bugs mailing list