Trying to compile app-arch/p7zip on a system with full Clang/libcxx toolchain leads to a compilation error: ---------------------------------------------------------- In file included from ../../../../CPP/Common/Md5Reg.cpp:8: In file included from ../../../../CPP/Common/../../C/hashes/md5.h:40: ../../../../CPP/Common/../../C/hashes/hash.h:51:16: error: typedef redefinition with different types ('UInt64' (aka 'unsigned long long') vs '__uint64_t' (aka 'unsigned long')) typedef UInt64 uint64_t; ^ /usr/include/bits/stdint-uintn.h:27:20: note: previous definition is here typedef __uint64_t uint64_t; ^ 1 error generated. ---------------------------------------------------------- Switching the compiler to GCC is not sufficient to fix this; switching to libstdc++ is required to make the package build for me. Reproducible: Always Steps to Reproduce: 1. Use Clang/libcxx toolchain 2. Try to compile app-arch/p7zip Actual Results: In file included from ../../../../CPP/Common/Md5Reg.cpp:8: In file included from ../../../../CPP/Common/../../C/hashes/md5.h:40: ../../../../CPP/Common/../../C/hashes/hash.h:51:16: error: typedef redefinition with different types ('UInt64' (aka 'unsigned long long') vs '__uint64_t' (aka 'unsigned long')) typedef UInt64 uint64_t; ^ /usr/include/bits/stdint-uintn.h:27:20: note: previous definition is here typedef __uint64_t uint64_t; ^ 1 error generated. Expected Results: Package should compile.
Created attachment 857993 [details] build.log
Created attachment 857995 [details] emerge --info
Created attachment 860114 [details, diff] p7zip-17.05-stdint.patch It compiles successfully with clang 16.0.1 libcxx and with gcc 12.2.1_p20230304 p13 with this patch (by me). A workaround is to save the patch as the file (creating the directory): /etc/portage/patches/app-arch/p7zip-17.05/p7zip-17.05-stdint.patch
Your patch works fine for me too on musl/clang. Thanks!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=275bd4036e56c8f0e00081100814ae88a4d3361c commit 275bd4036e56c8f0e00081100814ae88a4d3361c Author: Matthew Thode <prometheanfire@gentoo.org> AuthorDate: 2023-09-24 14:57:57 +0000 Commit: Matthew Thode <prometheanfire@gentoo.org> CommitDate: 2023-09-24 14:59:26 +0000 app-arch/p7zip: fix build issue Closes: https://bugs.gentoo.org/901467 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org> app-arch/p7zip/files/p7zip-17.05-unit64.patch | 21 +++++++++++++++++++++ app-arch/p7zip/p7zip-17.05-r1.ebuild | 4 ++++ 2 files changed, 25 insertions(+)