nhorman / dropwatch

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

pkg-config Readline Not Found #41

Closed Ryushin closed 3 years ago

Ryushin commented 3 years ago

I'm running Devuan Beowulf (Debian Buster) and I downloaded the master branch. When running configure I see:

configure: error: libreadline is required

Running:

pkg-config --cflags "readline"
Package readline was not found in the pkg-config search path.
Perhaps you should add the directory containing `readline.pc'
to the PKG_CONFIG_PATH environment variable
No package 'readline' found

I have libreadline-dev installed. This is probably the same problem as #39 It looks like flags definition is not provided in Debian https://www.marache.net/post/readline-pc.html

I downloaded the Debian libreadline pkg source, compiled it and copied cp ./build/readline.pc /usr/share/pkgconfig/readline.pc Master branch now compiles fine.

Not sure if you want to add a different check or not for readline.

nhorman commented 3 years ago

What I would like is for debian to update their readline package to include the .pc file properly :)

Ryushin commented 3 years ago

Looks like Debian has fixed it in the next version: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901650

dsorber commented 2 years ago

Just in case anyone else ends up here from Google like I did...

Rocky 8.5 (and presumably CentOS/RHEL) does not include readline.pc in their readline-devel (or any other) package:

 $ dnf provides '*readline.pc'
Rocky Linux 8 - AppStream                                                                               26 MB/s | 8.9 MB     00:00    
Rocky Linux 8 - BaseOS                                                                                  17 MB/s | 5.6 MB     00:00    
Rocky Linux 8 - Extras                                                                                 125 kB/s |  11 kB     00:00    
Rocky Linux 8 - PowerTools                                                                              10 MB/s | 2.5 MB     00:00    
ELRepo.org Community Enterprise Linux Repository - el8                                                 296 kB/s | 247 kB     00:00    
ELRepo.org Community Enterprise Linux Kernel Repository - el8                                          2.1 MB/s | 2.0 MB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                                          18 MB/s |  11 MB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                 5.4 MB/s | 979 kB     00:00    
Error: No Matches found

Fortunately this is relatively simple to remedy, create /usr/lib64/pkgconfig/readline.pc:

Name: Readline
Description: Gnu Readline library for command line editing
URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
Version: 7.0
Requires.private: tinfo
Libs: -lreadline -ltinfo
Cflags: -I/usr/include/readline
wesleyel commented 2 years ago

Just in case anyone else ends up here from Google like I did...

Rocky 8.5 (and presumably CentOS/RHEL) does not include readline.pc in their readline-devel (or any other) package:

 $ dnf provides '*readline.pc'
Rocky Linux 8 - AppStream                                                                               26 MB/s | 8.9 MB     00:00    
Rocky Linux 8 - BaseOS                                                                                  17 MB/s | 5.6 MB     00:00    
Rocky Linux 8 - Extras                                                                                 125 kB/s |  11 kB     00:00    
Rocky Linux 8 - PowerTools                                                                              10 MB/s | 2.5 MB     00:00    
ELRepo.org Community Enterprise Linux Repository - el8                                                 296 kB/s | 247 kB     00:00    
ELRepo.org Community Enterprise Linux Kernel Repository - el8                                          2.1 MB/s | 2.0 MB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                                          18 MB/s |  11 MB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                 5.4 MB/s | 979 kB     00:00    
Error: No Matches found

Fortunately this is relatively simple to remedy, create /usr/lib64/pkgconfig/readline.pc:

Name: Readline
Description: Gnu Readline library for command line editing
URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html
Version: 7.0
Requires.private: tinfo
Libs: -lreadline -ltinfo
Cflags: -I/usr/include/readline

Excellent job! For ubuntu users the path is ‘/usr/lib/pkgconfig/readline.pc’

makabaka1880 commented 8 months ago

How do I add the pc file in macOS? I can't access the folder even with sudo