unable to compile znc+modpython with python3.5 #687

Closed
opened 2026-10-05 04:38:39 +02:00 by adam · 10 comments
Owner

centos 6.7 x86
znc-latest
python 3.5 installed to /opt/python3/

[root@h znc-1.6.3]# python3 --version
Python 3.5.1
wget http://znc.in/releases/znc-latest.tar.gz
tar -xzvf znc*.*gz
cd znc*
echo "/opt/python3/lib" >> /etc/ld.so.conf
ldconfig
PKG_CONFIG_PATH=/opt/python3/lib/pkgconfig python_LIBS="-L/opt/python3/lib/ -lpython3.5m -lutil" ./configure --enable-python --disable-swig
export LD_LIBRARY_PATH=/opt/python3/lib
make

configure:

checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ accepts -g... yes
checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ supports C++11 features by default... no
checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ supports C++11 features with -std=c++11... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /bin/grep
checking for a sed that does not truncate output... /bin/sed
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking whether the -Werror option is usable... yes
checking for simple visibility declarations... yes
checking for git... /usr/bin/git
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether compiler predefines _FORTIFY_SOURCE... no
checking for getopt_long in -lgnugetopt... no
checking for lstat... yes
checking for getopt_long... yes
checking for getpassphrase... no
checking for library containing dlopen... -ldl
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking whether getaddrinfo() supports AI_ADDRCONFIG... yes
checking for openssl... yes
checking whether openssl is usable... yes
checking whether zlib is usable... yes
checking for icu... no
configure: WARNING: support for charset conversion not found and thus disabled
configure: modperl/modpython files are found, disabling SWIG
configure: modperl/modpython files are found, no SWIG needed
checking for python... yes
checking for Py_Initialize... yes
checking for perl... /usr/bin/perl
checking for GNU make... /usr/bin/make
configure: creating ./config.status
config.status: creating Makefile
config.status: creating znc-buildmod
config.status: creating man/Makefile
config.status: creating znc.pc
config.status: creating znc-uninstalled.pc
config.status: creating modules/Makefile
config.status: creating include/znc/zncconfig.h
config.status: include/znc/zncconfig.h is unchanged

ZNC 1.6.3 configured

prefix:       /usr/local
debug:        no
ipv6:         yes
openssl:      yes
dns:          threads
perl:         no
python:       yes
swig:         not needed
cyrus:        no
tcl:          no
charset:      no (icu-uc not found via pkg-config)
zlib:         yes
run from src: no

Now you can run "make" to compile ZNC

make:

Packing man page znc.1.gz...
Packing man page znc-buildmod.1.gz...
Building ZNC python bindings library...
c++: 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.
make[1]: *** [modpython/_znc_core.o] Error 4
make: *** [modules] Error 2
centos 6.7 x86 znc-latest python 3.5 installed to /opt/python3/ ``` [root@h znc-1.6.3]# python3 --version Python 3.5.1 ``` ``` wget http://znc.in/releases/znc-latest.tar.gz tar -xzvf znc*.*gz cd znc* echo "/opt/python3/lib" >> /etc/ld.so.conf ldconfig PKG_CONFIG_PATH=/opt/python3/lib/pkgconfig python_LIBS="-L/opt/python3/lib/ -lpython3.5m -lutil" ./configure --enable-python --disable-swig export LD_LIBRARY_PATH=/opt/python3/lib make ``` configure: ``` checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ accepts -g... yes checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ supports C++11 features by default... no checking whether /opt/centos/devtoolset-1.1/root/usr/bin/c++ supports C++11 features with -std=c++11... yes checking for a BSD-compatible install... /usr/bin/install -c checking for grep that handles long lines and -e... /bin/grep checking for a sed that does not truncate output... /bin/sed checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking whether the -Werror option is usable... yes checking for simple visibility declarations... yes checking for git... /usr/bin/git checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking whether compiler predefines _FORTIFY_SOURCE... no checking for getopt_long in -lgnugetopt... no checking for lstat... yes checking for getopt_long... yes checking for getpassphrase... no checking for library containing dlopen... -ldl checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking whether getaddrinfo() supports AI_ADDRCONFIG... yes checking for openssl... yes checking whether openssl is usable... yes checking whether zlib is usable... yes checking for icu... no configure: WARNING: support for charset conversion not found and thus disabled configure: modperl/modpython files are found, disabling SWIG configure: modperl/modpython files are found, no SWIG needed checking for python... yes checking for Py_Initialize... yes checking for perl... /usr/bin/perl checking for GNU make... /usr/bin/make configure: creating ./config.status config.status: creating Makefile config.status: creating znc-buildmod config.status: creating man/Makefile config.status: creating znc.pc config.status: creating znc-uninstalled.pc config.status: creating modules/Makefile config.status: creating include/znc/zncconfig.h config.status: include/znc/zncconfig.h is unchanged ZNC 1.6.3 configured prefix: /usr/local debug: no ipv6: yes openssl: yes dns: threads perl: no python: yes swig: not needed cyrus: no tcl: no charset: no (icu-uc not found via pkg-config) zlib: yes run from src: no Now you can run "make" to compile ZNC ``` make: ``` Packing man page znc.1.gz... Packing man page znc-buildmod.1.gz... Building ZNC python bindings library... c++: 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. make[1]: *** [modpython/_znc_core.o] Error 4 make: *** [modules] Error 2 ``` <!-- github-sync-id:138789478 -->
adam closed this issue 2026-10-05 04:38:39 +02:00
Author
Owner

Could you check your logs (e.g. dmesg) and see if your computer had an out-of-memory condition and then killed the compiler due to that?

Could you check your logs (e.g. `dmesg`) and see if your computer had an out-of-memory condition and then killed the compiler due to that? <!-- github-comment-id:192886047 -->
Author
Owner

I am sure it's OOM which is also documnted at http://wiki.znc.in/FAQ#The_compiler_dies_saying_it_has_not_enough_memory.21_.2F_g.2B.2B:_internal_compiler_error:Killed.28program_cc1plus.29.

I am sure it's OOM which is also documnted at http://wiki.znc.in/FAQ#The_compiler_dies_saying_it_has_not_enough_memory.21_.2F_g.2B.2B:_internal_compiler_error:_Killed_.28program_cc1plus.29. <!-- github-comment-id:192886179 -->
Author
Owner

it probably was an OOM error since this vps only has 128mb of ram
i just tried ./configure --disable-optimization CXXFLAGS="--param ggc-min-expand=2 --param ggc-min-heapsize=20000" as shown on the wiki but it still stopped

ill try the swap method now

it probably was an OOM error since this vps only has 128mb of ram i just tried `./configure --disable-optimization CXXFLAGS="--param ggc-min-expand=2 --param ggc-min-heapsize=20000"` as shown on the wiki but it still stopped ill try the swap method now <!-- github-comment-id:192888596 -->
Author
Owner

welp, looks like my vps doesnt allow me to set swap

swapon: /swap: swapon failed: Operation not permitted

welp, looks like my vps doesnt allow me to set swap `swapon: /swap: swapon failed: Operation not permitted` <!-- github-comment-id:192889176 -->
Author
Owner

and yeah @psychon [18249550.107212] Out of memory in UB 53262: OOM killed process 27028 (cc1plus) score 0 vm:181336kB, rss:105028kB, swap:61200kB

and yeah @psychon ` [18249550.107212] Out of memory in UB 53262: OOM killed process 27028 (cc1plus) score 0 vm:181336kB, rss:105028kB, swap:61200kB ` <!-- github-comment-id:192889323 -->
Author
Owner

could that ./configure line be modified to maybe be even slower or something? i dont see what else can be done

im contacting my vps provider though to ask about the swap issue

could that `./configure` line be modified to maybe be even slower or something? i dont see what else can be done im contacting my vps provider though to ask about the swap issue <!-- github-comment-id:192889923 -->
Author
Owner

You won't be able to compile modpython (or modperl) with 128 MB of RAM. 1 GB would be more appropriate amount.
I'd advice to use precompiled version, but EPEL doesn't seem to support modpython... You can try to build .rpm yourself though on another machine, which has more RAM, and then move it here.

You won't be able to compile modpython (or modperl) with 128 MB of RAM. 1 GB would be more appropriate amount. I'd advice to use precompiled version, but EPEL doesn't seem to support modpython... You can try to build .rpm yourself though on another machine, which has more RAM, and then move it here. <!-- github-comment-id:192916927 -->
Author
Owner

the closest thing to the latest version i could find on google was http://centos-mirror.rbc.ru/pub/fedora/linux/updates/22/i386/z/
which has znc-modpython-1.6.2-1.fc22.i686.rpm. i wonder if thats legit. the url is confusing though and i wonder if it works on both fedora and centos

but anyway im not interested in using an older version. maybe i can compile it on my server which has more RAM and copy the files over?

the closest thing to the latest version i could find on google was [http://centos-mirror.rbc.ru/pub/fedora/linux/updates/22/i386/z/](http://centos-mirror.rbc.ru/pub/fedora/linux/updates/22/i386/z/) which has `znc-modpython-1.6.2-1.fc22.i686.rpm`. i wonder if thats legit. the url is confusing though and i wonder if it works on both fedora and centos but anyway im not interested in using an older version. maybe i can compile it on my server which has more RAM and copy the files over? <!-- github-comment-id:192973780 -->
Author
Owner

If your server has the same OS and architecture, sure. That's basically what I've suggested, except that .rpm isn't really needed to copy files from one machine to another.
make install DESTDIR=/tmp/zncpkg will give you tar'eable dir which you can unpack to / on the other server.

.rpm is just more usual method of moving binaries to other servers

If your server has the same OS and architecture, sure. That's basically what I've suggested, except that .rpm isn't really needed to copy files from one machine to another. `make install DESTDIR=/tmp/zncpkg` will give you tar'eable dir which you can unpack to / on the other server. .rpm is just more usual method of moving binaries to other servers <!-- github-comment-id:193021061 -->
Author
Owner

thanks for all the help, your suggestions worked

thanks for all the help, your suggestions worked <!-- github-comment-id:196786122 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#687