Summary: | net-p2p/retroshare-0.6.6-r1 - gui/.../Histogram.h: error: uint32_t was not declared in this scope | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gioacchino Mazzurco <gio> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anderson_mr, jasmin+gentoo, jy6x2b32pie9, leonchik1976, mehw.is.me, parona, proxy-maint, v10lator |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/RetroShare/RetroShare/pull/2757 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 865117 | ||
Attachments: |
emerge-info.txt
emerge-history.txt.bz2 environment etc.clang.tar.bz2 etc.portage.tar.bz2 logs.tar.bz2 net-p2p:retroshare-0.6.6-r1:20230221-052419.log.bz2 temp.tar.bz2 gcc-13-build_fix.patch ebuild, eapi 7 net-p2p/retroshare/files: retroshare-0.6.6-fix-uint32_t-compilation.patch |
Description
Toralf Förster
![]() Created attachment 853570 [details]
emerge-info.txt
Created attachment 853572 [details]
emerge-history.txt.bz2
Created attachment 853574 [details]
environment
Created attachment 853576 [details]
etc.clang.tar.bz2
Created attachment 853578 [details]
etc.portage.tar.bz2
Created attachment 853580 [details]
logs.tar.bz2
Created attachment 853582 [details]
net-p2p:retroshare-0.6.6-r1:20230221-052419.log.bz2
Created attachment 853584 [details]
temp.tar.bz2
ping - this should be a trivial fix, just a missing include also fails to build with gcc 12 Created attachment 874822 [details, diff]
gcc-13-build_fix.patch
Seems it works. Builds, at least
(In reply to Alex D-Bug from comment #11) > Created attachment 874822 [details, diff] [details, diff] > gcc-13-build_fix.patch > > Seems it works. Builds, at least can confirm the same, it builds with GCC 13 Fixed upstream. Retroshare should be bumped to 0.6.7 for bugfix. Also, cxx-17 patch is also not need with 0.6.7. Created attachment 888476 [details]
ebuild, eapi 7
(In reply to jy6x2b32pie9 from comment #14) > Created attachment 888476 [details] > ebuild, eapi 7 Hello, bug#927207 is about net-p2p/retroshare version bump, there's also a new 'plugins' use flag: https://bugs.gentoo.org/attachment.cgi?id=887848 Created attachment 888770 [details, diff] net-p2p/retroshare/files: retroshare-0.6.6-fix-uint32_t-compilation.patch (In reply to Alex D-Bug from comment #11) > Created attachment 874822 [details, diff] [details, diff] > gcc-13-build_fix.patch > > Seems it works. Builds, at least Hello Alex D-Bug, Since you provided a solution, could you please open a https://github.com/gentoo/gentoo PR? Thanks ;) I'm including an attachment that adopts your solution combining some upstream patches: - https://github.com/RetroShare/RetroShare/commit/e1934fd9b03cd52c556eb06d94fb5d68b649592e - https://github.com/RetroShare/RetroShare/commit/15128192003722a3686c1b6f27132ba064cd1705 $ diff retroshare-0.6.6-r1.ebuild retroshare-0.6.6-r2.ebuild 15c15 < KEYWORDS="amd64 x86" --- > KEYWORDS="~amd64 ~x86" 56c56,59 < PATCHES=( "${FILESDIR}/${P}-fix-cxx17-compilation.patch" ) --- > PATCHES=( > "${FILESDIR}/${P}-fix-cxx17-compilation.patch" > "${FILESDIR}/${P}-fix-uint32_t-compilation.patch" > ) Also, the compiler suggests a solution to the uint32_t compilation error too: In file included from gui/statistics/Histogram.cpp:23: gui/statistics/Histogram.h:35:27: error: ‘uint32_t’ was not declared in this scope 35 | const std::vector<uint32_t>& entries() const { return mBins; } | ^~~~~~~~ gui/statistics/Histogram.h:23:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’? 22 | #include <iostream> +++ |+#include <cstdint> Had a look at he gcc-13-build_fix.patch and the net-p2p/retroshare/files: retroshare-0.6.6-fix-uint32_t-compilation.patch. Also tested both and can confirm both fix the issue. When comparing them I first thought the compiler as well as the retroshare-0.6.6-fix-uint32_t-compilation.patch mustg be right. When looking at the other patch through I noted that the retroshare-0.6.6-fix-uint32_t-compilation.patch casts the value to uint32_t just to store it as long int (causing another cast) while the gcc-13-build_fix.patch casts directly to long int. My guess now is that this is a upstream issue: Either they want to cast to a architecture dependend fixed word size (uint32_t is guaranteed to have a wordsize of 32 bit) or they want a wordsize depending on the target architecture (long int). Maybe they ported away from fixed word size and this cast to uint32_t was just an oversight or maybe they really need a fixed word size here no matter what architecture and the second cast to long int is a mistake (the LoC shold look like this: uint32_t bin = (uint32_t)floor((val - mStart)/(mEnd - mStart) * mBins.size()); ) but nobody noticed as they didn't compile for any architectures with a wordsize of long int smaller than 32 bit (are there even any such architectures?). rl;dr: Just my two cents but while both patches work on at least amd64 and probably a lot of other archs, too, I'm unsure which of the patches does the right thing in the eyes of the retroshare devs, hence I think it would be a good idea if one of the patch authors could take the patches upstream and simply ask them. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e641b1b68c37e016a87ca74d06f9721d49cabbd commit 0e641b1b68c37e016a87ca74d06f9721d49cabbd Author: gentoo-setan <gentoo-setan@protonmail.com> AuthorDate: 2024-07-03 17:34:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-07-04 01:22:19 +0000 net-p2p/retroshare: remove 0.6.6-r1 First is long overdue and the rest are recent Closes: https://bugs.gentoo.org/741100 Closes: https://bugs.gentoo.org/829605 Closes: https://bugs.gentoo.org/831389 Closes: https://bugs.gentoo.org/875725 Closes: https://bugs.gentoo.org/895762 Closes: https://bugs.gentoo.org/907898 Closes: https://bugs.gentoo.org/916249 Closes: https://bugs.gentoo.org/931516 Signed-off-by: gentoo-setan <gentoo-setan@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org> net-p2p/retroshare/Manifest | 1 - net-p2p/retroshare/retroshare-0.6.6-r1.ebuild | 111 -------------------------- 2 files changed, 112 deletions(-) |