rs-serve
rs-serve copied to clipboard
Error "undefined reference to 'db_env_create'" during make
Using a blank new Ubuntu 14.04 Vagrant box:
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ make
[SUBMODULE] lib/evhtp/
[DEPS] libevhtp
Build Type: Release
Std CFLAGS: -Wall -fno-strict-aliasing -DPROJECT_VERSION="1.2.5" -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112
Dbg CFLAGS: -g -Wall -fno-strict-aliasing -ggdb
Rel CFLAGS: -O3 -DNDEBUG -Wall -fno-strict-aliasing
-- Configuring done
-- Generating done
-- Build files have been written to: /vagrant/lib/evhtp/build
make[1]: Entering directory `/vagrant/lib/evhtp/build'
make[2]: Entering directory `/vagrant/lib/evhtp/build'
make[3]: Entering directory `/vagrant/lib/evhtp/build'
make[3]: Leaving directory `/vagrant/lib/evhtp/build'
[100%] Built target libevhtp
make[2]: Leaving directory `/vagrant/lib/evhtp/build'
make[1]: Leaving directory `/vagrant/lib/evhtp/build'
[LD] test/unit/common/auth
src/common/auth.o: In function `open_authorizations':
/vagrant/src/common/auth.c:47: undefined reference to `db_env_create'
/vagrant/src/common/auth.c:57: undefined reference to `db_create'
collect2: error: ld returned 1 exit status
make: *** [test/unit/common/auth] Error 1
I looked up what might go wrong, and I see both the include as well as the option flag -ldb for the build command. No idea how to investigate further due to lack of knowledge about all of this.
Having this as well on a server running Ubuntu 12.04
Ping @nilclass – maybe you have an idea?
What version of libdb do you have? It works with 5.3.28.
I just copied the apt-get install from the README.
Edit: libdb-dev is 5.3.21 in Ubuntu 14.04.
On Ubuntu 12.04 libdb-dev is 5.1.4
EDIT: Using libdb5.3-dev on Ubuntu 12.04 is simply not possible, because of interference with libc6
Same issue on my DigitalOcean VPS. (Running Ubuntu 14.04)
I've tried with libdb5.3-dev and libdb6.0-dev from the ubuntu repos.