Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4D35-001iAn-SB for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 05:07:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s4D32-000luo-DB for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 05:07:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4D32-000luf-2c for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 05:07:28 +0000 Received: from ms-10.1blu.de ([178.254.4.101]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4D2z-001pCY-Rh for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 05:07:27 +0000 Received: from [62.216.210.209] (helo=pureos) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1s4D2x-00DClq-OM; Tue, 07 May 2024 07:07:23 +0200 Date: Tue, 7 May 2024 07:07:22 +0200 From: Matthias Apitz To: Adrian Klaver Cc: pgsql-general@lists.postgresql.org Subject: Re: problem loading shared lib pg_tde.so Message-ID: Reply-To: Matthias Apitz References: <708659ee-19c5-4ef4-a52c-e387f9a3928c@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <708659ee-19c5-4ef4-a52c-e387f9a3928c@aklaver.com> X-Operating-System: FreeBSD 14.0-CURRENT 1400094 (amd64) X-message-flag: Mails in HTML will not be read! Send only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 62.216.210.209 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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