Packing man page znc.1.gz...
Packing man page znc-buildmod.1.gz...
Building module adminlog...
Linking module adminlog...
Building module alias...
Linking module alias...
Building module autoattach...
Linking module autoattach...
Building module autocycle...
Linking module autocycle...
Building module autoop...
Linking module autoop...
Building module autoreply...
Linking module autoreply...
Building module autovoice...
Linking module autovoice...
Building module awaynick...
Linking module awaynick...
Building module awaystore...
Linking module awaystore...
Building module block_motd...
Linking module block_motd...
Building module blockuser...
Linking module blockuser...
Building module bouncedcc...
Linking module bouncedcc...
Building module buffextras...
Linking module buffextras...
Building module cert...
Linking module cert...
Building module certauth...
Linking module certauth...
Building module chansaver...
Linking module chansaver...
Building module clearbufferonmsg...
Linking module clearbufferonmsg...
Building module clientnotify...
Linking module clientnotify...
Building module controlpanel...
Linking module controlpanel...
Building module crypt...
crypt.cpp: In member function ‘bool CCryptMod::DH1080_comp(CString&, CString&)’:
crypt.cpp:152:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Linking module crypt...
Building module ctcpflood...
Linking module ctcpflood...
Building module dcc...
Linking module dcc...
Building module fail2ban...
Linking module fail2ban...
Building module flooddetach...
Linking module flooddetach...
Building module identfile...
Linking module identfile...
Building module imapauth...
Linking module imapauth...
Building module keepnick...
Linking module keepnick...
Building module kickrejoin...
Linking module kickrejoin...
Building module lastseen...
Linking module lastseen...
Building module listsockets...
Linking module listsockets...
Building module log...
Linking module log...
Building module missingmotd...
Linking module missingmotd...
Building module modules_online...
Linking module modules_online...
Building module nickserv...
Linking module nickserv...
Building module notes...
Linking module notes...
Building module notify_connect...
Linking module notify_connect...
Building module partyline...
Linking module partyline...
Building module perform...
Linking module perform...
Building module q...
Linking module q...
Building module raw...
Linking module raw...
Building module route_replies...
Linking module route_replies...
Building module sample...
Linking module sample...
Building module samplewebapi...
Linking module samplewebapi...
Building module sasl...
Linking module sasl...
Building module savebuff...
Linking module savebuff...
Building module schat...
Linking module schat...
Building module send_raw...
Linking module send_raw...
Building module shell...
Linking module shell...
Building module simple_away...
Linking module simple_away...
Building module stickychan...
Linking module stickychan...
Building module stripcontrols...
Linking module stripcontrols...
Building module watch...
Linking module watch...
Building module webadmin...
Linking module webadmin...
Building core object main...
src/main.cpp: In member function ‘virtual bool CSignalHandler::CSignalHandlerMonitorFD::FDsThatTriggered(const std::map<int, short int>&)’:
src/main.cpp:188:25: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read(it.first, &sig, sizeof(sig));
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Building core object ZNCString...
Building core object Csocket...
Building core object znc...
Building core object IRCNetwork...
In file included from ./include/znc/Client.h:24:0,
from ./include/znc/znc.h:21,
from ./include/znc/IRCNetwork.h:24,
from src/IRCNetwork.cpp:17:
src/IRCNetwork.cpp: In member function ‘bool CIRCNetwork::JoinChan(CChan*)’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:990:9: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnTimerAutoJoin(*pChan), m_pUser, this, nullptr,
^~~~~~~~~~~~~~~~~
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:978:5: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnJoining(*pChan), m_pUser, this, nullptr, &bReturn);
^~~~~~~~~~~~~~~~~
src/IRCNetwork.cpp: In member function ‘void CIRCNetwork::ClientConnected(CClient*)’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:713:9: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnPrivBufferPlayMessage(Message), m_pUser, this,
^~~~~~~~~~~~~~~~~
src/IRCNetwork.cpp: In member function ‘bool CIRCNetwork::Connect()’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:1292:5: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnIRCConnecting(pIRCSock), m_pUser, this, nullptr,
^~~~~~~~~~~~~~~~~
Building core object User...
In file included from ./include/znc/Client.h:24:0,
from ./include/znc/znc.h:21,
from ./include/znc/IRCNetwork.h:24,
from src/User.cpp:20:
src/User.cpp: In member function ‘bool CUser::DeleteNetwork(const CString&)’:
./include/znc/main.h:85:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macUSER != nullptr) { \
^
./include/znc/main.h:126:5: note: in expansion of macro ‘_USERMODULECALL’
_USERMODULECALL(macFUNC, macUSER, nullptr, macCLIENT, macEXITER)
^~~~~~~~~~~~~~~
src/User.cpp:556:9: note: in expansion of macro ‘USERMODULECALL’
USERMODULECALL(OnDeleteNetwork(*pNetwork), this, nullptr, &bCancel);
^~~~~~~~~~~~~~
src/User.cpp: In member function ‘CIRCNetwork* CUser::AddNetwork(const CString&, CString&)’:
./include/znc/main.h:85:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macUSER != nullptr) { \
^
./include/znc/main.h:126:5: note: in expansion of macro ‘_USERMODULECALL’
_USERMODULECALL(macFUNC, macUSER, nullptr, macCLIENT, macEXITER)
^~~~~~~~~~~~~~~
src/User.cpp:524:5: note: in expansion of macro ‘USERMODULECALL’
USERMODULECALL(OnAddNetwork(*pNetwork, sErrorRet), this, nullptr, &bCancel);
^~~~~~~~~~~~~~
Building core object IRCSock...
src/IRCSock.cpp: In member function ‘bool CIRCSock::OnNumericMessage(CNumericMessage&)’:
src/IRCSock.cpp:917:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (m_pNetwork->GetIRCServer().Equals(sServer)) {
^~
src/IRCSock.cpp:920:9: note: here
case 372: // motd
^~~~
src/IRCSock.cpp:930:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (m_pNetwork->IsChan(Message.GetParam(1)) || sNick != "*") break;
^~
src/IRCSock.cpp:931:9: note: here
case 432:
^~~~
src/IRCSock.cpp:946:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (sNick.Equals("CAP")) return true;
^~
src/IRCSock.cpp:947:9: note: here
case 470: {
^~~~
Building core object Client...
Building core object Chan...
Building core object Nick...
Building core object Server...
Building core object Modules...
Building core object MD5...
Building core object Buffer...
Building core object Utils...
Building core object FileUtils...
Building core object HTTPSock...
Building core object Template...
Building core object ClientCommand...
Building core object Socket...
Building core object SHA256...
Building core object WebModules...
Building core object Listener...
Building core object Config...
Building core object ZNCDebug...
Building core object Threads...
Building source file version.cpp...
Building core object version...
Building core object Query...
Building core object SSLVerifyHost...
Building core object Message...
Building core object Translation...
Linking znc...
ZNC was successfully compiled.
Use 'make install' to install ZNC to '/usr/local'.
The following patch is necessary to make latest git master compile on current Archlinux with GCC 7.1.1:
```
diff --git a/include/znc/Client.h b/include/znc/Client.h
index 01239cf4..81cd317e 100644
--- a/include/znc/Client.h
+++ b/include/znc/Client.h
@@ -23,6 +23,7 @@
#include <znc/Message.h>
#include <znc/main.h>
#include <memory>
+#include <functional>
// Forward Declarations
class CZNC;
```
However still a lot of warnings remain:
```
Packing man page znc.1.gz...
Packing man page znc-buildmod.1.gz...
Building module adminlog...
Linking module adminlog...
Building module alias...
Linking module alias...
Building module autoattach...
Linking module autoattach...
Building module autocycle...
Linking module autocycle...
Building module autoop...
Linking module autoop...
Building module autoreply...
Linking module autoreply...
Building module autovoice...
Linking module autovoice...
Building module awaynick...
Linking module awaynick...
Building module awaystore...
Linking module awaystore...
Building module block_motd...
Linking module block_motd...
Building module blockuser...
Linking module blockuser...
Building module bouncedcc...
Linking module bouncedcc...
Building module buffextras...
Linking module buffextras...
Building module cert...
Linking module cert...
Building module certauth...
Linking module certauth...
Building module chansaver...
Linking module chansaver...
Building module clearbufferonmsg...
Linking module clearbufferonmsg...
Building module clientnotify...
Linking module clientnotify...
Building module controlpanel...
Linking module controlpanel...
Building module crypt...
crypt.cpp: In member function ‘bool CCryptMod::DH1080_comp(CString&, CString&)’:
crypt.cpp:152:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((len = DH_compute_key(key, bOtherPubKey, m_pDH.get())) == -1) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Linking module crypt...
Building module ctcpflood...
Linking module ctcpflood...
Building module dcc...
Linking module dcc...
Building module fail2ban...
Linking module fail2ban...
Building module flooddetach...
Linking module flooddetach...
Building module identfile...
Linking module identfile...
Building module imapauth...
Linking module imapauth...
Building module keepnick...
Linking module keepnick...
Building module kickrejoin...
Linking module kickrejoin...
Building module lastseen...
Linking module lastseen...
Building module listsockets...
Linking module listsockets...
Building module log...
Linking module log...
Building module missingmotd...
Linking module missingmotd...
Building module modules_online...
Linking module modules_online...
Building module nickserv...
Linking module nickserv...
Building module notes...
Linking module notes...
Building module notify_connect...
Linking module notify_connect...
Building module partyline...
Linking module partyline...
Building module perform...
Linking module perform...
Building module q...
Linking module q...
Building module raw...
Linking module raw...
Building module route_replies...
Linking module route_replies...
Building module sample...
Linking module sample...
Building module samplewebapi...
Linking module samplewebapi...
Building module sasl...
Linking module sasl...
Building module savebuff...
Linking module savebuff...
Building module schat...
Linking module schat...
Building module send_raw...
Linking module send_raw...
Building module shell...
Linking module shell...
Building module simple_away...
Linking module simple_away...
Building module stickychan...
Linking module stickychan...
Building module stripcontrols...
Linking module stripcontrols...
Building module watch...
Linking module watch...
Building module webadmin...
Linking module webadmin...
Building core object main...
src/main.cpp: In member function ‘virtual bool CSignalHandler::CSignalHandlerMonitorFD::FDsThatTriggered(const std::map<int, short int>&)’:
src/main.cpp:188:25: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read(it.first, &sig, sizeof(sig));
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Building core object ZNCString...
Building core object Csocket...
Building core object znc...
Building core object IRCNetwork...
In file included from ./include/znc/Client.h:24:0,
from ./include/znc/znc.h:21,
from ./include/znc/IRCNetwork.h:24,
from src/IRCNetwork.cpp:17:
src/IRCNetwork.cpp: In member function ‘bool CIRCNetwork::JoinChan(CChan*)’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:990:9: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnTimerAutoJoin(*pChan), m_pUser, this, nullptr,
^~~~~~~~~~~~~~~~~
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:978:5: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnJoining(*pChan), m_pUser, this, nullptr, &bReturn);
^~~~~~~~~~~~~~~~~
src/IRCNetwork.cpp: In member function ‘void CIRCNetwork::ClientConnected(CClient*)’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:713:9: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnPrivBufferPlayMessage(Message), m_pUser, this,
^~~~~~~~~~~~~~~~~
src/IRCNetwork.cpp: In member function ‘bool CIRCNetwork::Connect()’:
./include/znc/main.h:110:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macNETWORK != nullptr) { \
^
src/IRCNetwork.cpp:1292:5: note: in expansion of macro ‘NETWORKMODULECALL’
NETWORKMODULECALL(OnIRCConnecting(pIRCSock), m_pUser, this, nullptr,
^~~~~~~~~~~~~~~~~
Building core object User...
In file included from ./include/znc/Client.h:24:0,
from ./include/znc/znc.h:21,
from ./include/znc/IRCNetwork.h:24,
from src/User.cpp:20:
src/User.cpp: In member function ‘bool CUser::DeleteNetwork(const CString&)’:
./include/znc/main.h:85:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macUSER != nullptr) { \
^
./include/znc/main.h:126:5: note: in expansion of macro ‘_USERMODULECALL’
_USERMODULECALL(macFUNC, macUSER, nullptr, macCLIENT, macEXITER)
^~~~~~~~~~~~~~~
src/User.cpp:556:9: note: in expansion of macro ‘USERMODULECALL’
USERMODULECALL(OnDeleteNetwork(*pNetwork), this, nullptr, &bCancel);
^~~~~~~~~~~~~~
src/User.cpp: In member function ‘CIRCNetwork* CUser::AddNetwork(const CString&, CString&)’:
./include/znc/main.h:85:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
if (macUSER != nullptr) { \
^
./include/znc/main.h:126:5: note: in expansion of macro ‘_USERMODULECALL’
_USERMODULECALL(macFUNC, macUSER, nullptr, macCLIENT, macEXITER)
^~~~~~~~~~~~~~~
src/User.cpp:524:5: note: in expansion of macro ‘USERMODULECALL’
USERMODULECALL(OnAddNetwork(*pNetwork, sErrorRet), this, nullptr, &bCancel);
^~~~~~~~~~~~~~
Building core object IRCSock...
src/IRCSock.cpp: In member function ‘bool CIRCSock::OnNumericMessage(CNumericMessage&)’:
src/IRCSock.cpp:917:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (m_pNetwork->GetIRCServer().Equals(sServer)) {
^~
src/IRCSock.cpp:920:9: note: here
case 372: // motd
^~~~
src/IRCSock.cpp:930:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (m_pNetwork->IsChan(Message.GetParam(1)) || sNick != "*") break;
^~
src/IRCSock.cpp:931:9: note: here
case 432:
^~~~
src/IRCSock.cpp:946:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (sNick.Equals("CAP")) return true;
^~
src/IRCSock.cpp:947:9: note: here
case 470: {
^~~~
Building core object Client...
Building core object Chan...
Building core object Nick...
Building core object Server...
Building core object Modules...
Building core object MD5...
Building core object Buffer...
Building core object Utils...
Building core object FileUtils...
Building core object HTTPSock...
Building core object Template...
Building core object ClientCommand...
Building core object Socket...
Building core object SHA256...
Building core object WebModules...
Building core object Listener...
Building core object Config...
Building core object ZNCDebug...
Building core object Threads...
Building source file version.cpp...
Building core object version...
Building core object Query...
Building core object SSLVerifyHost...
Building core object Message...
Building core object Translation...
Linking znc...
ZNC was successfully compiled.
Use 'make install' to install ZNC to '/usr/local'.
```
<!-- github-sync-id:237982249 -->
@bjoe2k4 thanks for showing all these warnings and the patch, but what was the error which was preventing ZNC from compile? What caused you to write this patch?
@bjoe2k4 thanks for showing all these warnings and the patch, but what was the error which was preventing ZNC from compile? What caused you to write this patch?
<!-- github-comment-id:310516014 -->
$ make
Packing man page znc.1.gz...
Packing man page znc-buildmod.1.gz...
Building module adminlog...
In file included from ./../include/znc/znc.h:21:0,
from ./../include/znc/IRCNetwork.h:24,
from adminlog.cpp:19:
./../include/znc/Client.h:359:44: error: ‘function’ is not a member of ‘std’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
./../include/znc/Client.h:359:44: note: suggested alternative: ‘is_function’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
is_function
./../include/znc/Client.h:359:44: error: ‘function’ is not a member of ‘std’
./../include/znc/Client.h:359:44: note: suggested alternative: ‘is_function’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
is_function
./../include/znc/Client.h:359:68: error: template argument 2 is invalid
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~
./../include/znc/Client.h:359:70: error: template argument 2 is invalid
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^
./../include/znc/Client.h:359:70: error: template argument 4 is invalid
In file included from ./../include/znc/znc.h:21:0,
from ./../include/znc/IRCNetwork.h:24,
from adminlog.cpp:19:
./../include/znc/Client.h: In constructor ‘CClient::CClient()’:
./../include/znc/Client.h:152:12: warning: list-initializer for non-class type must not be parenthesized
}) {
^
./../include/znc/Client.h:152:12: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in initialization
./../include/znc/Client.h:159:74: error: assignment of read-only location ‘"znc.in/server-time-iso"[((CClient*)this)->CClient::m_mCoreCaps]’
m_mCoreCaps["znc.in/server-time-iso"] = m_mCoreCaps["server-time"];
^
./../include/znc/Client.h:160:58: error: assignment of read-only location ‘"znc.in/batch"[((CClient*)this)->CClient::m_mCoreCaps]’
m_mCoreCaps["znc.in/batch"] = m_mCoreCaps["batch"];
^
./../include/znc/Client.h:162:64: error: assignment of read-only location ‘"znc.in/self-message"[((CClient*)this)->CClient::m_mCoreCaps]’
false, [this](bool bVal) { m_bSelfMessage = bVal; }};
^
./../include/znc/Client.h:162:64: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘const char’ in assignment
make[1]: *** [Makefile:133: adminlog.o] Error 1
make: *** [Makefile:121: modules] Error 2
Oh, sorry. The reason is explained here: https://gcc.gnu.org/gcc-7/porting_to.html#header-dep-changes
And the original errors are as follows:
```
$ make
Packing man page znc.1.gz...
Packing man page znc-buildmod.1.gz...
Building module adminlog...
In file included from ./../include/znc/znc.h:21:0,
from ./../include/znc/IRCNetwork.h:24,
from adminlog.cpp:19:
./../include/znc/Client.h:359:44: error: ‘function’ is not a member of ‘std’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
./../include/znc/Client.h:359:44: note: suggested alternative: ‘is_function’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
is_function
./../include/znc/Client.h:359:44: error: ‘function’ is not a member of ‘std’
./../include/znc/Client.h:359:44: note: suggested alternative: ‘is_function’
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~~~~~~~
is_function
./../include/znc/Client.h:359:68: error: template argument 2 is invalid
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^~
./../include/znc/Client.h:359:70: error: template argument 2 is invalid
std::map<CString, std::pair<bool, std::function<void(bool bVal)>>>
^
./../include/znc/Client.h:359:70: error: template argument 4 is invalid
In file included from ./../include/znc/znc.h:21:0,
from ./../include/znc/IRCNetwork.h:24,
from adminlog.cpp:19:
./../include/znc/Client.h: In constructor ‘CClient::CClient()’:
./../include/znc/Client.h:152:12: warning: list-initializer for non-class type must not be parenthesized
}) {
^
./../include/znc/Client.h:152:12: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in initialization
./../include/znc/Client.h:159:74: error: assignment of read-only location ‘"znc.in/server-time-iso"[((CClient*)this)->CClient::m_mCoreCaps]’
m_mCoreCaps["znc.in/server-time-iso"] = m_mCoreCaps["server-time"];
^
./../include/znc/Client.h:160:58: error: assignment of read-only location ‘"znc.in/batch"[((CClient*)this)->CClient::m_mCoreCaps]’
m_mCoreCaps["znc.in/batch"] = m_mCoreCaps["batch"];
^
./../include/znc/Client.h:162:64: error: assignment of read-only location ‘"znc.in/self-message"[((CClient*)this)->CClient::m_mCoreCaps]’
false, [this](bool bVal) { m_bSelfMessage = bVal; }};
^
./../include/znc/Client.h:162:64: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘const char’ in assignment
make[1]: *** [Makefile:133: adminlog.o] Error 1
make: *** [Makefile:121: modules] Error 2
```
<!-- github-comment-id:310517190 -->
adam
changed title from znc does not compile with GCC7 to znc does not compile with GCC7 2026-10-27 15:13:43 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The following patch is necessary to make latest git master compile on current Archlinux with GCC 7.1.1:
However still a lot of warnings remain:
@bjoe2k4 thanks for showing all these warnings and the patch, but what was the error which was preventing ZNC from compile? What caused you to write this patch?
Oh, sorry. The reason is explained here: https://gcc.gnu.org/gcc-7/porting_to.html#header-dep-changes
And the original errors are as follows:
znc does not compile with GCC7to znc does not compile with GCC7