0

Getting libgdbm.so not found error, couldn't resolve even after installing proper package. Also I couldn't find proper documentation on compiling from source and installing.

eisbehr
  • 12,243
  • 7
  • 38
  • 63
rahulk
  • 175
  • 3
  • 15

2 Answers2

1

To build avahi on Ubuntu I would suggest the following steps:

sudo apt-get build-dep avahi # (you'll need to have enabled deb-src lines in /etc/apt/sources.list for this to work, or you can use the software settings to enable source packages)

Then additionally install xml2man and python-gi-dev

sudo apt install python-gi-dev xml2man

Then configure with these options:

./configure --disable-gtk --disable-qt3 --disable-mono

Avahi always errors about a build dependency it can't find, requiring you to explicitly disable those items. Above I suggest to disable some old toolkits (gtk2 and qt3) plus mono support. If you get other errors you can generally use a similar --disable-X option to disable those. But for Ubuntu generally you can compile almost everything else.

gtk and qt3 is disabled by default in the latest git, but not the latest release.

A quick place to check for the required ubuntu deps would be the travis configuration: https://github.com/lathiat/avahi/blob/master/.travis.yml

Out of curiosity, what is the reason you're building from source? The Avahi packages in Ubuntu 16.04 should work well.

Trent Lloyd
  • 1,832
  • 1
  • 15
  • 13
  • we been testing cisco mdns stack with avahi as service advertiser in container, looks like avahi is not responding to L2 unicast query, so putting more debug in avahi to find root cause – rahulk Aug 02 '18 at 06:41
  • Thanks for the note ralhulk - I'm the current project author and maintainer if you need some further assistance feel free to get in touch with me via e-mail – Trent Lloyd Aug 03 '18 at 07:03
0

Compilation steps:

1) Install dependency

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
sudo apt-get install libqt4-dev libtool libglib2.0-dev intltool build-essential libgtk2.0-dev libdaemon-dev xmltoman

2) Generate configure file

bash autogen.sh

Ignore following error

checking for QT5... no
configure: error: Package requirements ( Qt5Core >= 5.0.0 ) were not met: 
No package 'Qt5Core' found

3) Create makefile

./configure --prefix=/usr     \
            --sysconfdir=/etc  \
            --localstatedir=/var \
            --disable-static     \
            --disable-mono       \
            --disable-monodoc    \
            --disable-python     \
            --disable-qt3        \
            --disable-qt4        \
            --disable-qt5        \
            --disable-gdbm       \
            --enable-core-docs   \
            --with-distro=none   \
            --with-systemdsystemunitdir=no \
            --disable-shared \
            --disable-gtk

4) Make and install

make
sudo make install

[Edit] if debugging with custom logs/code use --disable-shared in configure else changes wont reflect.

rahulk
  • 175
  • 3
  • 15