pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthias Apitz <guru@unixarea.de>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: problem loading shared lib pg_tde.so
Date: Tue, 7 May 2024 07:07:22 +0200
Message-ID: <Zjm3CqAIace/PZb0@pureos> (raw)
In-Reply-To: <708659ee-19c5-4ef4-a52c-e387f9a3928c@aklaver.com>
References: <Zji5bj8BZIYeXEXc@pureos>
	<f4e09c28-fc25-4a4e-a770-f46d04063dfd@aklaver.com>
	<708659ee-19c5-4ef4-a52c-e387f9a3928c@aklaver.com>

El día lunes, mayo 06, 2024 a las 07:45:52 -0700, Adrian Klaver escribió:

> On 5/6/24 07:42, Adrian Klaver wrote:
> > On 5/6/24 04:05, Matthias Apitz wrote:
> 
> > 
> > I see three different versions of OpenSSL:
> > 
> > OPENSSL_1_1_1d      -- From error messsage
> > OpenSSL 1.1.1l-fips    -- SuSE 15 version
> > OpenSSL 1.1.1t            -- Your built version?
> > 
> > Are you sure you pointing at the same version in all cases?

Yes, to my built version.

> 
> Should have added what does the below return?:
> 
> ldd /usr/local/sisis-pap/pgsql-16.2/lib/pg_tde.so

I added in the start script of the server the following line about ldd,
to get it exactly in the LD_LIBRARY_PATH of the server:

...
case $1 in
  start)
        echo -n "Starting PostgreSQL: "
        test -e "$PG_OOM_ADJUST_FILE" && echo "$PG_MASTER_OOM_SCORE_ADJ" > "$PG_OOM_ADJUST_FILE"
        su - $PGUSER -c "$LD_ENV $DAEMON_ENV env > /tmp/pg_tde.ldd"
        su - $PGUSER -c "$LD_ENV $DAEMON_ENV ldd /usr/local/sisis-pap/pgsql-16.2/lib/pg_tde.so >> /tmp/pg_tde.ldd"
        su - $PGUSER -c "$LD_ENV $DAEMON_ENV $DAEMON -D '$PGDATA' >>$PGLOG 2>&1 &"
        echo "ok"
        ;;
...

After looking carefully at the file /tmp/pg_tde.ldd I saw the problem:

# egrep 'LD_LIBRARY_PATH|libcurl' /tmp/pg_tde.ldd
LD_LIBRARY_PATH=:/usr/local/sisis-pap/lib
        libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007fc830146000)

LD_LIBRARY_PATH was set as it should to /usr/local/sisis-pap/lib but the 
libcurl.so.4 was not seen. I made curl by my own and this installed:

# ls -l /usr/local/sisis-pap/lib/libcurl*
-rw-r--r-- 1 bin bin 1315526 May  6 10:29 /usr/local/sisis-pap/lib/libcurl.a
-rwxr-xr-x 1 bin bin    1004 May  6 10:29 /usr/local/sisis-pap/lib/libcurl.la
-rwxr-xr-x 1 bin bin  735168 May  6 10:29 /usr/local/sisis-pap/lib/libcurl.so.4.8.0

but the pg_tde.so was loocking for libcurl.so.4 and not for libcurl.so.4.8.0

I made a symlink as

# ln -s /usr/local/sisis-pap/lib/libcurl.so.4.8.0 /usr/local/sisis-pap/lib/libcurl.so.4

and the server comes up fine:

# /etc/init.d/postgres162 start
Starting PostgreSQL: ok

# grep curl /tmp/pg_tde.ldd
        libcurl.so.4 => /usr/local/sisis-pap/lib/libcurl.so.4 (0x00007faefc8bd000)

I have to figure out why the making of 'curl' does not produce that
symlink by its own, or why the making of pg_tde.so let it ask for 
libcurl.so.4 and not for libcurl.so.4.8.0.

Thanks for your help, Adrian.

	matthias

-- 
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub





view thread (5+ messages)  latest in thread

Message-ID: <Zjm3CqAIace/PZb0@pureos>
Permalink:  ../Zjm3CqAIace%2FPZb0@pureos/
Also on:    postgresql.org/message-id/Zjm3CqAIace/PZb0@pureos

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: guru@unixarea.de, adrian.klaver@aklaver.com, pgsql-general@lists.postgresql.org
  Subject: Re: problem loading shared lib pg_tde.so
  In-Reply-To: <Zjm3CqAIace/PZb0@pureos>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox