git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Facing error in git-imap-send while compiling Git

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2020, 19:20 UTC
Message-ID
<xmqqmuaf70xx.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2001212144560.46@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 44 quoted lines
>> From my limited knowledge of OpenSSL libraries, I think the error has
>> more to do with 'SSL_library_init()' , which appears like a
>> constructor to the OpenSSL library. I found these emails regarding
>> "if" cases around this function. Please check out these patches:
>> 1. Rosen Penev:
>> https://lore.kernel.org/git/20181227023548.396-1-rosenp@gmail.com/
>
> I remember that one. And I agreed with Junio that the documentation
> suggests that the call is _optional_, while the patch suggests that it
> would be _incorrect_ instead.
>
> And looking at
> https://www.openssl.org/docs/man1.1.1/man3/SSL_library_init.html suggests
> to me that it is still supported.
>
> Having said that, if I look at the headers installed for `libssl-dev`
> version `1.1.1-1ubuntu2.1~18.04.5` in my Ubuntu installation, I see that
> `/usr/include/openssl/ssl.h` defines that symbol as:
>
> 	#  define SSL_library_init() OPENSSL_init_ssl(0, NULL)
>
> but _only_:
>
> 	# if OPENSSL_API_COMPAT < 0x10100000L
>
> So maybe that disagrees with the documentation that says that
> SSL_library_init() is optional?
>
> The curious thing is that `OPENSSL_API_COMPAT` is not even defined
> anywhere. So maybe it _is_ the right thing to also `#define
> SSL_library_init() (void)` in the diff you listed above?
>
> _Maybe_ guarded within `#ifndef SSL_library_init ... #endif` guards?
>
>> 2. eroen: https://lore.kernel.org/git/20170112104219.563497-1-git-scm@occam.eroen.eu/
>
> That sounds like a good suggestion, too.
>
>> Are the fixes made in these patches relevant here. Please let me know
>> if I'm going wrong.
>
> Yes, both threads are relevant, and if you can reconcile them into a patch
> that makes Git compile with OpenSSL v1.1.1, I will try my best to review
> them (Cc: me, just in case).

I agree with the above reasoning and the suggestion given by Bates in https://lore.kernel.org/git/66967e0e-8bd9-f4b6-d2d4-ccce9004f42e@nottheoilrig.com/ sounds like a reasonable one.

Thanks for digging and double-checking these two previous efforts, and giving another round of thoughts on them.

Previous: Johannes SchindelinNext: Nirmal Khedkar
Message 10 of 14 in “Facing error in git-imap-send while compiling Git”
  1. Nirmal KhedkarJan 16, 2020
  2. Junio C HamanoJan 16, 2020
  3. Nirmal KhedkarJan 17, 2020
  4. Johannes SchindelinJan 17, 2020
  5. Nirmal KhedkarJan 20, 2020
  6. Johannes SchindelinJan 20, 2020
  7. Nirmal KhedkarJan 21, 2020
  8. Junio C HamanoJan 21, 2020
  9. Johannes SchindelinJan 21, 2020
  10. Junio C HamanoJan 22, 2020
  11. Nirmal KhedkarJan 30, 2020
  12. Beat BolliJan 30, 2020
  13. Johannes SchindelinFeb 1, 2020
  14. Nirmal KhedkarFeb 15, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.