rs-serve icon indicating copy to clipboard operation
rs-serve copied to clipboard

Error "undefined reference to 'db_env_create'" during make

Open raucao opened this issue 11 years ago • 6 comments
trafficstars

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.

raucao avatar May 31 '14 13:05 raucao

Having this as well on a server running Ubuntu 12.04

mraerino avatar May 31 '14 16:05 mraerino

Ping @nilclass – maybe you have an idea?

raucao avatar May 31 '14 16:05 raucao

What version of libdb do you have? It works with 5.3.28.

Ragnis avatar May 31 '14 17:05 Ragnis

I just copied the apt-get install from the README.

Edit: libdb-dev is 5.3.21 in Ubuntu 14.04.

raucao avatar May 31 '14 18:05 raucao

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

mraerino avatar Jun 04 '14 18:06 mraerino

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.

ellisgeek avatar Oct 07 '14 14:10 ellisgeek