Hi,

On 11/11/23 03:34, Julian Andres Klode wrote:

1) we use libgcrypt in libapt-pkg, which needs global initialization.
    Libraries should not be doing the initialization, we're basically
    misusing it.

I remember that KiCad had problems with OpenSSL for this exact reason -- we were using libcurl from multiple threads from different plugins, and OpenSSL required us to initialize some locking mechanism from the KiCad main program so plugins could operate safely, breaking the abstraction.

For this reason, KiCad had a direct dependency on OpenSSL for years, even if libcurl was provided by libcurl-gnutls -- can't know whether libcurl pulls in openssl, so we need to initialize it.

We removed that code a while ago after the offending plugins were removed, and it seems the OpenSSL API has removed the CRYPTO_set_locking_functions call since then so there is a good chance that they've cleaned up a bit.

There are still some globals, but mostly for malloc replacements, so I guess these can be ignored.

   Simon

Reply via email to