Bug 266190 - devel/raknet: Fails to build with GCC 12: FAILED: Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o
Summary: devel/raknet: Fails to build with GCC 12: FAILED: Lib/DLL/CMakeFiles/RakNetDy...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ganael LAPLANCHE
URL: http://package18.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks: 265948
  Show dependency treegraph
 
Reported: 2022-09-03 09:11 UTC by Lorenzo Salvadore
Modified: 2022-09-08 10:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (martymac)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-03 09:11:06 UTC
Updating GCC_DEFAULT from GCC 11 to GCC 12 is blocked by the fact that building this port with GCC 12 on i386 and amd64 fails.

The error message is the following:



[  8% 20/234] /usr/local/bin/g++12 -DRakNetDynamic_EXPORTS -I/wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12 
 -Wl,-rpath=/usr/local/lib/gcc12 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12  -Wl,-rpath=/usr/local/lib/gcc12 -fPIC -MD -MT Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/
Source/UDPForwarder.cpp.o -MF Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o.d -o Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o -c '/wrkdirs/usr/p
orts/devel/raknet/work/raknet-3.9.2_10,1/Source/UDPForwarder.cpp'                                                                                                                              
FAILED: Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o                                                                                                                   
/usr/local/bin/g++12 -DRakNetDynamic_EXPORTS -I/wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12  -Wl,-rpath=/u
sr/local/lib/gcc12 -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12  -Wl,-rpath=/usr/local/lib/gcc12 -fPIC -MD -MT Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForw
arder.cpp.o -MF Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o.d -o Lib/DLL/CMakeFiles/RakNetDynamic.dir/__/__/Source/UDPForwarder.cpp.o -c '/wrkdirs/usr/ports/devel/rak
net/work/raknet-3.9.2_10,1/Source/UDPForwarder.cpp'                                            
In file included from /wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source/UDPForwarder.h:13,                                                                                         
                 from /wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source/UDPForwarder.cpp:1:                                                                                        
/wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source/DS_Multilist.h: In instantiation of '_IndexType DataStructures::Multilist<_MultilistType, _DataType, _KeyType, _IndexType>::GetIn
dexOf(_KeyType) const [with MultilistType _MultilistType = ML_ORDERED_LIST; _DataType = RakNet::UDPForwarder::ForwardEntry*; _KeyType = RakNet::UDPForwarder::SrcAndDest; _IndexType = unsigned
 int]':                                                                                                                                                                                        
/wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source/UDPForwarder.cpp:204:34:   required from here                                                                                    
/wrkdirs/usr/ports/devel/raknet/work/raknet-3.9.2_10,1/Source/DS_Multilist.h:683:60: error: no match for 'operator==' (operand types are 'DataStructures::MLKeyRef<RakNet::UDPForwarder::SrcAnd
Dest>' and 'RakNet::UDPForwarder::ForwardEntry*')                                              
  683 |                                 if (MLKeyRef<_KeyType>(key)==data[i])                                                                                                                  
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ 





Please see also the log in the URL field. This URL might be useful to solve the issue: http://gcc.gnu.org/gcc-12/porting_to.html .
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-09-08 10:43:05 UTC
A commit in branch main references this bug:

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

commit 90030e73f1a76b6d33c68938daa529256313be3b
Author:     Ganael LAPLANCHE <martymac@FreeBSD.org>
AuthorDate: 2022-09-08 10:38:55 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2022-09-08 10:42:22 +0000

    devel/raknet: force use of gcc 11

    Raknet does not build with gcc 12 because of missing c++ operators,
    this prevents GCC_DEFAULT bump to 12.

    As that port is old and un-maintained upstream, just force gcc 11 for
    now.

    PR:             266190
    Reported by:    salvadore

 devel/raknet/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 2 Ganael LAPLANCHE freebsd_committer freebsd_triage 2022-09-08 10:44:48 UTC
Hello Lorenzo,

Thanks for reporting that issue!

Raknet is no more maintained and has been archived upstream, see:

  https://github.com/facebookarchive/RakNet

This port is old and probably nearly useless by now.

I have forced GCC to version 11 but we probably want to deprecate it sometime soon or at least when it becomes un-maintainable.

Best regards,

Ganael.