Please rebuild for newer version of ImageMagick

Bug #518122 reported by Andrey Voronov
234
This bug affects 52 people
Affects Status Importance Assigned to Milestone
librmagick-ruby (Debian)
Fix Released
Unknown
librmagick-ruby (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: librmagick-ruby

Open console
type irb
require 'RMagick'
Get error loading lib

description: updated
Revision history for this message
DSHR (s-heuer) wrote :

Same problem here, this breaks the redmine installation (www.redmine.org) ...

Revision history for this message
DSHR (s-heuer) wrote :

The bug in

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557778

seems to describe the same problem ...

Revision history for this message
Simon Huerlimann (huerlisi) wrote :

This has been fixed in Debian unstable package librmagick-ruby 2.13.0-1

Changed in librmagick-ruby (Ubuntu):
status: New → Confirmed
Changed in librmagick-ruby (Debian):
status: Unknown → Fix Released
Revision history for this message
Tom (tompossin-gmail) wrote :

I have the same problem with a fresh rails install on 10.04.

Revision history for this message
lorty (lorty) wrote :

Clean 10.04 final release installation, same problem: breaks rmagick gem.
Solved somehow installing the debian unstable packages librmagick-ruby_2.13,
now rmagick works but obviously I'm now getting problems with missing dependencies with every apt-get operation.
I think fixing this bug is very important for any ruby and ruby on rails development, and for using ubuntu to host such web applications.

Revision history for this message
Marco Cimmino (cimmo) wrote :

The "patch" is very simple to fix this, is an early return.
I attach here the diff against Lucid's package.

I rebuilt the package and I wanted to share it, but unluckily now I got a:
ruby: symbol lookup error: /usr/lib/ruby/1.8/i486-linux/RMagick2.so: undefined symbol: DestroyConstitute

When I use it.

Revision history for this message
Marco Cimmino (cimmo) wrote :

BTW:
the patch has been taken from Debian package from testing repos, so is not mine.

Revision history for this message
Marco Cimmino (cimmo) wrote :

Ok compiled and packaged librmagick-ruby_2.13.0-2 from Debian testing for you:
http://www.marcocimmino.net/2010/05/04/librmagick-ruby_2-13-0-2-for-ubuntu-lucid-10-04/

Revision history for this message
Tom (tompossin-gmail) wrote :

Marco's package's fix the problem on 10.04 for me.
When will this fix find it's way into the repository so I can upgrade my actual server?

Revision history for this message
Matt Davis (matthewedavis) wrote : Re: [Bug 518122] Re: Please rebuild for newer version of ImageMagick

I too really need this fix. When could it be ready?

On May 4, 2010 8:31 PM, "Tom" <email address hidden> wrote:

Marco's package's fix the problem on 10.04 for me.
When will this fix find it's way into the repository so I can upgrade my
actual server?

-- Please rebuild for newer version of ImageMagick
https://bugs.launchpad.net/bugs/518122 You rece...

Revision history for this message
PresuntoRJ (fabio-tleitao) wrote :

this also solved for me in my test server... I think its the only issue that still prevents my upgrade to 10.04 in the official server.

Revision history for this message
PresuntoRJ (fabio-tleitao) wrote :

Due to every advantage I would get, I did the do-release-upgrade in my production server from 9.10 to 10.04 ... of course, redmine was dead due to this issue.

I had then download the packages Marco has built and presto - redmine is a O.K. now. I am not 100% sure if this fix breaks something else or even if it is built 100% according to Ubuntu recommendations but it was good enough for me. I do not recommend everyone to try this before it gets a better checked unless you really know what you are getting into. Be aware!

His zip (follow the comment #8) comes with three .deb files and a quick sudo dpkg -i *.deb gets them going. If anything else seems to malfunction, sudo apt-get autoremove --purge librmagick-ruby1.8 librmagick-ruby librmagick-ruby-doc will clear them up, and a sudo apt-get update && sudo apt-get install librmagick-ruby will get the official (crippled) back on your system.

If you are like me, --stupid-- I mean, brave enough to try this out, whether it works or not you your system, please, report back here so the developers can learn what is going on, and most likely, put a equivalent fix in the repository (at least as a candidate, who knows, at the back-ports) ASAP

Revision history for this message
Jakub Peter (jakub-peter) wrote :

For 64bit distribution I used squeeze (testing) packages:
 - libmagickcore3_6.6.0.4-2_amd64.deb
 - librmagick-ruby1.8_2.13.0-2_amd64.deb
and now I'm able to run my Rails application again.

Revision history for this message
Rui Andrada (shingonoide) wrote :

I had removed the package and used gem version.
sudo gem install rmagick
works perfectly.

Revision history for this message
Tom (tompossin-gmail) wrote :

I can confirm that the gem works as well. Although I would not use the word
perfectly because the install kicks up a huge number of warnings that like
the sample following:

No definition for Draw_get_type_metrics
No definition for Draw_get_multiline_type_metrics
No definition for Draw_initialize
No definition for Draw_init_copy
No definition for Draw_inspect
No definition for Draw_marshal_dump
No definition for Draw_marshal_load
No definition for Draw_primitive
No definition for DrawOptions_initialize
No definition for Pixel_from_color
No definition for Pixel_from_HSL
No definition for Pixel_from_hsla
No definition for Pixel_spaceship
No definition for Pixel_case_eq

And on and on through what seems to be every imaginable method in rmagick.
Although when it is done complaining everything seems to work just fine.
This may be what I do on my production server if there is not a new package
release soon. Since I am a bit anxious to upgrade my server it is still at
8.04 and is getting hard to maintain(already using 3rd party ruby packages).
With rails 3.0 coming out soon I want to have a platform running that is
ready for it.

On Tue, May 11, 2010 at 12:48 PM, Rui Andrada <email address hidden> wrote:

> I had removed the package and used gem version.
> sudo gem install rmagick
> works perfectly.
>
> --
> Please rebuild for newer version of ImageMagick
> https://bugs.launchpad.net/bugs/518122
> You received this bug notification because you are a direct subscriber
> of the bug.
>

tags: added: patch
Revision history for this message
Dominic Evans (oldmanuk) wrote :

/usr/lib/ruby/1.8/x86_64-linux/RMagick2.so: This installation of RMagick was configured with ImageMagick 6.5.5 but ImageMagick 6.5.7-8 is in use. (RuntimeError)

Revision history for this message
Dominic Evans (oldmanuk) wrote :

All did to fix this locally was rebuild against the newer imagemagick packages in lucid, no need to apply any patches

$ cd /usr/src
$ sudo apt-get build-dep librmagick-ruby
$ apt-get source librmagick-ruby
$ cd librmagick-ruby-2.11.1
$ dch -i
(add changelog entry)
$ dpkg-buildpackage
$ cd ..
$ sudo dpkg -i librmagick-ruby*.deb

Revision history for this message
Marco Cimmino (cimmo) wrote :

So if it is so easy, why none from ubuntu just recompile it and release at least under lucid-proposed??

Revision history for this message
Mitch Guthrie (mitchguthrie) wrote :

Is there a reason this bug is taking so long to address? It appears there is a solution to the problem and if I understand correctly it's been fixed upstream so where is the hold up?

Revision history for this message
Bill H (the-president-canada) wrote :

+1 this bug is disconcerting and unavoidable for any developer using Rmagick with Rails, which I'd imagine is many a developer.

That said, following Dominic's instructions seems to resolve the problem, but also makes me nervous since I have no idea what side effects it may have.

Revision history for this message
Yusef Maali (usef) wrote :

I can't recompile the package so I used the one provided by Marco Cimmino (post #8).
It works correctly and it has solved my issue.

Just a question for Marco: in your package you have applied the patch in post #6?

Revision history for this message
Marco Cimmino (cimmo) wrote :

Yes I took package from Debian testing that included the patch. Some other people just mentioned that is enough recompiling the same source code of the Lucid package under Lucid, it seems they compiled the package for Lucid under another platform, so the fix from Ubuntu would be very easy, but God knows why they don't do it.

Revision history for this message
Roma (roshats) wrote :

Ruby etc were installed from repository. Then i upgraded to lucid and got this bug. #17 works for me.

Revision history for this message
Bill H (the-president-canada) wrote :

For the love of god, please fix it. Every time I Lucid wants me to update my system, it reverts to the old version of Rmagick and I have to run the steps in #17 again and again and again unless I remember to uncheck the Imagemagick update.

Revision history for this message
Shish (shish) wrote :

This broke my redmine too :( Are the package maintainers not subscribed to this bug report? :S

Revision history for this message
Sponge-Bob (david.peall) wrote :

This breaks for everyone using Ubuntu Lucid. I'm hoping that someone will eventually look at it!

Revision history for this message
Jb (jb+launchpad) wrote :

I had the error:
ruby: symbol lookup error: /var/lib/gems/1.8/gems/rmagick-2.9.2/ext/RMagick/RMagick2.so: undefined symbol: DestroyConstitute

Seems that DestroyConstitute() has been renamed to ConstituteComponentTerminus(), my patch just changes that.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Fixed in maverick

Changed in librmagick-ruby (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Lucas Nussbaum (lucas) wrote :

This bug renders librmagick-ruby unusable in lucid. It was fixed in maverick since a newer was synced from Debian, hence rebuilt.
Rebuilding the package against the version of imagemagick in lucid is enough to fix the bug, though a more long-term solution would be better to prevent it from happening again. Debian bug about that: #591419.

Test case:
apt-get install ruby1.8 librmagick-ruby
# ruby1.8 -e "require 'RMagick'"
/usr/lib/ruby/1.8/x86_64-linux/RMagick2.so: This installation of RMagick was configured with ImageMagick 6.5.5 but ImageMagick 6.5.7-8 is in use. (RuntimeError)
 from /usr/lib/ruby/1.8/RMagick.rb:11
 from -e:1:in `require'
 from -e:1

Patch (uploaded to lucid-proposed):
diff -u librmagick-ruby-2.11.1/debian/changelog librmagick-ruby-2.11.1/debian/changelog
--- librmagick-ruby-2.11.1/debian/changelog
+++ librmagick-ruby-2.11.1/debian/changelog
@@ -1,3 +1,10 @@
+librmagick-ruby (2.11.1-1ubuntu0.1) lucid-proposed; urgency=low
+
+ * No-changes upload to build against the imagemagick version in Lucid, and
+ avoid RMagick's version check. LP: #518122
+
+ -- Lucas Nussbaum <email address hidden> Tue, 24 Aug 2010 10:56:24 +0200
+
 librmagick-ruby (2.11.1-1) unstable; urgency=low

   * New upstream release

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted librmagick-ruby into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in librmagick-ruby (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Lucas Nussbaum (lucas) wrote :

Checked on amd64, it works fine. I also rebuild all of the doc (188 different examples using RMagick), and everything looks fine.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Marco Cimmino (cimmo) wrote :

Doesn't seem to work here I still get
ruby: symbol lookup error: /usr/lib/ruby/1.8/i486-linux/RMagick2.so: undefined symbol: DestroyConstitute

don't know why

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Could you provide an example script that exhibits the problem?

Revision history for this message
Marco Cimmino (cimmo) wrote :

I think I have the same problem described here:
Bug #539106

There seems to be an API change in imagemagick and this version of librmagick is too old.

Revision history for this message
Marco Cimmino (cimmo) wrote :

@Lucas:
Comment #27 has the patch again ImageMagic, you have used non compatible versions in an Ubuntu LTS release. This is quite bad.

Revision history for this message
Marco Cimmino (cimmo) wrote :

Sorry the patch is against RMagick to use old API in ImageMagick, but the point is the same, you messed up a bit here. Can you fix this bug too?

Thanks.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Marco, this bug was actually fixed in lucid and it is basically complete. If there's been some kind of regression, please report it as a new bug (referencing this one, and then return here and comment about the new bug).

Changed in librmagick-ruby (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Marking Fix Released, not sure why LP didn't pick it up automatically.

Revision history for this message
Marco Cimmino (cimmo) wrote :

Clint:
1. there is no regression, just multiple issues with RMagick package in Lucid and more in general the too old package of ImageMagick shipped in Lucid
2. there is a _different_ bug report opened since 2010-03-15 #539106 now I have added more info, but still.
3. there is also a solution! See comment #27

now:
can we have a fix?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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