Error on create extension pgcrypto. Undefined symbol "EVP_bf_ecb"
Dear Friends,
I have a Freebsd 13.2 server where I installed postgresql 16.1 via source
code, I installed the pgcrypto extension with the gmake install command
without error messages, but when trying to create the extension in a
database I receive the following message:
ERROR: could not load library "/usr/local/pgsql16/lib/pgcrypto.so":
/usr/local/pgsql16/lib/pgcrypto.so: Undefined symbol "EVP_bf_ecb"
Freebsd 13.2 has 2 versions of openssl installed, one base and the other
via pkg, the base version is:
OpenSSL 1.1.1t-freebsd 7 Feb 2023
while the version installed via pkg is:
OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023)
When I run ./configure I see in config.log that it is always using the base
version of Freebsd.
How to resolve this?
Marco Aurélio Ventura da Silva
Analista de Sistemas / Desenvolvedor
marcoprodata@gmail.com
Prodata Informática e Cadastro LTDA
(33) 3322-6363
On 7 Feb 2024, at 15:09, Marco Aurelio <marcoprodata@gmail.com> wrote:
When I run ./configure I see in config.log that it is always using the base version of Freebsd.
You can use the --with-libraries and --with-includes arguments to ./configure
in order to point it to the version you want to build against.
--
Daniel Gustafsson
I added the include and libraries folders:
--with-libraries=/usr/local/lib --with-includes=/usr/local/include
but configure keeps finding the old version of openssl
configure:14133: checking for openssl
configure:14151: found /usr/bin/openssl
configure:14163: result: /usr/bin/openssl
configure:14183: using openssl: OpenSSL 1.1.1t-freebsd 7 Feb 2023
Marco Aurélio Ventura da Silva
Analista de Sistemas / Desenvolvedor
marcoprodata@gmail.com
Prodata Informática e Cadastro LTDA
(33) 3322-6363
Em qua., 7 de fev. de 2024 às 11:17, Daniel Gustafsson <daniel@yesql.se>
escreveu:
Show quoted text
On 7 Feb 2024, at 15:09, Marco Aurelio <marcoprodata@gmail.com> wrote:
When I run ./configure I see in config.log that it is always using the
base version of Freebsd.
You can use the --with-libraries and --with-includes arguments to
./configure
in order to point it to the version you want to build against.--
Daniel Gustafsson
Marco Aurelio <marcoprodata@gmail.com> writes:
I added the include and libraries folders:
--with-libraries=/usr/local/lib --with-includes=/usr/local/include
but configure keeps finding the old version of openssl
configure:14133: checking for openssl
configure:14151: found /usr/bin/openssl
configure:14163: result: /usr/bin/openssl
configure:14183: using openssl: OpenSSL 1.1.1t-freebsd 7 Feb 2023
You can ignore that particular result, because it doesn't matter
as long as we're using the right headers and libraries. (We knew
when that check was put in that it would give some false positives.)
Alternatively, change your PATH to put /usr/local/bin in front
of /usr/bin.
regards, tom lane
I changed the path and now the correct version of openssl appears in the
config.log, even so, after recompiling and reinstalling both postgresql and
the pgcrypto contrib, when trying to create the extension in a database I
continue to receive the same error, any further suggestions ?
Marco Aurélio Ventura da Silva
Analista de Sistemas / Desenvolvedor
marcoprodata@gmail.com
Prodata Informática e Cadastro LTDA
(33) 3322-6363
Em qua., 7 de fev. de 2024 às 12:12, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Show quoted text
Marco Aurelio <marcoprodata@gmail.com> writes:
I added the include and libraries folders:
--with-libraries=/usr/local/lib --with-includes=/usr/local/include
but configure keeps finding the old version of opensslconfigure:14133: checking for openssl
configure:14151: found /usr/bin/openssl
configure:14163: result: /usr/bin/openssl
configure:14183: using openssl: OpenSSL 1.1.1t-freebsd 7 Feb 2023You can ignore that particular result, because it doesn't matter
as long as we're using the right headers and libraries. (We knew
when that check was put in that it would give some false positives.)
Alternatively, change your PATH to put /usr/local/bin in front
of /usr/bin.regards, tom lane
On 7 Feb 2024, at 18:53, Marco Aurelio <marcoprodata@gmail.com> wrote:
I changed the path and now the correct version of openssl appears in the config.log, even so, after recompiling and reinstalling both postgresql and the pgcrypto contrib, when trying to create the extension in a database I continue to receive the same error, any further suggestions ?
the _bf functions relate to the Blowfish cipher which was obsoleted in OpenSSL
3 so you need to load the legacy provider in your openssl configuration in
order to use it.
--
Daniel Gustafsson