Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 864785 - sci-mathematics/octave-7.2.0 lacks magick support
Summary: sci-mathematics/octave-7.2.0 lacks magick support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-10 11:59 UTC by Fabio Rossi
Modified: 2022-11-09 18:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build_failure_imagemagick.log.gz (build_failure_imagemagick.log.gz,71.69 KB, application/gzip)
2022-08-10 12:27 UTC, Fabio Rossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2022-08-10 11:59:36 UTC
octave depends on virtual/imagemagick-tools I had installed only media-gfx/imagemagick-7.1.0.13 on my system.

When emerging octave, during configuration phase I see the following in the log:

...
configure: WARNING: GraphicsMagick++ library not found.  The imread, imwrite, and imfinfo functions for reading and writing image files will not be fully functional.
...
configure: WARNING: GraphicsMagick++ library not found.  The imread, imwrite, and imfinfo functions for reading and writing image files will not be fully functional.
...

and when running octave I get the warning:

warning: latex_renderer:: failed to read png data. imfinfo: support for Image IO was unavailable or disabled when Octave was built

Then I have tried installing media-gfx/graphicsmagick which is indeed automatically recognized during octave configuration and works at run-time (I get a warning:

warning: your version of GraphicsMagick limits images to 8 bits per pixel

but the latex rendering goes well).

Instead if I try to compile against imagemagick-7.1.0.13 (by providing the configure flag --with-magick=Magick++) then I get a failure, maybe octave is not compatible with imagemagick as is but needs a patch.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-10 12:01:51 UTC
what failure do you get when you try to force ImageMagick via configure?
Comment 2 Fabio Rossi 2022-08-10 12:25:21 UTC
(In reply to Sam James from comment #1)
> what failure do you get when you try to force ImageMagick via configure?

I get a build failure during compilation. Here is attached the log.
Comment 3 Fabio Rossi 2022-08-10 12:27:54 UTC
Created attachment 799129 [details]
build_failure_imagemagick.log.gz
Comment 4 Michael Orlitzky gentoo-dev 2022-08-13 02:55:02 UTC
This has been a headache forever:

  https://savannah.gnu.org/bugs/?func=detailitem&item_id=49653

I'm wondering if we shouldn't just require graphicsmagick (behind a USE flag?), since that seems to be all that gets tested.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-05 05:19:30 UTC
(In reply to Fabio Rossi from comment #3)
> Created attachment 799129 [details]
> build_failure_imagemagick.log.gz

Would you mind reporting this failure upstream and linking it here?
Comment 6 Fabio Rossi 2022-11-07 15:48:57 UTC
(In reply to Sam James from comment #5)
> (In reply to Fabio Rossi from comment #3)
> > Created attachment 799129 [details]
> > build_failure_imagemagick.log.gz
> 
> Would you mind reporting this failure upstream and linking it here?

done, put the link in the URL field. I have checked again with latest octave 7.3.0.
Comment 7 Fabio Rossi 2022-11-08 09:21:59 UTC
upstream introduced a commit to disable the magick support if imagemagick 7 is detected at configure time, from the bug report it doesn't seem they will introduce additional changes to make octave work also with imagemagick.

If nobody steps in to produce a patch I think in gentoo would be better to depend only on graphicsmagick (maybe with a conditional useflag)
Comment 8 Michael Orlitzky gentoo-dev 2022-11-08 13:11:03 UTC
(In reply to Fabio Rossi from comment #7)
> upstream introduced a commit to disable the magick support if imagemagick 7
> is detected at configure time, from the bug report it doesn't seem they will
> introduce additional changes to make octave work also with imagemagick.
> 
> If nobody steps in to produce a patch I think in gentoo would be better to
> depend only on graphicsmagick (maybe with a conditional useflag)

I'm doing a @world update at the moment, but if no one objects, I'll do this as soon as my system becomes usable again.

The names and descriptions of our global "graphicsmagick" and "imagemagick" USE flags are a bit unfortunate here. It looks like the best choice is to hide the dependency behind USE=imagemagick only, but then have it pull in media-gfx/graphicsmagick instead.
Comment 9 Fabio Rossi 2022-11-08 13:21:51 UTC
(In reply to Michael Orlitzky from comment #8)

> The names and descriptions of our global "graphicsmagick" and "imagemagick"
> USE flags are a bit unfortunate here. It looks like the best choice is to
> hide the dependency behind USE=imagemagick only, but then have it pull in
> media-gfx/graphicsmagick instead.

If I am correct, the dep should be behind USE=graphicsmagick, something like 

DEPEND+="graphicsmagick? ( media-gfx/graphicsmagick )"

and $(use_with graphicsmagick magick GraphicsMagick++) in configure phase to avoid picking up imagemagick when graphicsmagick is not installed as happened to me initially.
Comment 10 Michael Orlitzky gentoo-dev 2022-11-08 13:25:49 UTC
(In reply to Fabio Rossi from comment #9)
> 
> If I am correct, the dep should be behind USE=graphicsmagick, something like 
> 
> DEPEND+="graphicsmagick? ( media-gfx/graphicsmagick )"
> 
> and $(use_with graphicsmagick magick GraphicsMagick++) in configure phase to
> avoid picking up imagemagick when graphicsmagick is not installed as
> happened to me initially.

That would make the most sense in isolation, but the global description of USE=graphicsmagick is,

  graphicsmagick - Build and link against GraphicsMagick instead of
  ImageMagick (requires USE=imagemagick if optional)
Comment 11 Michael Orlitzky gentoo-dev 2022-11-09 11:48:42 UTC
While testing I noticed that the fltk/opengl backend doesn't seem to work on its own. It is successfully found by ./configure with the right *FLAGS, but:

  octave:1> available_graphics_toolkits 
  ans = {}(1x0)

I've asked about this in #octave. If it's not supposed to work without the GUI, I may take this opportunity to merge USE=opengl into USE=gui and drop the fltk support entirely, since Qt provides its own widgets to display plots.
Comment 12 Michael Orlitzky gentoo-dev 2022-11-09 18:00:13 UTC
(In reply to Michael Orlitzky from comment #11)
> While testing I noticed that the fltk/opengl backend doesn't seem to work on
> its own. 

PEBKAC, it also needs --with-x. I've added a REQUIRED_USE for it.
Comment 13 Larry the Git Cow gentoo-dev 2022-11-09 18:20:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff61ef7d2434eebfec1e13e04f5d7e92b2c1772d

commit ff61ef7d2434eebfec1e13e04f5d7e92b2c1772d
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2022-11-09 17:58:19 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2022-11-09 18:19:36 +0000

    sci-mathematics/octave: new revision fixing some dependency issues.
    
    This revision adds a new flag, USE=imagemagick, to pull in
    media-gfx/graphicsmagick. That's not a typo -- the global USE flag
    descriptions for "imagemagick" and "graphicsmagick" make this awkward.
    In any case, Octave upstream doesn't really support imagemagick, only
    graphicsmagick. Thanks to Fabio Rossi for reporting the issue and
    suggesting the fix.
    
    Furthermore,
    
      1. media-gfx/graphicsmagick was moved to DEPEND because Octave
         links with it.
    
      2. The "static-libs" USE flag was dropped.
    
      3. A new flag, USE=fltk, was factored out of USE=opengl. The Qt
         GUI can make use of OpenGL on its own.
    
      4. An old hack for linking with fltk was dropped.
    
      5. A new REQUIRED_USE prevents some nonsense combinations of the
         X, gui, fltk, and opengl USE flags.
    
      6. Local descriptions for the fltk, gnuplot, and imagemagick flags
         were added to metadata.xml to explain more accurately what they
         actually do.
    
    Closes: https://bugs.gentoo.org/864785
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 sci-mathematics/octave/metadata.xml                |  3 ++
 ...{octave-7.3.0.ebuild => octave-7.3.0-r1.ebuild} | 46 ++++++++++++++++------
 2 files changed, 38 insertions(+), 11 deletions(-)