Re: Libpq linked statically linked to OpenSSL/LibreSSL
От | Marco Bambini |
---|---|
Тема | Re: Libpq linked statically linked to OpenSSL/LibreSSL |
Дата | |
Msg-id | 7B10A8B6-04E3-49F3-AB0D-413E8B0AC365@creolabs.com обсуждение исходный текст |
Ответ на | RE: Libpq linked statically linked to OpenSSL/LibreSSL (ALBERTO CABELLO SÁNCHEZ <alberto@unex.es>) |
Ответы |
Re: Libpq linked statically linked to OpenSSL/LibreSSL
|
Список | pgsql-interfaces |
Thanks Alberto, This is a very promising approach. I tried to modify the Makefile in src/interfaces/libpq/Makefile and I replaced the occurrences of -lssl and -lcrypto with: /root/rothsoft/libressl-3.6.1/ssl/.libs/libssl.a /root/rothsoft/libressl-3.6.1/crypto/.libs/libcrypto.a The compilation process is OK but when I tried to execute the test app I receive a link error: Error loading DLL: /root/rothsoft/engines/postgreSQL/Linux/postgresql/libpq.so: undefined symbol: GENERAL_NAME_free GENERAL_NAME_free usually means that libcrypto is missed. Any help would be really appreciated. Please note that I also tried with: -l:/root/rothsoft/libressl-3.6.1/ssl/.libs/libssl.a -l:/root/rothsoft/libressl-3.6.1/crypto/.libs/libcrypto.a Thanks, Marco > On 5 Dec 2022, at 14:10, ALBERTO CABELLO SÁNCHEZ <alberto@unex.es> wrote: > >>> Hi all, >>> >>> After several attempts, I am asking for help with how to compile libpq with OpenSSL >>> statically linked. >>> I need to have libpq linked with LibreSSL, but if I could statically link OpenSSL, I think >>> I could switch the TLS libraries at compile time. >> >> redo the step which creates libpq.so appending your libssl.a location >> (mine is /usr/lib/x86_64-linux-gnu/libssl.a) at the end. > > Just wanted to correct: you also have to remove "-lssl". So I guess you can just > substitute "-lssl" for libssl.a location in src/interfaces/libpq/Makefile (two occurrences) > and build as usual. >
В списке pgsql-interfaces по дате отправления: