Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 841973

Summary: media-libs/freeimage-3.18.0-r6 - Source/.../PluginPSD.cpp: error: cannot convert std::nullptr_t to BOOL {aka int} in return
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: games
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 839975    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
media-libs:freeimage-3.18.0-r6:20220430-214709.log
temp.tar.bz2

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(+)