• Re: New BIND releases ... 9.16.4: build, 'fatal error: lmdb.h: No such file or directory'

    From PGNet Dev@pgnet.dev@gmail.com to Michael McNally on Wed Jun 17 19:20:20 2020
    From Newsgroup: comp.protocols.dns.bind

    On 6/17/20 12:11 PM, Michael McNally wrote:
    9.16.4 - https://downloads.isc.org/isc/bind9/9.16.4/RELEASE-NOTES-bind-9.16.4.html

    on

    lsb_release -rd
    Description: openSUSE Leap 15.1
    Release: 15.1

    with

    gcc --version
    gcc (SUSE Linux) 10.1.1 20200515 [revision b0461f44076c26ced5526e48d4620b8ea026cfd6]

    upgrading from 9.16.3

    named -v
    BIND 9.16.3 (Stable Release) <id:5ea41c1>

    to 9.16.4, with my usual build config, including

    --with-lmdb=/usr/local/lmdb \

    where,

    tree /usr/local/lmdb
    /usr/local/lmdb
    ├── bin
    │   ├── mdb_copy
    │   ├── mdb_drop
    │   ├── mdb_dump
    │   ├── mdb_load
    │   └── mdb_stat
    ├── include
    !! │   └── lmdb.h
    ├── lib
    ├── lib64
    │   ├── liblmdb.a
    │   └── liblmdb.so
    ├── man
    └── share
    └── man
    └── man1
    ├── mdb_copy.1
    ├── mdb_drop.1
    ├── mdb_dump.1
    ├── mdb_load.1
    └── mdb_stat.1


    build now fails @ "fatal error: lmdb.h: No such file or directory"

    ...
    libtool: compile: /usr/bin/gcc-10 -include /usr/local/src/bind-9.16.4/config.h -I/usr/local/src/bind-9.16.4 -I../.. -I./include -I./unix/include -I. -I/usr/local/src/bind-9.16.4/lib/ns/include -I../../lib/ns/include -I/usr/local/src/bind-9.16.4/lib/dns/include -I../../lib/dns/include -I/usr/local/openssl11/include -I/usr/local/src/bind-9.16.4/lib/bind9/include -I../../lib/bind9/include -I/usr/local/src/bind-9.16.4/lib/isccfg/include -I../../lib/isccfg/include -I/usr/local/src/bind-9.16.4/lib/isccc/include -I../../lib/isccc/include -I/usr/local/src/bind-9.16.4/lib/isc/include -I../../lib/isc -I../../lib/isc/include -I../../lib/isc/unix/include -I../../lib/isc/pthreads/include -I/usr/local/openssl11/include -I/usr/include/json-c -I/usr/include/libxml2 -I/usr/local/include -O3 -Wall -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fmessage-length=0 -grecord-gcc-switches -march=native -mtune=native -fPIC -DPIC -D_GNU_SOURCE -fno-strict-aliasing -Wall -pthread -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing -DPRODUCT=\"BIND\" -DVERSION=\"9.16.4\" -c ./server.c -fPIC -DPIC -o .libs/server.o
    In file included from ./server.c:131:
    /usr/local/src/bind-9.16.4/lib/dns/include/dns/lmdb.h:12:10: fatal error: lmdb.h: No such file or directory
    12 | #include <lmdb.h>
    | ^~~~~~~~
    compilation terminated.
    make[2]: *** [Makefile:569: server.lo] Error 1
    make[2]: Leaving directory '/usr/local/src/bind-9.16.4/bin/named'
    make[1]: *** [Makefile:81: subdirs] Error 1
    make[1]: Leaving directory '/usr/local/src/bind-9.16.4/bin'
    make: *** [Makefile:86: subdirs] Error 1


    but checking,

    ls -al /usr/local/lmdb/include/lmdb.h
    -rw-r--r-- 1 root root 75K Jun 15 18:18 /usr/local/lmdb/include/lmdb.h

    and

    echo $LDFLAGS
    -L/usr/local/openssl11/lib64 -Wl,-rpath,/usr/local/openssl11/lib64 -lssl -lcrypto -L/usr/local/lmdb/lib64 -Wl,-rpath,/usr/local/lmdb/lib64 -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib64

    echo $CPPFLAGS
    -I/usr/local/include -I/usr/local/openssl11/include -I/usr/local/lmdb/include -I/usr/include


    fwiw, drop back to 9.16.3 is still an OK build


    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From PGNet Dev@pgnet.dev@gmail.com to Michael McNally on Wed Jun 17 19:28:03 2020
    From Newsgroup: comp.protocols.dns.bind

    On 6/17/20 7:20 PM, PGNet Dev wrote:
    to 9.16.4, with my usual build config, including

    --with-lmdb=/usr/local/lmdb \

    where,

    tree /usr/local/lmdb
    /usr/local/lmdb
    ├── bin
    │   ├── mdb_copy
    │   ├── mdb_drop
    │   ├── mdb_dump
    │   ├── mdb_load
    │   └── mdb_stat
    ├── include
    !! │   └── lmdb.h
    ├── lib
    ├── lib64
    │   ├── liblmdb.a
    │   └── liblmdb.so
    ├── man
    └── share
    └── man
    └── man1
    ├── mdb_copy.1
    ├── mdb_drop.1
    ├── mdb_dump.1
    ├── mdb_load.1
    └── mdb_stat.1


    I notice, now, after configure,


    egrep "^LMDB" Makefile
    LMDB_CFLAGS = -I/usr/local/lmdb/include
    LMDB_LIBS = -L/usr/local/lmdb/lib none required


    which certainly isn't correct.

    checking further ...
    --- Synchronet 3.18a-Linux NewsLink 1.113
  • From =?utf-8?Q?Ond=C5=99ej_Sur=C3=BD?=@ondrej@isc.org to pgnet.dev on Thu Jun 18 07:47:43 2020
    From Newsgroup: comp.protocols.dns.bind

    Did you came to get help or to argue?
    LMDB support in BIND 9 comes with pkg-config support too, you can use and adjust the .pc file from any Linux distribution package.
    It’s really not our fault the LMDB upstream decided to make it hard to use the library.
    Ondrej
    --
    Ondřej Surý — ISC
    On 18 Jun 2020, at 07:15, PGNet Dev <pgnet.dev@gmail.com> wrote:

    On 6/17/20 9:48 PM, Ondřej Surý wrote:
    Virtually everybody except upstream has modified LMDB to follow a normal directory layout and BIND expect that.
    You should just move the header files and library to /usr/local/include and /usr/local/lib respectively.

    That's just a silly statement.

    1st, /usr/local/lib is NOT a 'normal directory' layout for a number of distros -- /usr/local/lib64 is. That assumption in bind's code is just wrong.

    Software should link against the libs, and include the headers, you TELL it to -- not what it arbitrarily 'expects'.

    Finally, if that's BIND's 'expectation', why does bind even have a =path config option for it?

    What's the basis for arbitrary choice of bind using pkg-config for some pkgs, providing well-functioning _CFLAGS/_LDFLAGS/_LIBS overrides for others -- but in the case of lmdb, neither -- just an 'expectation'?
    --- Synchronet 3.18a-Linux NewsLink 1.113