Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 841973 - media-libs/freeimage-3.18.0-r6 - Source/.../PluginPSD.cpp: error: cannot convert std::nullptr_t to BOOL {aka int} in return
Summary: media-libs/freeimage-3.18.0-r6 - Source/.../PluginPSD.cpp: error: cannot conv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 839975
  Show dependency tree
 
Reported: 2022-05-01 07:20 UTC by Toralf Förster
Modified: 2022-06-16 21:14 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,19.04 KB, text/plain)
2022-05-01 07:20 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,248.64 KB, text/plain)
2022-05-01 07:20 UTC, Toralf Förster
Details
environment (environment,61.35 KB, text/plain)
2022-05-01 07:20 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,30.82 KB, application/x-bzip)
2022-05-01 07:21 UTC, Toralf Förster
Details
media-libs:freeimage-3.18.0-r6:20220430-214709.log (media-libs:freeimage-3.18.0-r6:20220430-214709.log,10.37 KB, text/plain)
2022-05-01 07:21 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,16.83 KB, application/x-bzip)
2022-05-01 07:21 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-05-01 07:20:55 UTC
                 from /usr/lib/gcc/x86_64-gentoo-linux-musl/11.3.0/include/g++-v11/sstream:38,
                 from Source/Utilities.h:50,
                 from Source/FreeImage/PluginPSD.cpp:27:
Source/FreeImage/PluginPSD.cpp: In function 'BOOL Save(FreeImageIO*, FIBITMAP*, fi_handle, int, int, void*)':
Source/FreeImage/PluginPSD.cpp:130:24: error: cannot convert 'std::nullptr_t' to 'BOOL' {aka 'int'} in return
  130 |                 return NULL;
      |                        ^~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-j4-20220428-210012

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.3.0 *
clang/llvm (if any):
clang version 14.0.3
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
/usr/lib/llvm/14
14.0.3
Python 3.9.12
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.60.0
  [2]   rust-1.60.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 11.0.14_p9 [openjdk-bin-11]
Available Java Virtual Machines:
  [1]   openjdk-bin-11  system-vm

php cli:
  [1]   php7.4
  [2]   php8.0
  [3]   php8.1 *

  HEAD of ::gentoo
commit 9c65e3f3d5b4acfa3ce8c3ad7354835c45d0a661
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Apr 30 19:19:33 2022 +0000

    2022-04-30 19:19:33 UTC

emerge -qpvO media-libs/freeimage
[ebuild  N    ] media-libs/freeimage-3.18.0-r6  USE="-jpeg -jpeg2k -mng -openexr -png -raw -static-libs -tiff -webp"
Comment 1 Toralf Förster gentoo-dev 2022-05-01 07:20:56 UTC
Created attachment 775736 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-05-01 07:20:58 UTC
Created attachment 775739 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-05-01 07:20:59 UTC
Created attachment 775742 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-05-01 07:21:00 UTC
Created attachment 775745 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-05-01 07:21:01 UTC
Created attachment 775748 [details]
media-libs:freeimage-3.18.0-r6:20220430-214709.log
Comment 6 Toralf Förster gentoo-dev 2022-05-01 07:21:02 UTC
Created attachment 775751 [details]
temp.tar.bz2
Comment 8 Larry the Git Cow gentoo-dev 2022-06-16 21:14:11 UTC
The bug has been closed via the following commit(s):

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

commit a6bf07acc01f5848f2b0b7c17b93e05611a651b5
Author:     Alfred Persson Forsberg <cat@catcream.org>
AuthorDate: 2022-06-16 18:54:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-16 21:08:49 +0000

    media-libs/freeimage: fix build with musl 1.2.3
    
    FreeImage relies on NULL being 0, while on musl for stdc++ >= 11 it is
    defined as nullptr. This breaks the build for musl.
    Returning FALSE here is correct.
    
    Closes: https://bugs.gentoo.org/841973
    Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
    Closes: https://github.com/gentoo/gentoo/pull/25926
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/freeimage-3.18.0-null-to-false.patch     | 22 ++++++++++++++++++++++
 media-libs/freeimage/freeimage-3.18.0-r8.ebuild    |  1 +
 2 files changed, 23 insertions(+)