Project

General

Profile

Actions

Bug #3493

open

installed libhiredis includes/libs not found by configure script

Added by Anonymous almost 5 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

building suricata 5.0.2


    git log | head
        commit fd3c7d5ce8e554602f3c3b9572db051d877a274d
        Author: Victor Julien <victor@inliniac.net>
        Date:   Thu Feb 13 11:57:47 2020 +0100

            version: release 5.0.2

        commit 8ad874e369b972dc390a0ebc4e718315f4b7ec76
        Author: Victor Julien <victor@inliniac.net>
        Date:   Thu Feb 13 11:57:04 2020 +0100

hiredis prereq is installed


    ls -al /usr/local/include/hiredis/
        total 56K
        drwxr-xr-x   3 root root 4.0K Feb 20 11:17 ./
        drwxr-xr-x+ 57 root root 4.0K Feb 20 11:17 ../
        drwxr-xr-x   2 root root 4.0K Feb 20 11:17 adapters/
        -rw-r--r--   1 root root 5.7K Feb 20 10:57 async.h
        -rw-r--r--   1 root root  11K Feb 20 10:57 hiredis.h
        -rw-r--r--   1 root root 2.2K Feb 20 10:57 hiredis_ssl.h
        -rw-r--r--   1 root root 4.7K Feb 20 10:57 read.h
        -rw-r--r--   1 root root 9.0K Feb 20 10:57 sds.h

    ls -al /usr/local/lib64/libhiredis*
        lrwxrwxrwx 1 root root  18 Feb 20 11:17 /usr/local/lib64/libhiredis.so -> libhiredis.so.0.14*
        -rwxr-xr-x 1 root root 88K Feb 20 11:17 /usr/local/lib64/libhiredis.so.0.14*
        -rwxr-xr-x 1 root root 20K Feb 20 11:17 /usr/local/lib64/libhiredis_ssl.so*

    pkg-config --list-all | grep -i redis
        hiredis                             hiredis - Minimalistic C client library for Redis.
        hiredis_ssl                         hiredis_ssl - SSL Support for hiredis.

    pkg-config hiredis --libs --cflags
        -D_FILE_OFFSET_BITS=64 -I/usr/local/include/hiredis -L/usr/local/lib64 -lhiredis

configuring suricata FAILs,


    ./configure \
    --enable-hiredis \
    --with-libhiredis-includes=/usr/local/include/hiredis \
    --with-libhiredis-libraries=/usr/local/lib64 \
    ...

        ...
        checking for MMDB_open in -lmaxminddb... yes
        checking hiredis/hiredis.h usability... no
        checking hiredis/hiredis.h presence... no
        checking for hiredis/hiredis.h... no

           ERROR!  libhiredis library not found, go get it
           from https://github.com/redis/hiredis or your distribution:

           Ubuntu: apt-get install libhiredis-dev
           Fedora: dnf install hiredis-devel
           CentOS/RHEL: yum install hiredis-devel

as does


    ./configure \
    --enable-hiredis \
    --with-libhiredis-includes=/usr/local/include \
    --with-libhiredis-libraries=/usr/local/lib64 \
    ...

        ...
        checking for MMDB_open in -lmaxminddb... yes
        checking hiredis/hiredis.h usability... no
        checking hiredis/hiredis.h presence... no
        checking for hiredis/hiredis.h... no

           ERROR!  libhiredis library not found, go get it
           from https://github.com/redis/hiredis or your distribution:

           Ubuntu: apt-get install libhiredis-dev
           Fedora: dnf install hiredis-devel
           CentOS/RHEL: yum install hiredis-devel

the find-hiredis code seems unnecessarily complex; needs a clean/fix, at least

ideally, replace with pkg-config use

Actions #1

Updated by Jason Ish almost 5 years ago

  • Priority changed from High to Normal

Can you provide your distribution information please? I ask, cause it works for me, with hiredis installed from sources on Fedora 31. One difference I noticed from your setup though, is that on Fedora, the libs install into /usr/local/lib, not lib64.

Actions #2

Updated by Anonymous almost 5 years ago

Can you provide your distribution information please?

Should not be relevant ... as it's a local build & install, not distro-packaged, and the '--with-libhiredis-*' flags should work regardless of the distro.

that said,


lsb_release -rd

    Description:    openSUSE Leap 15.1
        Release:        15.1

I ask, cause it works for me, with hiredis installed from sources on Fedora 31. One difference I noticed from your setup though, is that on Fedora, the libs install into /usr/local/lib, not lib64.

opensuse uses FHS/LSB standardized /.../lib64 as path for 64bit x86 libs, with /.../lib used for 32bit x86 libs. iiuc, RH does as well. not at all sure what Fedora uses.

hiredis is cmake-configurable, and easily installable in proper multiarch-aware libdirs with


    -DCMAKE_INSTALL_LIBDIR=lib64

there IS a bug with hiredis pkg-config .pc generation

https://github.com/redis/hiredis/issues/767

iiuc, suricata isn't using pkg-config anyway -- and, again, should honor the flags, or bettery yet, use pkg-config.

Actions #3

Updated by Philippe Antoine 5 months ago

  • Target version set to TBD
Actions #4

Updated by Philippe Antoine 5 months ago

  • Assignee set to OISF Dev
Actions

Also available in: Atom PDF