pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/57710: archivers/unrar doesn't build under Darwin/Sonoma (w/patch)
>Number: 57710
>Category: pkg
>Synopsis: Fails to build without explicit compiler flag.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Nov 20 01:30:01 +0000 2023
>Originator: System Administrator
>Release: Darwin 23.1.0
>Organization:
Menelos LLC
>Environment:
System: Darwin pkgbuild-x86.home.menelos.com 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64
>Description:
Building fails without explicit compiler flag "-std=c++11" despite "USE_CXX_FEATURES= c++11" in Makefile.common. Generates lots of warnings about use of C++11 extensions and generates numerous errors.
- - - - - - - - -
===> Building for unrar-7.0.3
clang++ -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DUNRAR -c rar.cpp
clang++ -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DUNRAR -c strlist.cpp
clang++ -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DUNRAR -c strfn.cpp
clang++ -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DUNRAR -c pathfn.cpp
clang++ -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DUNRAR -c smallfn.cpp
In file included from In file included from strlist.cpp:1:
In file included from ./rar.hpp:18:
./secpassword.hpp:11:33: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
std::vector<wchar> Password = std::vector<wchar>(MAXPASSWORD);
^
smallfn.cpp:1:
In file included from ./rar.hpp:18:
./secpassword.hpp:11:33: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
std::vector<wchar> Password = std::vector<wchar>(MAXPASSWORD);
^
In file included from pathfn.cpp:1:
In file included from ./rar.hpp:18:
./secpassword.hpp:11:33: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
std::vector<wchar> Password = std::vector<wchar>(MAXPASSWORD);
^
In file included from rar.cpp:1:
In file included from ./rar.hpp:18:
./secpassword.hpp:11:33: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
std::vector<wchar> Password = std::vector<wchar>(MAXPASSWORD);
^
In file included from strfn.cpp:1:
In file included from ./rar.hpp:18:
./secpassword.hpp:11:33: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
std::vector<wchar> Password = std::vector<wchar>(MAXPASSWORD);
^
In file included from pathfn.cpp:1:
In file included from ./rar.hpp:23:
./blake2s.hpp:26:10: In file included from error: strlist.cpp:1:
In file included from ./rar.hpp:23:
./blake2s.hpp:26:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
unknown type name 'constexpr'
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
./blake2s.hpp:26:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
;
In file included from rar.cpp:1:
In file included from ./rar.hpp:23:
./blake2s.hpp:26:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
./blake2s.hpp:26:26:./blake2s.hpp:26:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
;
error: expected ';' at end of declaration list
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
;
In file included from smallfn.cpp:1:
In file included from ./rar.hpp:23:
./blake2s.hpp:26:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
./blake2s.hpp:26:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
;
./blake2s.hpp:31:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
./blake2s.hpp:31:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
;
./blake2s.hpp:31:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
./blake2s.hpp:31:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
;
./blake2s.hpp:31:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
./blake2s.hpp:31:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
;
./blake2s.hpp:31:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
./blake2s.hpp:31:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
;
In file included from strfn.cpp:1:
In file included from ./rar.hpp:23:
./blake2s.hpp:26:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
./blake2s.hpp:26:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_ALIGNMENT = 64;
^
;
./blake2s.hpp:31:10: error: unknown type name 'constexpr'
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
./blake2s.hpp:31:26: error: expected ';' at end of declaration list
static constexpr size_t BLAKE_DATA_SIZE = 48 + 2 * BLAKE2S_BLOCKBYTES;
^
;
./blake2s.hpp:33:13: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:31: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:13: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:31: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:13: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:31: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:38:3: error: unknown type name 'size_t'
size_t buflen;
^
./blake2s.hpp:33:13: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:31: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp./blake2s.hpp:38:3: error: unknown type name 'size_t'
size_t buflen;
^
:38:3: error: unknown type name 'size_t'
size_t buflen;
^
./blake2s.hpp:./blake2s.hpp:58:38: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
buf = (byte *) ALIGN_VALUE(ubuf, BLAKE_ALIGNMENT);
^
38:3: error: unknown type name 'size_t'
size_t buflen;
^
./blake2s.hpp:33:13: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:33:31: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
byte ubuf[BLAKE_DATA_SIZE + BLAKE_ALIGNMENT];
^
./blake2s.hpp:./blake2s.hpp:38:3: error: unknown type name 'size_t'
size_t buflen;
^./blake2s.hpp:58:38: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
buf = (byte *) ALIGN_VALUE(ubuf, BLAKE_ALIGNMENT);
^
./blake2s.hpp:58:38: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
buf = (byte *) ALIGN_VALUE(ubuf, BLAKE_ALIGNMENT);
^
76:./blake2s.hpp:58:3827: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
buf = (byte *) ALIGN_VALUE(ubuf, BLAKE_ALIGNMENT);
^
: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
memcpy(buf, st.buf, BLAKE_DATA_SIZE);
^
./blake2s.hpp:76:27: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
memcpy(buf, st.buf, BLAKE_DATA_SIZE);
^
./blake2s.hpp:76:27: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
memcpy(buf, st.buf, BLAKE_DATA_SIZE);
^
./blake2s.hpp:76:27: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
memcpy(buf, st.buf, BLAKE_DATA_SIZE);
^
./blake2s.hpp:58:38: error: use of undeclared identifier 'BLAKE_ALIGNMENT'
buf = (byte *) ALIGN_VALUE(ubuf, BLAKE_ALIGNMENT);
^
./blake2s.hpp:76:27: error: use of undeclared identifier 'BLAKE_DATA_SIZE'
memcpy(buf, st.buf, BLAKE_DATA_SIZE);
^
In file included from strlist.cpp:1:
In file included from ./rar.hpp:40:
./scantree.hpp:19:12: error: unknown type name 'constexpr'
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
./scantree.hpp:19:28: error: expected ';' at end of declaration list
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
;
In file included from In file included from smallfn.cpp:1:
In file included from ./rar.hpp:40:
./scantree.hpp:19:12: error: unknown type name 'constexpr'
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
rar.cpp:1:
In file included from ./rar.hpp:40:
./scantree.hpp:19:12: error: unknown type name 'constexpr'
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
./scantree.hpp:19:28: error: expected ';' at end of declaration list
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
;
./scantree.hpp:19:28: error: expected ';' at end of declaration list
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
;
In file included from pathfn.cpp:1:
In file included from ./rar.hpp:40:
./scantree.hpp:19:12: error: unknown type name 'constexpr'
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
./scantree.hpp:19:28: error: expected ';' at end of declaration list
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
;
./scantree.hpp:59:5: error: unknown type name 'size_t'
size_t SpecPathLength;
^
./scantree.hpp:59:5: error: unknown type name 'size_t'
size_t SpecPathLength;
^
In file included from strfn.cpp:1:
In file included from ./rar.hpp:40:
./scantree.hpp:19:12: error: unknown type name 'constexpr'
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
./scantree.hpp:19:28: error: expected ';' at end of declaration list
static constexpr size_t MAXSCANDEPTH = MAXPATHSIZE/2;
^
;
./scantree.hpp:59:5: error: unknown type name 'size_t'
size_t SpecPathLength;
^
./scantree.hpp:59:5: error: unknown type name 'size_t'
size_t SpecPathLength;
^
./scantree.hpp:68:5: error: unknown type name 'size_t'
size_t GetSpecPathLength() {return SpecPathLength;}
^
./scantree.hppIn file included from strlist.cpp:1:
In file included from ./rar.hpp:46:
./archive.hpp:92:60: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
bool Open(const std::wstring &Name,uint Mode=FMF_READ) override;
^
./archive.hpp:93:38: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int Read(void *Data,size_t Size) override;
^
./archive.hpp:94:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
void Seek(int64 Offset,int Method) override;
^
./archive.hpp:95:18: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int64 Tell() override;
^
:68:5: error: unknown type name 'size_t'
size_t GetSpecPathLength() {return SpecPathLength;}
^
./scantree.hpp:68:5: error: unknown type name 'size_t'
size_t GetSpecPathLength() {return SpecPathLength;}
^
./scantree.hpp:68:5: error: unknown type name 'size_t'
size_t GetSpecPathLength() {return SpecPathLength;}
^
In file included from smallfn.cpp:1:
In file included from ./rar.hpp:46:
./archive.hpp:92:60: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
bool Open(const std::wstring &Name,uint Mode=FMF_READ) override;
^
./archive.hpp:93:38: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int Read(void *Data,size_t Size) override;
^
./archive.hpp:94:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
void Seek(int64 Offset,int Method) override;
^
./archive.hpp:95:18: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int64 Tell() override;
^
./scantree.hpp:59:5: error: unknown type name 'size_t'
size_t SpecPathLength;
^
In file included from rar.cpp:1:
In file included from ./rar.hpp:46:
./archive.hpp:92:60: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
bool Open(const std::wstring &Name,uint Mode=FMF_READ) override;
^
./archive.hpp:93:38: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int Read(void *Data,size_t Size) override;
^
./archive.hpp:94:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
void Seek(int64 Offset,int Method) override;
^
./archive.hpp:95:18: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int64 Tell() override;
^
In file included from pathfn.cpp:1:
In file included from ./rar.hpp:46:
./archive.hpp:92:60: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
./scantree.hpp:68 bool Open(const std::wstring &Name,uint Mode=FMF_READ) override;:
5: ^
error: unknown type name 'size_t'
size_t GetSpecPathLength() {return SpecPathLength;}
^
./archive.hpp:93:38: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int Read(void *Data,size_t Size) override;
^
./archive.hpp:94:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
void Seek(int64 Offset,int Method) override;
^
./archive.hpp:95:18: warning: 'override' keyword In file included from strlist.cpp:1:
In file included from ./rar.hpp:49:
./ui.hpp:164:24: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:67: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)is a C++11 extension [-Wc++11-extensions]
int64 Tell() override;
^
In file included from smallfn.cpp:1:
In file included from ./rar.hpp:49:
./ui.hpp:164:24: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:67: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:75: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:180:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
./ui.hpp:180:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
^
./ui.hpp:164:75: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
In file included from strfn.cpp:1:
In file included from ./rar.hpp:46:
./archive.hpp:92:60: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
bool Open(const std::wstring &Name,uint Mode=FMF_READ) override;
^
./archive.hpp:93:38: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int Read(void *Data,size_t Size) override;
^
./archive.hpp:94:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
void Seek(int64 Offset,int Method) override;
^
./archive.hpp:95:18: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
int64 Tell() override;
^
./ui.hpp:180:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
./ui.hpp:180:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
In file included from rar.cpp:1:
In file included from ./rar.hpp:49:
./ui.hpp:164:24: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:67: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
In file included from pathfn.cpp:1:
In file included from ./rar.hpp:49:
./ui.hpp:164:24: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:67: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:75: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:180:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
./ui.hpp:180:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
^
./ui.hpp:164:75: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:180:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
./ui.hpp:180:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
In file included from strfn.cpp:1:
In file included from ./rar.hpp:49:
./ui.hpp:164:24: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:67: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:164:75: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class T1,class... TN> void uiMsgBase(uiMsgStore &Store,T1&& a1,TN&&... aN)
^
./ui.hpp:180:15: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
./ui.hpp:180:56: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template<class... TN> void uiMsg(UIMESSAGE_CODE Code,TN&&... aN)
^
pathfn.cpp:93:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto Pos=GetNamePos(FullName);
^
pathfn.cpp:100:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto DotPos=GetExtPos(Name);
^
pathfn.cpp:110:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto DotPos=GetExtPos(Name);
^
pathfn.cpp:139:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto ExtPos=GetExtPos(Name);
^
pathfn.cpp:150:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto NamePos=GetNamePos(Name);
^
pathfn.cpp:151:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto DotPos=Name.rfind('.');
^
strfn.cpp:231:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (char Ch : Str)
^
strfn.cpp:243:17: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (wchar Ch : Str)
^
pathfn.cpp:251:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto NamePos=GetNamePos(Path);
^
pathfn.cpp:408:7: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto DotPos=ArcName.find('.',NamePos);
^
pathfn.cpp:421:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto DotPos=GetExtPos(ArcName);
^
pathfn.cpp:464:7: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto NumPos=ArcName.size()-1; // Set to last character.
^
pathfn.cpp:723:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto VerPos=Name.rfind(';');
^
pathfn.cpp:853:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto ExtPos=GetExtPos(ArcName);
^
pathfn.cpp:867:5: warning: add explicit braces to avoid dangling else [-Wdangling-else]
else
^
pathfn.cpp:889:45: error: expected ';' at end of declaration
int CField[sizeof(Field)/sizeof(Field[0])]{};
^
;
10 warnings and 13 errors generated.
10 warnings and 13 errors generated.
gmake: *** [makefile:31: smallfn.o] Error 1
gmake: *** Waiting for unfinished jobs....
gmake: *** [makefile:31: rar.o] Error 1
12 warnings and 13 errors generated.
10 warnings and 13 errors generated.
gmake: *** [makefile:31: strlist.o] Error 1
gmake: *** [makefile:31: strfn.o] Error 1
23 warnings and 14 errors generated.
gmake: *** [makefile:31: pathfn.o] Error 1
*** Error code 2
Stop.
bmake[1]: stopped in /opt/pkgsrc-current/archivers/unrar
*** Error code 1
Stop.
bmake: stopped in /opt/pkgsrc-current/archivers/unrar
- - - - - - - - -
There were also some warnings about sprintf being deprecated, so patched to use snprintf. I have submitted a patch to the stock source's makefile to the unrar developers.
>How-To-Repeat:
Build under Darwin and Xcode 15.
>Fix:
When building outside of pkgsrc I modified 'makefile' in the unrar source tree to include the '-std=c++11' flag, but that change doesn't work with the pkgsrc framework, so ended up patching the packages's Makefile to patss the '-std=c++11' compiler flag. Not sure this is the correct fix but it works.
I used the following patch to correct some of these issues so that the errors are resolved.
diff -ruN unrar.orig/Makefile.common unrar/Makefile.common
--- unrar.orig/Makefile.common 2023-11-12 09:10:54
+++ unrar/Makefile.common 2023-11-19 18:50:39
@@ -28,7 +28,7 @@
MAKE_FLAGS+= CXX=${CXX:Q} CXXFLAGS=${CXXFLAGS:Q} LDFLAGS=${LDFLAGS:Q}
# usually set in Makefile, but overridden by line above
LDFLAGS+= -pthread
-CXXFLAGS+= -fPIC
+CXXFLAGS+= -fPIC -std=c++11
WRKSRC= ${WRKDIR}/unrar
diff -ruN unrar.orig/distinfo unrar/distinfo
--- unrar.orig/distinfo 2023-11-12 09:10:54
+++ unrar/distinfo 2023-11-19 18:57:03
@@ -3,3 +3,4 @@
BLAKE2s (unrarsrc-7.0.3.tar.gz) = 5e588faf09a41fb7a2c1d89ae5d8771a9e6af238a44664b8dd82a358bd59ea64
SHA512 (unrarsrc-7.0.3.tar.gz) = 2c72f37b36c4a2eba6a37cab10385c465337e75d09a9afafae463e1c7732bdd4c655de34b787ba301f7343790783861b657c1e03cd6f5589a9de7cfc466de752
Size (unrarsrc-7.0.3.tar.gz) = 254990 bytes
+SHA1 (patch-pathfn.cpp) = c2ecd25cc2ccd2505446060f9bc50adf3d0d4a80
diff -ruN unrar.orig/patches/patch-pathfn.cpp unrar/patches/patch-pathfn.cpp
--- unrar.orig/patches/patch-pathfn.cpp 1969-12-31 18:00:00
+++ unrar/patches/patch-pathfn.cpp 2023-11-19 18:12:50
@@ -0,0 +1,29 @@
+--- pathfn.cpp.orig 2023-11-08 11:14:14
++++ pathfn.cpp 2023-11-19 17:59:06
+@@ -872,16 +872,16 @@
+
+ char Field[10][11];
+
+- sprintf(Field[0],"%04u",rlt.Year);
+- sprintf(Field[1],"%02u",rlt.Month);
+- sprintf(Field[2],"%02u",rlt.Day);
+- sprintf(Field[3],"%02u",rlt.Hour);
+- sprintf(Field[4],"%02u",rlt.Minute);
+- sprintf(Field[5],"%02u",rlt.Second);
+- sprintf(Field[6],"%02u",(uint)CurWeek);
+- sprintf(Field[7],"%u",(uint)WeekDay+1);
+- sprintf(Field[8],"%03u",rlt.yDay+1);
+- sprintf(Field[9],"%05u",ArcNumber);
++ snprintf(Field[0],5,"%04u",rlt.Year);
++ snprintf(Field[1],3,"%02u",rlt.Month);
++ snprintf(Field[2],3,"%02u",rlt.Day);
++ snprintf(Field[3],3,"%02u",rlt.Hour);
++ snprintf(Field[4],3,"%02u",rlt.Minute);
++ snprintf(Field[5],3,"%02u",rlt.Second);
++ snprintf(Field[6],3,"%02u",(uint)CurWeek);
++ snprintf(Field[7],2,"%u",(uint)WeekDay+1);
++ snprintf(Field[8],4,"%03u",rlt.yDay+1);
++ snprintf(Field[9],6,"%05u",ArcNumber);
+
+ const wchar *MaskChars=L"YMDHISWAEN";
+
Home |
Main Index |
Thread Index |
Old Index