cocodelabs / znc-palaver

ZNC module for push notifications
MIT License
112 stars 14 forks source link

Unable to build due ZNC version mismatch #33

Closed kaishin closed 8 years ago

kaishin commented 8 years ago

Hi, I was running palaver with ZNC 1.4 but after I updated to 1.6.2 I am no longer able to build Palaver.

 ~/znc-palaver> make
Building "palaver.so" for ZNC 1.4... palaver.cpp:29:3: error: #error "Palaver ZNC Modules requires ZNC 1.6 or newer."
  #error "Palaver ZNC Modules requires ZNC 1.6 or newer."
   ^
palaver.cpp: In member function ‘bool CDevice::AddNetwork(const CIRCNetwork&, const CString&)’:
palaver.cpp:274:42: error: passing ‘const CIRCNetwork’ as ‘this’ argument of ‘CUser* CIRCNetwork::GetUser()’ discards qualifiers [-fpermissive]
   return AddNetworkNamed(network.GetUser()->GetUserName(), network.GetName(), sNetworkID);
                                          ^
palaver.cpp: In member function ‘const CString CDevice::GetNetworkID(const CIRCNetwork&) const’:
palaver.cpp:355:45: error: passing ‘const CIRCNetwork’ as ‘this’ argument of ‘CUser* CIRCNetwork::GetUser()’ discards qualifiers [-fpermissive]
   const CString sUsername = network.GetUser()->GetUserName();
                                             ^
[ !! ] Error while building "palaver.so"
Makefile:9: recipe for target 'palaver.so' failed
make: *** [palaver.so] Error 1
~/znc-palaver> znc -v
ZNC 1.6.2+deb1 - http://znc.in
IPv6: yes, SSL: yes, DNS: threads, charset: yes

Any idea why is Palaver trying to build against 1.4?

kaishin commented 8 years ago

Just realized that my znc-buildmod was outdated but even after updating it I am getting that error.

Building "palaver.so" for ZNC 1.6.2... palaver.cpp:29:3: error: #error "Palaver ZNC Modules requires ZNC 1.6 or newer."
  #error "Palaver ZNC Modules requires ZNC 1.6 or newer."
kaishin commented 8 years ago

OS: debian stretch/sid

ZNC 1.6.2+deb1 - http://znc.in
IPv6: yes, SSL: yes, DNS: threads, charset: yes

znc-palaver: 1.0.1

I used apt-get to install ZNC, but had compiled it from source before upgrading form 1.4.

kylef commented 8 years ago

@kaishin Is ZNC 1.4 still installed? Perhaps it's in PATH.

Do you have the Debian znc-dev package installed?

kaishin commented 8 years ago

@kylef Sorry for opening the issue before doing my homework and thanks for replying!

It seems like 1.4 was not completely uninstalled which caused the issue. Running make uninstall on ZNC and reinstalling solved the problem.

kylef commented 8 years ago

Perfect, glad you managed to figure it out @kaishin.

kaishin commented 8 years ago

@kylef Seems like I celebrated too early. Now when I load palaver in znc it crashes. When I run znc in the command line I get:

[ .. ] Checking for list of available modules...
*** Error in `znc': free(): invalid pointer: 0xb77b59f4 ***
fish: Job 1, “znc --debug” terminated by signal SIGABRT (Abort)

Any idea what this could be related to? Any way I can debug or provide more data?

kaishin commented 8 years ago

When I remove palaver.so from /modules ZNC starts normally.

kaishin commented 8 years ago

Gah, I got fed up with this so I dropped the distro package version and installed ZNC from source and that solved the issue.