Subject: RE: [ANNOUNCE] Git v2.36.0-rc0 - Build failure on NonStops

From: <[email-masked]>
Date: Mon, 4 Apr 2022 22:59:54 -0400

On April 4, 2022 8:54 PM, Carlo Marcelo Arenas Belón wrote:
>On Mon, Apr 04, 2022 at 05:26:10PM -0700, Carlo Marcelo Arenas Belón wrote:
>> On Mon, Apr 04, 2022 at 06:40:35PM -0400, [email-masked] wrote:
>> > On April 4, 2022 6:33 PM, Junio C Hamano wrote:
>> > >To: Randall S. Becker <[email-masked]>
>> > >Cc: Git Mailing List <[email-masked]>;
>> > >[email-masked]
>> > >Subject: Re: [ANNOUNCE] Git v2.36.0-rc0 - Build failure on NonStops
>> > >
>> > >CSPRNG_METHOD?
>> >
>> > We already have
>> >
>> >         CSPRNG_METHOD = openssl
>> >
>> > In the config for NonStop. Should that not have worked?
>>
>> only if you are not telling your openssl to hide that function[1]
>>
>> Carlo
>>
>> [1] https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html
>
>neverming, it seems we forgot to track this header somehow, so will need
>something like (untested and likely to need changes to support NO_OPENSSL)
>
>Carlo
>--- >8 ---
>diff --git a/git-compat-util.h b/git-compat-util.h index 4d444dca274..68a9b9cd975
>100644
>--- a/git-compat-util.h
>+++ b/git-compat-util.h
>@@ -525,6 +525,10 @@ void warning_errno(const char *err, ...)
>__attribute__((format (printf, 1, 2)));  #include <openssl/x509v3.h>  #endif /*
>NO_OPENSSL */
>
>+#ifdef HAVE_OPENSSL_CSPRNG
>+#include <openssl/rand.h>
>+#endif
>+
> /*
>  * Let callers be aware of the constant return value; this can help
>  * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,

I was able to make the build work, adding the above patch and libcrypto.so and libssl.so to our LDFLAGS. This patch is probably required. What confuses me somewhat is why RAND_bytes is required for anything in the fsync series, but it is what it is.

If there is a knob for force -lcrypto and -lssl in config.mak.uname, it would help. The CSPRNG_METHOD=openssl should be forcing these two libraries into the link, I would think. The DLLs do show up in other links, so I am suspecting there is an omission somewhere that includes the git-daemon link.

The test cycle has begun, but that will take at least 40 hours on an ia64 to get complete results.

--Randall