freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Configure Build so OpenSSL is statically linked
- From: John Kendall <john AT capps.com>
- To: FreeTDS Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Configure Build so OpenSSL is statically linked
- Date: Mon, 20 Sep 2021 21:03:51 +0000
> On Sep 20, 2021, at 11:27 AM, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>
> Hi,
>
> Il giorno lun 20 set 2021 alle ore 17:39 John Kendall <john AT capps.com> ha
> scritto:
>
>> Hi, Frediano.
>>
>> Yes, only OpenSSL static, the rest dynamic. I’m on MacOS. I’ve got the
>> latest OpenSSL (3.0) compiled and installed.
>> The static libs are in /usr/local/lib:
>>
>> $ ls /usr/local/lib/*.a
>> /usr/local/lib/libcrypto.a /usr/local/lib/libssl.a
>>
>> It was no problem getting things built with dynamic libraries.
>>
>> ./configure --with-openssl=/usr/local ; make. ## works
>
> I suppose it works with dynamic libraries. Are the dynamic libraries in
> the same directory?
Yes.
>> I’ve tried a few things to get them to statically link:
>>
>> adding --disable-rpath
>>
>
> It should not help
>
>
>> setting LDFLAGS
>>
>
> I would work on OPENSSL_LIBS instead. Some linker prefers to have the full
> path of the static libraries, like
> export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a'
>
>
>> setting OPENSSL_CFLAGS
>>
>
> This should be the same for static and not static (at least usually)
>
>> But I don’t know how to set them.
>> I don’t know about PKG_CONFIG. Any ideas would be appreciated.
>>
>
> I hope it is not necessary to change these. pkg-config is a program that
> helps configure to find libraries and settings.
> PKG_CONFIG variable tells configure where to find this program/script.
> PKG_CONFIG_PATH tell pkg-config where
> to look for *.pc files containing configuration for libraries. For instance
> on my system (Linux):
>
> $ pkg-config --cflags --libs openssl -lssl -lcrypto
My install doesn’t seem to have the pkg-config utility. Hopefully it isn't
necessary.
>
> Given what you told me I would try
>
> $ export OPENSSL_CFLAGS='-I/usr/local/include'
> $ export OPENSSL_LIBS='/usr/local/lib/libcrypto.a /usr/local/lib/libssl.a'
> $ ./configure --with-openssl <arguments>
> $ make
This gave lots of linker errors, however it did produce a libct.dylib. But
the library did not work.
Any other ideas? I appreciate your help.
>
> Thanks,
>> John
>>
>>
> Frediano
>
>>
>>> On Sep 20, 2021, at 4:49 AM, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>>>
>>> Hi,
>>> I suppose you want only OpenSSL static, rest dynamic.
>>> Usually you first compile/install the static library, then tell configure
>>> where/how to find the static compiled library.
>>> Usually ./configure --help can help. In this case there are
>> --with-openssl
>>> (flag) and OPENSSL_CFLAGS/OPENSSL_LIBS
>>> (environment) to play with. To be complete I would add PKG_CONFIG_xxx
>>> environments (as configure is using
>>> pkg-config also) but usually it is not necessary to use these.
>>> If you are using Unix an alternative could be the usage of LD_RUN_PATH.
>>> This environment is used by the linker
>>> automatically and tells the executable where to find libraries.
>>> What's the environment? Linux, Windows, MacOS or any other?
>>>
>>> Regards,
>>> Frediano
>>>
>>>
>>> Il giorno lun 20 set 2021 alle ore 11:55 John Kendall <john AT capps.com>
>> ha
>>> scritto:
>>>
>>>> Hi, Folks.
>>>> I’ve tried, but I can’t seem to find the ./configure options that will
>>>> build a libct with openssl’s libssl and libcrypt statically linked to
>> it.
>>>> Has anyone done this?
>>>> Thanks in advance for any direction.
>>>> John
>>>>
>>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://url.emailprotection.link/?bJEGsdiRerNQN7JRfjMqgXe68LbBYu-rv2C7HPzTHQuhzVAo-yNSHfzQD9RVtliGYOCjuKIT7m3cEHkHaHRh5zrjuN6udVxLgKmkPC0ZzEi67RKGlnT9ZjHSG9lzH2nS5
-
[freetds] Configure Build so OpenSSL is statically linked,
John Kendall, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
Frediano Ziglio, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
John Kendall, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
Frediano Ziglio, 09/20/2021
- Re: [freetds] Configure Build so OpenSSL is statically linked, John Kendall, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
Frediano Ziglio, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
John Kendall, 09/20/2021
-
Re: [freetds] Configure Build so OpenSSL is statically linked,
Frediano Ziglio, 09/20/2021
Archive powered by MHonArc 2.6.24.