Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734724 - media-libs/freeimage-3.18.0-r2: fails to build with >=media-libs/libraw-0.20.0
Summary: media-libs/freeimage-3.18.0-r2: fails to build with >=media-libs/libraw-0.20.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: CVE-2019-12211, CVE-2019-12213
  Show dependency tree
 
Reported: 2020-07-30 09:21 UTC by Helmut Jarausch
Modified: 2020-12-29 01:05 UTC (History)
10 users (show)

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


Attachments
build log (freeimage-3.18.0-r2:20200730-170907.log.gz,3.34 KB, application/gzip)
2020-07-30 17:17 UTC, Michelangelo Scopelliti
Details
Patch removing "substream" from Source/FreeImage/PluginRAW.cpp (libraw_0_20.patch,1.49 KB, patch)
2020-08-01 09:18 UTC, Bernd Feige
Details | Diff
freeimage-libraw-0.20.0.patch (freeimage-libraw-0.20.0.patch,2.14 KB, patch)
2020-11-10 20:34 UTC, John Helmert III (ajak)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2020-07-30 09:21:35 UTC
The 
class LibRaw_abstract_datastream
doesn't have the 'substream' member any more.
This breaks media-libs/freeimage, e.g.
Comment 1 Michelangelo Scopelliti 2020-07-30 09:39:21 UTC
Same problem here
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2020-07-30 13:01:52 UTC
Breaks how? Configure time, compile time, run time?
Comment 3 Michelangelo Scopelliti 2020-07-30 17:17:31 UTC
Created attachment 651698 [details]
build log

After upgrading to libraw-0.20.0, freeimage-3.18.0-r2 fails with error 

Source/FreeImage/PluginRAW.cpp: In member function ‘virtual int LibRaw_freeimage_datastream::read(void*, size_t, size_t)’:
Source/FreeImage/PluginRAW.cpp:66:6: error: ‘substream’ was not declared in this scope
   66 |   if(substream) return substream->read(buffer, size, count);
      |      ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual int LibRaw_freeimage_datastream::seek(INT64, int)’:
Source/FreeImage/PluginRAW.cpp:71:12: error: ‘substream’ was not declared in this scope
   71 |         if(substream) return substream->seek(offset, origin);
      |            ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual INT64 LibRaw_freeimage_datastream::tell()’:
Source/FreeImage/PluginRAW.cpp:76:6: error: ‘substream’ was not declared in this scope
   76 |   if(substream) return substream->tell();
      |      ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual int LibRaw_freeimage_datastream::get_char()’:
Source/FreeImage/PluginRAW.cpp:86:6: error: ‘substream’ was not declared in this scope
   86 |   if(substream) return substream->get_char();
      |      ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual char* LibRaw_freeimage_datastream::gets(char*, int)’:
Source/FreeImage/PluginRAW.cpp:92:7: error: ‘substream’ was not declared in this scope
   92 |   if (substream) return substream->gets(buffer, length);
      |       ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual int LibRaw_freeimage_datastream::scanf_one(const char*, void*)’:
Source/FreeImage/PluginRAW.cpp:107:6: error: ‘substream’ was not declared in this scope
  107 |   if(substream) return substream->scanf_one(fmt,val);
      |      ^~~~~~~~~
Source/FreeImage/PluginRAW.cpp: In member function ‘virtual int LibRaw_freeimage_datastream::eof()’:
Source/FreeImage/PluginRAW.cpp:130:6: error: ‘substream’ was not declared in this scope
  130 |   if(substream) return substream->eof();



build log attached
Comment 4 younky.yang 2020-08-01 02:49:24 UTC
Same error as upgrade to libRaw.
Comment 5 Bernd Feige 2020-08-01 09:18:26 UTC
Created attachment 651956 [details, diff]
Patch removing "substream" from Source/FreeImage/PluginRAW.cpp

Attached patch removes "substream" handling and makes freeimage compile against media-libs/libraw-0.20.0.

BTW, I think that gentoo is not well served by setting bug subject headers to a short accusation of the OP. It has been pretty clear from the outset that this is a compile error.
Comment 6 Peter Green 2020-08-26 05:02:12 UTC
FYI upstream applied a patch similar to the one posted by Bernd Feige, but with some additional code-style changes some time ago.

https://sourceforge.net/p/freeimage/svn/1842/

(note: I have been looking into the same bug in Debian and came across this bug during my searches, I am not a Gentoo user)
Comment 7 Red 2020-10-04 16:56:04 UTC
I have the same problem with media-libs/freeimage-3.18.0-r1 and the patch from Bernd Feige fixes it.
Comment 8 jorge 2020-10-06 22:26:00 UTC
media-libs/freeimage-3.18.0-r1 fails to emerge ever since media-libs/libraw-0.20.0
Comment 9 John Helmert III (ajak) gentoo-dev Security 2020-11-10 20:34:04 UTC
Created attachment 670805 [details, diff]
freeimage-libraw-0.20.0.patch

Here's the patch from upstream. Maintainer, can we get this applied?

Also, there seem to be tests for this package but Portage is incapable of running them. They seem to depend on `make dist` being run and can be compiled from the TestAPI directory, but seem to be somewhat broken and I couldn't get them to work.
Comment 10 Larry Pyeatt 2020-11-26 02:36:40 UTC
Verified that the patch works for media-libs/freeimage-3.18.0-r2 with media-libs/libraw-0.20.2
Comment 11 Larry Pyeatt 2020-12-28 19:36:16 UTC
Tried to upgrade my other machine today, and the patch is not in the tree yet.  I'm putting in a pull request.
Comment 12 Larry the Git Cow gentoo-dev 2020-12-29 01:05:12 UTC
The bug has been closed via the following commit(s):

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

commit 4e04aa9c3a2fc91635da5023090ba023a1e4932f
Author:     Larry Pyeatt <larry.pyeatt@sdsmt.edu>
AuthorDate: 2020-12-28 22:24:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-12-29 01:02:34 +0000

    media-libs/freeimage: fix build with >=media-libs/libraw-0.20.0
    
    Signed-off-by: Larry Pyeatt <larry.pyeatt@sdsmt.edu>
    Closes: https://bugs.gentoo.org/734724
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/freeimage-3.18.0-libraw-0.20.0.patch     | 70 ++++++++++++++++++++++
 media-libs/freeimage/freeimage-3.18.0-r2.ebuild    |  1 +
 2 files changed, 71 insertions(+)