Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479946 - =app-office/libreoffice- with =media-libs/jpeg-9a - vcl/source/filter/jpeg/JpegReader.cxx:74:29: error: invalid conversion from 'sal_Bool {aka unsigned char}' to 'boolean' [-fpermissive]
Summary: =app-office/libreoffice- with =media-libs/jpeg-9a - vcl/source/filter/...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
Keywords: PATCH
: 521698 (view as bug list)
Depends on:
Blocks: jpeg-9
  Show dependency tree
Reported: 2013-08-06 17:14 UTC by Andrew Church
Modified: 2014-09-18 20:56 UTC (History)
5 users (show)

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

Patch (libreoffice-,1.16 KB, patch)
2013-08-06 17:15 UTC, Andrew Church
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Church 2013-08-06 17:14:17 UTC
The definition of the type "boolean" seems to have changed in jpeg-9, causing type mismatch errors in libreoffice-

[build CXX] vcl/source/filter/jpeg/JpegReader.cxx
/tmp/portage/app-office/libreoffice- In function 'void init_source(j_decompress_ptr)':
/tmp/portage/app-office/libreoffice- error: invalid conversion from 'sal_Bool {aka unsigned char}' to 'boolean' [-fpermissive]
/tmp/portage/app-office/libreoffice- In function 'boolean fill_input_buffer(j_decompress_ptr)':
/tmp/portage/app-office/libreoffice- error: invalid conversion from 'sal_Bool {aka unsigned char}' to 'boolean' [-fpermissive]
/tmp/portage/app-office/libreoffice- error: invalid conversion from 'sal_Bool {aka unsigned char}' to 'boolean' [-fpermissive]
[build CXX] vcl/source/filter/jpeg/JpegWriter.cxx
/tmp/portage/app-office/libreoffice- In function 'boolean empty_output_buffer(j_compress_ptr)':
/tmp/portage/app-office/libreoffice- error: invalid conversion from 'sal_Bool {aka unsigned char}' to 'boolean' [-fpermissive]

Patch attached.
Comment 1 Andrew Church 2013-08-06 17:15:15 UTC
Created attachment 355256 [details, diff]

Trying to attach the patch again.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-08-06 18:23:36 UTC
(In reply to Andrew Church from comment #1)
> Created attachment 355256 [details, diff] [details, diff]
> Patch
> Trying to attach the patch again.

Is this patch compatible with libjpeg-turbo-1.3.0-r2 ( ?
Comment 3 Andrew Church 2013-08-06 18:43:31 UTC
I haven't tried it out (long build and all that), but it's just changing what was an implicit type conversion to an explicit one, so in theory it should be fine.  Diffing the jpeg-9 and libjpeg-turbo-1.3.0 headers shows that libjpeg-turbo also defines a "boolean" type (as does jpeg-8 and earlier); it looks like the bug arose due to jpeg-9 switching the type from "int" to an enum.
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-08-08 12:28:28 UTC
I don't see a way forward with this without these questions being answered first:

- The patch is still required for >=media-libs/jpeg-9-r1 ? Yes, revision matters.
- The patch is compatible with >=media-libs/libjpeg-turbo-1.3.0-r2 ? Yes, revision matters.
Comment 5 Andrew Church 2013-08-08 15:41:39 UTC
>- The patch is still required for >=media-libs/jpeg-9-r1 ? Yes, revision matters.

Yes, the patch is still required for >=media-libs/jpeg-9-r1 due to a change from jpeg-8 in the definition of the "boolean" type.  (Similar patches are likely to be required in many C++ programs which use libjpeg.  It would have been nice if they'd just typedef'd boolean to "bool" for C++, but that probably brings in ABI issues and whatnot.)

>- The patch is compatible with >=media-libs/libjpeg-turbo-1.3.0-r2 ? Yes, revision matters.

It should be, but I'll run a build now and get you a definitive answer.
Comment 6 Andrew Church 2013-08-08 19:35:02 UTC
I've now confirmed that the patch is compatible with libjpeg-turbo-1.3.0-r2.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-08-21 11:46:27 UTC
jpeg-9a released to ~arch today, so i've applied the patch to libreoffice- since maintainers seem unresponsive (year with no activity in the bug)

for -9999 ebuilds, the issue has to be taken upstream
Comment 8 Tomáš Chvátal (RETIRED) gentoo-dev 2014-08-21 12:14:58 UTC
Reverted the commit and reopened.

Do NOT ever add patches just like this. I stated on multiple bugs already that you have to submit it upstream if you want any code change merged here.
And I simply don't have time for this to forward.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2014-08-21 14:02:39 UTC
(In reply to Tomáš Chvátal from comment #8)
> Reverted the commit and reopened.

I can understand reopening, but reverting? Then it'll be broken for users. :/

Reported at,
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2014-08-24 21:12:34 UTC
verified still needs the attached patch which should have never been reverted.
fixed already in upstream git, so nothing left to report or fix for upstream, we just need to carry the attached patch while waiting for the fix to flow into releases from upstream repository.
Comment 12 Rafal Kupiec 2014-08-30 14:28:48 UTC
*** Bug 521698 has been marked as a duplicate of this bug. ***
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2014-09-18 05:01:51 UTC
ping? please revert the revert, the patch was fine!
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2014-09-18 20:56:56 UTC
Equivalent patch added straight to stable.