octave needs to be rebuilt against graphicsmagick 1.3.20-4

Bug #1372202 reported by Alois1-schneider
338
This bug affects 17 people
Affects Status Importance Assigned to Milestone
octave (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I installed octave with apt-get, the version is 3.8.1
When I try to load an image in octave, I get the error:

error: imread: invalid image file: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.1/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.1/m/image/private/__imread__.m at line 181, column 7
error: /usr/share/octave/3.8.1/m/image/private/imageIO.m at line 66, column 26
error: /usr/share/octave/3.8.1/m/image/imread.m at line 107, column 30

What may give a hint, is that when I perform:
strings /usr/lib/libGraphicsMagick++.so | grep ColorC1E

it shows that there is a symboil named _ZN6Magick5ColorC1Ettt

Revision history for this message
Mike Miller (mtmiller) wrote :

Thank you for taking the time to report this bug and trying to help make Ubuntu better. However, it seems that you are running Octave against libraries not provided by the official Ubuntu repositories. Specifically, it looks like you are running a version of the GraphicsMagick library that was built with a quantum depth of 16 rather than the default of 8. Can you confirm that this is the case? Did you compile GraphicsMagick yourself or install from a PPA or other repository?

Changed in octave (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for octave (Ubuntu) because there has been no activity for 60 days.]

Changed in octave (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Paul Crowley (ciphergoth) wrote :

I'm also seeing this bug. I'm running Ubuntu 15.04 and Octave was installed entirely from the official Ubuntu repository. Nothing is marked as broken in aptitude.

Steps to reproduce:

sudo apt-get install octave
echo "X = imread('bird_small.png')" > imfail.m
octave imfail.m

Actual result:

error: default_formats: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: failed to load: /usr/lib/x86_64-linux-gnu/octave/3.8.2/oct/x86_64-pc-linux-gnu/__magick_read__.oct: undefined symbol: _ZN6Magick5ColorC1Ehhh
error: called from:
error: /usr/share/octave/3.8.2/m/image/imformats.m at line 255, column 11
error: /usr/share/octave/3.8.2/m/image/imformats.m at line 78, column 3
error: /usr/share/octave/3.8.2/m/image/private/imageIO.m at line 60, column 7
error: /usr/share/octave/3.8.2/m/image/imread.m at line 107, column 30

Expected result:

image data is loaded into X

Revision history for this message
Alois1-schneider (alois1-schneider) wrote :

Hello Paul,

I got my problem solved, on my side it wasn't a bug. It turned out, my problem was a ppa that made me use a 16bit ImageMagick. In my case it was ppa:dhor/myway which I used because of rawtherapee. Once I removed uninstalled ImageMagick/Octave. removed the ppa and reinstalled octave it worked fine.
A big thank you to Mike, your tip finally made me find what it was. In ages I wouldn't have had that idea.

Regards
Alois

Revision history for this message
Paul Crowley (ciphergoth) wrote :

Thanks for your help! Unfortunately this doesn't seem to be what's affecting me.

The problem is certainly an 8bit vs 16 bit problem, but not as a result of a PPA: in Ubuntu 15.04 the only version of libmagickcore-6 available is a 16-bit version. I've even tried reinstalling everything with "magick" or "octave" in the name; all the downloads were from the official Ubuntu repository, but the problem persists.

Revision history for this message
Mike Miller (mtmiller) wrote :

Hi Paul, I agree, this is now a problem in the latest release 15.04. The graphicsmagick package was updated to a new build using the 16-bit quantum depth option, and the octave source package was not rebuilt against that library. I'm retitling and updating this bug report to reflect the incompatibility. I believe this qualifies for a SRU for octave, please follow the instructions at https://wiki.ubuntu.com/StableReleaseUpdates to pursue an SRU to fix this problem in octave.

summary: - imread fails
+ octave needs to be rebuilt against graphicsmagick 1.3.20-4
Changed in octave (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Oleg Zalizniak (ramaloke) wrote :

same bug on kubuntu 14.04. removing ppa:dhor/myway helped.
but still after opening picture window octave stacks and picture window doesn't respond

Revision history for this message
Carlos (1-contacto-carlosgonzalez) wrote :

I can confirm the bug is present Kubuntu 15.04. Octave installed from official repositories.

information type: Public → Public Security
Revision history for this message
Max Ehrlich (queuecumber) wrote :

Also having this issue, is there any chance of seeing a fix soon?

Revision history for this message
Christoffer Cronström (hymyly) wrote :

Workaround: I rebuilt the whole package locally, and it works flawlessly out of the box. For those interested in this workaround, here's a synopsis:

# Install the dev packages needed to build octave.
sudo apt-get build-dep octave

# Get the official source package. Do this in a clean directory, because it will get polluted.
cd ~/some/suitable/directory
apt-get source octave

# Build it. This took roughly an hour for me.
cd octave-3.8.2
dpkg-buildpackage

# Either run it from the build directory:
./run-octave
# ...or install it over the official octave:
cd ..
sudo dpkg --install octave_3.8.2-4_amd64.deb

Revision history for this message
Vincenzoml (vincenzoml) wrote :

I have this bug too and it is urgent. It makes octave unusable for image processing in ubuntu right now, and all that you need is to rebuild the package.

Revision history for this message
Imran M Yousuf (imran-smartitengineering) wrote :

Thank you @hymyly

Those steps worked just fine for me.

Revision history for this message
Matthew Berginski (matthew-berginski) wrote :

Another option to avoid this bug is to use the PPA provided by some of the octave developers:

https://launchpad.net/~octave/+archive/ubuntu/stable

After adding this PPA, I was able to upgrade to Octave 4.0. The only warning I'll give about 4.0 is that they have switched to a package system for area specific code, such as image processing. Installing the image processing package was painless though.

Revision history for this message
Mike Miller (mtmiller) wrote :

This bug is resolved with octave 4.0.0-3ubuntu5 which is in the current Ubuntu 15.10 release.

As far as I can tell this now only affects users who have not upgraded from 15.04, which is going EOL in January 2016. So it is probably not worth doing an SRU for 15.04, but someone can file an SRU bug if there is enough interest.

Changed in octave (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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