Dear Wietse,

Thank you very much for your reply.

Am 19.04.21 um 23:19 schrieb Wietse Venema:
Paul Menzel:

Am 19.04.21 um 19:48 schrieb Wietse Venema:
Paul Menzel:

Building Berkeley DB from source, and building Postfix according to
*Postfix Berkeley DB Howto* [1] with

       make makefiles CCARGS="-DHAS_DB -I/scratch/local2/berkeley-db/include" 
AUXLIBS="-L/scratch/local2/berkeley-db/lib -ldb"

This expects /scratch/local2/berkeley-db/lib/libdb.so*

It’s present:

      $ ls -l /scratch/local2/berkeley-db/lib/
      total 1956
      -rw-rw---- 1 user user     935 Apr 19 17:04 libdb-5.3.la
      -rwxrwx--- 1 user user 1996184 Apr 19 17:04 libdb-5.3.so
      lrwxrwxrwx 1 user user      12 Apr 19 17:04 libdb-5.so -> libdb-5.3.so
      lrwxrwxrwx 1 user user      12 Apr 19 17:04 libdb.so -> libdb-5.3.so

bin/postconf: error while loading shared libraries: libdb-5.3.so: cannot open 
shared object file: No such file or directory

So where does the -5.3 in the complaint comne from? If it wasn't
specified at Postfix build time, where else can it be?

`libdb.so` and `libdb-5.so` are symbolic links to `libdb-5.3.so`.

To my knowledge, as building succeeds, it’s not a problem with the specified library.

    $ ldd ./bin/postconf
            linux-vdso.so.1 (0x00007ffd9d97f000)
            libdb-5.3.so => not found
    […]
    $ LD_LIBRARY_PATH=/scratch/local2/berkeley-db/lib ldd ./bin/postconf
            linux-vdso.so.1 (0x00007ffd9f3a8000)
libdb-5.3.so => /scratch/local2/berkeley-db/lib/libdb-5.3.so (0x00007f5d929d2000)
    […]

You may need to specify -ldb-5.3, given that your file is in
a non-default place.

make makefiles CCARGS="-DHAS_DB -I/scratch/local2/berkeley-db/include" \
   AUXLIBS="-L/scratch/local2/berkeley-db/lib -ldb-5.3"

That results in the same issue. At least from other software, I now,
that the runtime library path needs to be set either by
`LD_LIBRARY_PATH` or `-rpath`.

And, surprise, the Postfix 3.x build for Linux specifies -rpath.
You override the Postfix build system at your own risk.

I am following the instructions in `DB_README` [1]. ;-)

Could you please point me to the code? I am not seeing it. I found `SHLIB_RPATH` [1] before, but I do not override it, and reading the description I thought it’s for the shared libraries generated by Postfix `libpostfix-*.so.*`.

       SHLIB_RPATH=rpath
              Override the  runpath  (typically,  "'-Wl,-rpath,${SHLIB_DIR}'")
              for Postfix dynamically-linked libraries.

              This feature was introduced with Postfix 3.0.

Would you accept a patch to add fix the instructions in `DB_README`?


Kind regards,

Paul


[1]: http://www.postfix.org/DB_README.html#no_db
[2]: http://www.postfix.org/makedefs.1.html

Reply via email to