-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Description
The testsuite has many so called internal tests, which link statically against libcrypto and/or libssl. All these internal tests are disabled for shared Windows builds, because the names of the static libraries collide with the names of the import libraries for the DLLs.
Lines 434 to 445 in f81b043
| # Internal test programs. These are essentially a collection of internal | |
| # test routines. Some of them need to reach internal symbols that aren't | |
| # available through the shared library (at least on Linux, Solaris, Windows | |
| # and VMS, where the exported symbols are those listed in util/*.num), these | |
| # programs are forcibly linked with the static libraries, where all symbols | |
| # are always available. This excludes linking these programs natively on | |
| # Windows when building shared libraries, since the static libraries share | |
| # names with the DLL import libraries. | |
| IF[{- $disabled{shared} || $target{build_scheme}->[1] ne 'windows' -}] | |
| PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test \ | |
| tls13encryptiontest wpackettest ctype_internal_test \ | |
| rdrand_sanitytest |
There has been some discussion about whether the static libraries should be renamed, but that is only an option for the next major release. I would like to suggest a temporary workaround which would be backportable to 1.1.1 and would enable us to activate all internal tests for shared Windows builds.
Instead of renaming the installed libraries, one could build additional static libraries (on windows only) to make the static tests depending on these. One does not even have to rename the static libraries, just place them in a separate directory (e.g. static\libcrypto.lib, static\libssl.lib), to distinguish them from the import libraries. These static libraries would only be used for the internal tests and not installed later on.
If building two library versions is undesired on this notoriously slow platform, then one could add a --static-tests option for windows, which is disabled by default.
References
This request originated from a discussion with @levitte in #7462, see in particular