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

Re: [PATCH] Makefile: Change library order for static linking

From
Remi Pommarel <repk@triplefau.lt>
Date
Sep 18, 2015, 07:17 UTC
Message-ID
<20150918071525.GA482@cruxbox>
In-Reply-To
<xmqq7fnoitra.fsf@gitster.mtv.corp.google.com>
On Thu, Sep 17, 2015 at 03:08:25PM -0700, Junio C Hamano wrote:
> That is, for most people, linking with -lcrypto was sufficient, but
> some people needed to grab things from -lssl when they need to do
> so, because things in -lcrypto referred to what was only in -lssl.

Oh I see what you mean, I misinterpreted what NEEDS_SSL_WITH_CRYPTO does.

The problem on static compiled target is that libcurl.a got linked with libssl symbols. The proper variable I should have used is NEEDS_SSL_WITH_CURL. But this variable is not setted on Linux and not configurable, this is why I wrongly used NEEDS_SSL_WITH_CRYPTO.

I see several ways to fix static compilation:
	1) Make NEED_SSL_WITH_CURL overridable by configure (the same
	way NEEDS_SSL_WITH_CRYPTO is). Then static target should run
	"NEED_SSL_WITH_CURL=YesPlease ./configure"
	2) Make configure know that static compilation is asked (ie
	./configure --static) and automatically set NEED_SSL_WITH_CURL.
	3) Use "curl-config --static-libs" to fill CURL_LIBCURL in
	Makefile when ones use "./configure --static".
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 10 in “Makefile: Change library order for static linking”
  1. Makefile: Change library order for static linkingRemi Pommarel, Sep 17, 2015
  2. Eric SunshineSep 17, 2015
  3. Remi PommarelSep 17, 2015
  4. Junio C HamanoSep 17, 2015
  5. Remi PommarelSep 17, 2015
  6. Junio C HamanoSep 17, 2015
  7. Remi PommarelSep 18, 2015
  8. Junio C HamanoSep 21, 2015
  9. Remi PommarelSep 22, 2015
  10. Junio C HamanoSep 22, 2015

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.