Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

cant build #16

Closed
mrhanky17 opened this Issue · 12 comments

4 participants

@mrhanky17

Using znc-buildmod from version 1.0-rc1. yesterday i was able to build, today after a reinstall i'm not. First it complained about not finden znc.h, i prepended znc/ in front of all included files (except time.h).
But when i try to build i get this, with the push.cpp file from master or ipv6:

/usr/local/bin/znc-buildmod push.cpp

Building "push.so" for ZNC 1.0-rc1... push.cpp:85:3: error: ‘map’ does not name a type
push.cpp:88:3: error: ‘map’ does not name a type
push.cpp:91:3: error: ‘map’ does not name a type
push.cpp: In member function ‘void CPushMod::send_message(const CString&, const CString&, const CString&, const CNick&)’:
push.cpp:193:4: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::away_only()’:
push.cpp:497:3: error: expected ‘;’ before ‘}’ token
push.cpp: In member function ‘unsigned int CPushMod::client_count()’:
push.cpp:506:17: error: ‘class CUser’ has no member named ‘GetClients’
push.cpp: In member function ‘bool CPushMod::highlight(const CString&)’:
push.cpp:557:23: error: ‘class CUser’ has no member named ‘GetIRCNick’
push.cpp:559:40: error: ‘string’ has not been declared
push.cpp: In member function ‘bool CPushMod::last_active(const CString&)’:
push.cpp:591:8: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::last_notification(const CString&)’:
push.cpp:606:8: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘bool CPushMod::replied(const CString&)’:
push.cpp:644:8: error: ‘last_notification_time’ was not declared in this scope
push.cpp:645:42: error: ‘last_reply_time’ was not declared in this scope
push.cpp: In member function ‘virtual CModule::EModRet CPushMod::OnUserMsg(CString&, CString&)’:
push.cpp:821:4: error: ‘last_reply_time’ was not declared in this scope
push.cpp:821:30: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘virtual CModule::EModRet CPushMod::OnUserAction(CString&, CString&)’:
push.cpp:833:4: error: ‘last_reply_time’ was not declared in this scope
push.cpp:833:30: error: ‘last_active_time’ was not declared in this scope
push.cpp: In member function ‘virtual void CPushMod::OnModCommand(const CString&)’:
push.cpp:1201:10: error: ‘last_active_time’ was not declared in this scope
push.cpp:1214:10: error: ‘last_notification_time’ was not declared in this scope
push.cpp: In member function ‘unsigned int CPushMod::client_count()’:
push.cpp:507:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::replied(const CString&)’:
push.cpp:646:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::last_active(const CString&)’:
push.cpp:593:3: warning: control reaches end of non-void function [-Wreturn-type]
push.cpp: In member function ‘bool CPushMod::last_notification(const CString&)’:
push.cpp:608:3: warning: control reaches end of non-void function [-Wreturn-type]
[ !! ] Error while building "push.so"

@jreese
Owner

If you haven't already, try checking out the "future" branch and building from there.

@mrhanky17

Building future-branch works, but it's missing support for pushover :(
I took two if-blocks related to pushover from ipv6-branch and recompiled it. When I try to set service to pushover iit says "unknown service name". Any davice?

@jreese
Owner

I'll try to merge Pushover support into the future branch today, and let you know when that's completed.

@jreese
Owner

future branch has been updated and tested with features from master.

@mrhanky17

Works fine, thanks, great module. :)

@mrhanky17 mrhanky17 closed this
@rctgamer3

The future branch no longer exists.
What am i doing wrong? Running buildmod results in:

Building "push.so" for ZNC 1.4... In file included from push.cpp:17:
/home/rctgamer3/znc/include/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateRawBuffer(const CString&, const CString&, const CString&)':
/home/rctgamer3/znc/include/znc/IRCNetwork.h:125: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/usr/local/include/znc/Buffer.h:46: note: candidates are: int CBuffer::UpdateLine(const CString&, const CString&, bool)
/home/rctgamer3/znc/include/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateMotdBuffer(const CString&, const CString&, const CString&)':
/home/rctgamer3/znc/include/znc/IRCNetwork.h:130: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/usr/local/include/znc/Buffer.h:46: note: candidates are: int CBuffer::UpdateLine(const CString&, const CString&, bool)
/home/rctgamer3/znc/include/znc/IRCNetwork.h: In member function 'void CIRCNetwork::UpdateQueryBuffer(const CString&, const CString&, const CString&)':
/home/rctgamer3/znc/include/znc/IRCNetwork.h:134: error: no matching function for call to 'CBuffer::UpdateLine(const CString&, const CString&, const CString&)'
/usr/local/include/znc/Buffer.h:46: note: candidates are: int CBuffer::UpdateLine(const CString&, const CString&, bool)
push.cpp: In member function 'bool CPushMod::away_only()':
push.cpp:701: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'size_t CPushMod::client_count()':
push.cpp:711: error: 'GetNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::highlight(const CString&)':
push.cpp:756: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'bool CPushMod::nick_blacklist(const CNick&)':
push.cpp:836: error: 'm_pNetwork' was not declared in this scope
push.cpp: In member function 'virtual void CPushMod::OnModCommand(const CString&)':
push.cpp:1423: error: 'GetNetwork' was not declared in this scope
push.cpp: In function 'void TModInfo(CModInfo&) [with M = CPushMod]':
push.cpp:1723: error: 'class CModInfo' has no member named 'AddType'
push.cpp:1723: error: 'UserModule' is not a member of 'CModInfo'
push.cpp: At global scope:
push.cpp:1727: error: expected identifier before string constant
push.cpp:1727: error: expected ',' or '...' before string constant
push.cpp:1727: error: expected constructor, destructor, or type conversion at end of input
[ !! ] Error while building "push.so"
@jreese
Owner

master branch now supports 1.0+ - try building from latest master, and see if that fixes this issue.

@rctgamer3

That's what I did, i downloaded the master branch as a zip, unpacked, and tried building. (trying to build for ZNC 1.4)

@jreese
Owner

Very weird. I've been able to build against 1.4 and the current 1.5-git versions of znc without issue. Are you sure the headers in /home/rctgamer3/znc/include are the appropriate headers for znc 1.4? Perhaps your make install failed for some reason, and couldn't update the headers to match. It also seems odd that the build lists some headers from /usr/local/include as well, which would indicate that it seems you have multiple competing installs of znc.

@dgw

As additional evidence: I just built the master branch against 1.5-nightly-20140509-3b01efc0 about 6 hours ago, during an upgrade, and it does work.

@rctgamer3

I think i found out what i did wrong, I tried compiling it manually. I simply copied the .cpp to the modules folder in ZNC's source and reran (g)make in znc's directory. It built and linked it succesfully. Doh.
(I hope this comment is of use to anyone reading this!)

@dgw

You weren't using znc-buildmod? That…could have been an influence. Building it that way instead of with (g)make makes sure that certain headers are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.