cocodelabs / znc-palaver

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

Build failure on Fedora 23 #34

Closed jswagner closed 8 years ago

jswagner commented 8 years ago

Setting up a new server based on Fedora 23, trying to build the module as directed and running into problems.

I have the 'Development Tools' group, as well as these supplemental packages installed: znc-devel gcc-c++ rpm-build libicu-devel

Here's the output:

[deploy@default znc-palaver]$ make
Building "palaver.so" for ZNC 1.6.2... {standard input}: Assembler messages:
{standard input}:106188: Warning: end of file not at end of a line; newline inserted
{standard input}:107017: Error: number of operands mismatch for `pop'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
[ !! ] Error while building "palaver.so"
Makefile:9: recipe for target 'palaver.so' failed
make: *** [palaver.so] Error 1
jswagner commented 8 years ago

I just started over completely from scratch. Full repro steps:

jswagner commented 8 years ago

I downloaded the Fedora 23 Server ISO image and installed a clean VM on my local libvirt instance. The build succeeded. So, I suppose I need help narrowing down what's different about DigitalOcean's Fedora images.

kylef commented 8 years ago

Hi @jswagner, sorry to hear your having problems installing the module. The error makes it seem like there is a compiler bug, if you didn't solve this already, I'd suggest trying to use clang++ instead of gcc-c++ as the compiler and see if that helps.

-Kyle

jswagner commented 8 years ago

Sorry for the delay, I'll try to revisit this in a few days.

jswagner commented 8 years ago

I forced clang++:

export CXX=/usr/bin/clang++)

And that seemed to work, but I did get a warning at build time that I didn't get on other systems:

Building "palaver.so" for ZNC 1.6.2... clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'

[ ok ]

Regardless, the module loads and sends test notifications as expected.

I have other items to build during my server deployment, ideally I'd like to stick with the system default compiler. I can work around by setting the variable and then clearing it after the build succeeds.

kylef commented 8 years ago

@jswagner Curious, how much available memory do you have when building with GCC? It might be that GCC runs out of memory and then internally errors. Clang is likely better at handling low-memory situations.

jswagner commented 8 years ago

@kylef I'm using DigitalOcean's smallest instance, which has 512MB of RAM. Again, each of these tests is done on a clean instance; there's no other major processes running besides SSH and whatever else Fedora is starting up with.

miedzinski commented 8 years ago

I have pretty much the same results with Debian Jessie. This is all I get

$ make
Building "palaver.so" for ZNC 1.6.2... g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
[ !! ] Error while building "palaver.so"
Makefile:9: recipe for target 'palaver.so' failed
make: *** [palaver.so] Error 1

clang++ fails as well.

Luckily, I've found the problem. I'm running it on DigitalOcean (with 512 mb of ram) like @jswagner and ram usage is way too high. Temporarily creating swapfile solved the issue.

kylef commented 8 years ago

Yes, building ZNC/ZNC modules will require some memory. Seems all the problems here are related to memory issues.

If anyone is still experiencing any problems please let us know.