Bug 276797 - games/dxx-rebirth: Does not build with lang/gcc13 on i386: error: use of built-in trait '__remove_cv(_Tp)' in function signature; use library traits instead
Summary: games/dxx-rebirth: Does not build with lang/gcc13 on i386: error: use of bui...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-03 11:02 UTC by Lorenzo Salvadore
Modified: 2024-02-20 15:21 UTC (History)
1 user (show)

See Also:
salvadore: maintainer-feedback? (pkubaj)


Attachments
Set USE_GCC=12 (898 bytes, patch)
2024-02-04 10:21 UTC, Lorenzo Salvadore
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-03 11:02:39 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding ta fix: https://gcc.gnu.org/gcc-13/porting_to.html

In file included from /usr/include/c++/v1/type_traits:520,
                 from /usr/include/c++/v1/limits:827,
                 from /usr/include/c++/v1/__fwd/span.h:15,
                 from /usr/include/c++/v1/span:133,
                 from common/include/dxxerror.h:31,
                 from similar/main/kmatrix.cpp:32:
/usr/include/c++/v1/__type_traits/make_unsigned.h: In instantiation of 'constexpr std::__1::__make_unsigned_t<_Tp> std::__1::__to_unsigned_like(_Tp) [with _Tp = int]':
/usr/include/c++/v1/__type_traits/make_unsigned.h:89:24: error: use of built-in trait '__remove_cv(_Tp)' in function signature; use library traits instead
   89 | __make_unsigned_t<_Tp> __to_unsigned_like(_Tp __x) noexcept {
      |                        ^~~~~~~~~~~~~~~~~~
scons: *** [build/similar/main/.d1x-rebirth.kmatrix.o] Error 1
scons: building terminated because of errors.
Failed target count: total=1; targets with enable_build_failure_summary=1: 1
Failed node list:
	build/similar/main/.d1x-rebirth.kmatrix.o
Failed command list:
 g++13 -c -g -O2 -ftabstop=4 -Wall -Werror=extra -Werror=format=2 -Werror=missing-braces -Werror=missing-include-dirs -Werror=uninitialized -Werror=undef -Werror=pointer-arith -Werror=cast-qual -Werror=missing-declarations -Werror=vla -pthread -funsigned-char -O2 -pipe -fstack-protector-strong -Wno-error=missing-field-initializers -Wno-error=maybe-uninitialized -stdlib=libc++ -Wl,-rpath=/usr/local/lib/gcc13 -isystem /usr/local/include -flto -std=gnu++20 -Werror=unused -Werror=useless-cast -Wimplicit-fallthrough=5 -Wno-dangling-reference -fvisibility=hidden -Wduplicated-branches -Wduplicated-cond -Wsuggest-attribute=noreturn -Wsuggest-final-types -Wsuggest-override -Wlogical-op -Wold-style-cast -Wredundant-decls -Wno-sign-compare -isystem /usr/local/include -DPHYSFS_DEPRECATED= -DDXX_USE_SHAREPATH=1 -DNDEBUG -DRELEASE -D_REENTRANT -DDXX_BUILD_DESCENT_I -D__STDC_FORMAT_MACROS -Icommon/include -Icommon/main -I. -Ibuild -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/SDL2 -I/usr/local/include/webp -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/opus -Id1x-rebirth/main "similar/main/kmatrix.cpp" -o "build/similar/main/.d1x-rebirth.kmatrix.o"

If the issue needs time to be fixed, please consider introduce USE_GCC=12 as a temporary solution.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-03 11:15:46 UTC
^Triage: Assign to maintainer and ask for maintainer feedback (for some reason automation did not work).
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2024-02-03 11:32:50 UTC
Since the warning is in libc++ headers, please report it to libc++ developers.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-03 11:38:16 UTC
Thanks Piotr, I will set USE_GCC=12 while it waits for a fix then.

I had forgotten to add a link to the complete log, if you wanted to see it: https://pkg-status.freebsd.org/pb2/data/140i386-default-foo/2024-01-29_17h34m17s/logs/errors/dxx-rebirth-20231232.log
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-04 10:21:54 UTC
Created attachment 248172 [details]
Set USE_GCC=12

Would this patch work for you? Please note that USE_GCC=12 is enforced for ARCH=armv7 and ARCH=powerpc too, not only for ARCH=i386.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-02-20 15:19:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a60d2fdc8edcb44a3de4f40b4831ca6afdee765d

commit a60d2fdc8edcb44a3de4f40b4831ca6afdee765d
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2024-02-04 10:17:09 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2024-02-20 15:18:53 +0000

    games/dxx-rebirth: Set USE_GCC=12

    This allows the exp-run for GCC_DEFAULT=13 to get forward.

    PR:             276797
    Approved by:    maintainer timeout (> 2 weeks)

 games/dxx-rebirth/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 6 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-02-20 15:21:08 UTC
The patch has been commited, so I remove the block for the GCC 13 exp-run.