nhorman / dropwatch

user space utility to interface to kernel dropwatch facility
GNU General Public License v2.0
632 stars 92 forks source link

libreadline is required #53

Closed VietDuc19 closed 3 years ago

VietDuc19 commented 3 years ago

Hi team! I am complying dropwatch on Ubuntu 18.04.I have problem when configure:

./configure

checking pkg-config is at least version 0.9.0... yes checking for LIBNL3... yes checking for LIBNLG3... yes checking for READLINE... no configure: error: libreadline is required My server install readline packages:

apt list --installed | grep -i readline

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libreadline-dev/bionic,now 7.0-3 amd64 [installed] libreadline5/bionic,now 5.2+dfsg-3build1 amd64 [installed] libreadline7/bionic,now 7.0-3 amd64 [installed] php7.2-readline/now 7.2.24-0ubuntu0.18.04.7 amd64 [installed,upgradable to: 7.2.24-0ubuntu0.18.04.9] readline-common/bionic,bionic,now 7.0-3 all [installed]

whereis readline

readline: /usr/include/readline /usr/share/readline /usr/share/man/man3/readline.3readline.gz

Why configure dropwatch still notice about missing libreadline?

nhorman commented 3 years ago

Do you have libreadline-dev installed and is it at a recent enough version that it has a pkg-config (.pc) included?

VietDuc19 commented 3 years ago

Do you have libreadline-dev installed and is it at a recent enough version that it has a pkg-config (.pc) included?

Yes I have. I passed check readline but now I have another problem with libnl-3.0. It's same error with readline: all neccessary packages of libnl installed on my server.

nhorman commented 3 years ago

its the same problem, with a new package. install libnl-3.0-dev. Surely you see the pattern. you need the pkg-config files for these libraries installed so that pkg-config can find them when you run configure to build dropwatch. From what I see here: https://packages.ubuntu.com/bionic/amd64/libnl-3-dev/filelist https://packages.ubuntu.com/bionic/amd64/libreadline-dev/filelist

ubuntu never managed to package libreadline.pc for that library, but they do have libnl-3's .pc file. So you should build and install libreadline just as you did (and file a bug with ubuntu to get the package updated). And for libnl-3 just install the libnl-3.0-dev pacakge.

f1yankees commented 2 years ago

This works but you don't have to build readline. That could potentially cause other issues down the road with version compatibility. Just make a file in /usr/share/pkgconfig/readline.pc as described like so and it will compile fine. https://www.marache.net/post/readline-pc.html

For Debian users, you will likely need these dependencies: libnl-3-dev libnl-genl-3-dev binutils-dev libreadline-dev

It would be helpful if somebody could package this

nhorman commented 2 years ago

yes, it would be helpful since this is the 4th time I've had to answer this question for debian/ubuntu environments. both debian and ubuntu need to get off their tails and update their LTS releases.

I've had this bug open in launchpad for months: https://bugs.launchpad.net/ubuntu/+source/readline/+bug/1938591 and I get crickets

Perhaps if some others comment on the bug, it will get some traction.