Can't build xapian-bindings in a virtual env

Olly Betts olly at survex.com
Wed Oct 3 23:25:04 BST 2018


On Tue, Oct 02, 2018 at 04:13:14PM -0700, Eric Abrahamsen wrote:
> ./configure --prefix=$venv --with-python3
> 
> The configure process looks fine: xapian-config is found correctly, as
> is my virtualenv python installation. Then I export LD_LIBRARY_PATH as
> $venv/lib.

You shouldn't need to set LD_LIBRARY_PATH - libtool should set rpath
when linking against a library outside the standard search path.

In general it's probably harmless to set it though, and it shouldn't
result in the compiler getting killed.

> Then "make" fails with:
[...]
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python3.6m -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden -I/home/<me>/.local/share/virtualenvs/<venv>/include -g -O2 -MT xapian_wrap.lo -MD -MP -MF .deps/xapian_wrap.Tpo -c xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
> g++: internal compiler error: Killed (program cc1plus)

This seems to indicate the compiler received SIGKILL, which smells to me
like the kernel's OOM (Out Of Memory) killer kicked in.

The bindings are quite resource intensive to compile, so on a low-memory
system you may need to turn down or disable optimisation to get them to
build.  Also check that the amount memory a process can use isn't
limited by ulimit.

The INSTALL file shows how to disable optimisation:

https://trac.xapian.org/browser/git/xapian-bindings/INSTALL#L14

The change way back in 0.9.3 mentioned there was that we factored out
the exception mapping into a helper function.

Cheers,
    Olly



More information about the Xapian-discuss mailing list