| ~~~~~~~~~~~~~~~~~~~~~~~~~~ dcraw.c: In function foveon_interpolate: dcraw.c:3443:26: note: at offset -132 into destination object of size [0, 786420] allocated by calloc 3443 | black = (float (*)[3]) calloc (height, sizeof *black); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * x86_64-pc-linux-gnu-gcc -O2 -O2 -pipe -march=native -fno-diagnostics-color -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--defsym=__gentoo_check_ldflags__=0 -o dcparse parse.c parse.c:968:7: error: conflicting types for memmem; have char *(char *, size_t, char *, size_t) {aka char *(char *, long unsigned int, char *, long unsigned int)} 968 | char *memmem (char *haystack, size_t haystacklen, | ^~~~~~ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_desktop_systemd-20230803-152005 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 16.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/16/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/16 16.0.6 Python 3.11.4 Available Rust versions: [1] rust-bin-1.71.1 [2] rust-1.71.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 17.0.7_p7 [openjdk-bin-17] *) Eclipse Temurin JDK 8.372_p07 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm [2] openjdk-bin-17 php cli (if any): go version go1.20.6 linux/amd64 HEAD of ::gentoo commit 5828d75c7780d37d7567ce0a1719b551c7c48904 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Aug 5 07:31:37 2023 +0000 2023-08-05 07:31:37 UTC emerge -qpvO media-gfx/dcraw [ebuild N ] media-gfx/dcraw-9.28.0-r2 USE="jpeg lcms nls -gimp"
Created attachment 867124 [details] emerge-info.txt
Created attachment 867125 [details] emerge-history.txt
Created attachment 867126 [details] environment
Created attachment 867127 [details] etc.clang.tar.xz
Created attachment 867128 [details] etc.portage.tar.xz
Created attachment 867129 [details] media-gfx:dcraw-9.28.0-r2:20230805-082556.log
Created attachment 867130 [details] temp.tar.xz
Created attachment 871147 [details, diff] Removes memmem from parse.c Removing the memmem function from dcraw parse.c allows it to compile, since memmem is provided by glibc. Dunno if this is the "correct" solution, but, it works.
(In reply to Robert Schultz from comment #8) > Created attachment 871147 [details, diff] [details, diff] > Removes memmem from parse.c > > Removing the memmem function from dcraw parse.c allows it to compile, since > memmem is provided by glibc. Dunno if this is the "correct" solution, but, > it works. That's not really a good solution since then dcraw fails to build with older glibc ... The solution in the PR is better (adapting the return type of memmem).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6172f7056a106ec032d333e1c0b3eb64af5813a2 commit 6172f7056a106ec032d333e1c0b3eb64af5813a2 Author: Pascal Jäger <pascal.jaeger@leimstift.de> AuthorDate: 2023-09-22 11:26:39 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2023-10-31 19:27:34 +0000 media-gfx/dcraw: revbump, fix bugs Closes: https://bugs.gentoo.org/713220 Closes: https://bugs.gentoo.org/896204 Closes: https://bugs.gentoo.org/911753 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> Closes: https://github.com/gentoo/gentoo/pull/32990 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> media-gfx/dcraw/dcraw-9.28.0-r3.ebuild | 130 +++++++++++++++++++++ .../dcraw-9.28.0-fix-LC_CTYPE-undeclared.patch | 17 +++ ...dcraw-9.28.0-fix-memmem-wrong-return-type.patch | 17 +++ 3 files changed, 164 insertions(+)
Please reopen, the bug is *not* fixed with that commit (at least, I just got the same error when emerging dcraw-9.28.0-r3). The problem with memmem in parse.c is not only the return type: The *argument* types are conflicting and causing the error: The memmem in parse.c has type "char *" for the first and third argument. The memmem in the system string.h declares them both as "const void *" (and "const void *" is correct).
media-gfx/dcraw-9.28.0-r3 also fails to build
Created attachment 873809 [details] build.log
Removing memmem() from parse.c resolves the problem (and I checked it before looking here). Make use of the new patch by Robert Schultz and close that bug! :-) @Leonid Kopylov - make use of that /usr/local/bin/decolor #!/bin/sed -f s:\x1B\[[0-9;]*[mK]::g to get rid of ncurses special codes.
*** Bug 916672 has been marked as a duplicate of this bug. ***
This patch from SUSE may help: https://build.opensuse.org/package/view_file/openSUSE:Factory/dcraw/dcraw-glibc-2.38.patch Needs to be adapted to coexist with our existing memmem patch.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eefddc92a4e972321eefd80796fd4cfdd6ca9b67 commit eefddc92a4e972321eefd80796fd4cfdd6ca9b67 Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2023-11-04 12:43:04 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2023-11-04 12:43:40 +0000 media-gfx/dcraw: fix build for glibc-2.38 Bug: https://bugs.gentoo.org/911753 Signed-off-by: Ben Kohler <bkohler@gentoo.org> media-gfx/dcraw/dcraw-9.28.0-r4.ebuild | 130 +++++++++++++++++++++ .../dcraw/files/dcraw-9.28.0-glibc-2.38.patch | 24 ++++ 2 files changed, 154 insertions(+)