seven_zip_ruby icon indicating copy to clipboard operation
seven_zip_ruby copied to clipboard

7z.so fails to compile with gcc 11.x

Open maxirmx opened this issue 3 years ago • 0 comments

../../Archive/NtfsHandler.cpp: In member function 'LONG
NArchive::Ntfs::CDatabase::Open()':
../../Archive/NtfsHandler.cpp:1283:71: error: cannot convert 'std::nullptr_t' to
'UInt32' {aka 'unsigned int'}
1283 |     if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec,
NULL, 0))
|                                                                      
^~~~
      |                                                                       |
|                                                                      
std::nullptr_t
../../Archive/NtfsHandler.cpp:1069:75: note:   initializing argument 4 of 'bool
NArchive::Ntfs::CMftRec::Parse(Byte*, int, UInt32, UInt32,
CObjectVector<NArchive::Ntfs::CAttr>*)'
1069 | bool CMftRec::Parse(Byte *p, int sectorSizeLog, UInt32 numSectors,
UInt32 recNumber,
|                                                                   
~~~~~~~^~~~~~~~~
make[5]: *** [../../../../makefile.rules:359: NtfsHandler.o] Error 1
make[4]: *** [makefile:74: 7zso] Error 2

I believe this happens because gcc 11.x GCC 11 default to ISO C++17 for its C++ front-end while earlier versions default to GNU C++ 14

maxirmx avatar Jun 06 '22 16:06 maxirmx