git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Smith <paul@mad-scientist.net>
To: Git List <git@vger.kernel.org>
Subject: Git configure with static curl is failing
Date: Sun, 26 Apr 2020 15:01:54 -0400	[thread overview]
Message-ID: <9d9fe8376e47a9f5330cd644c76d96987fc67c57.camel@mad-scientist.net> (raw)

Hi all;

I'm trying to build Git with my own static curl, not the system curl,
and this isn't working due to an issue in configure.ac's curl locating
code.

I invoke configure with --with-curl=/other/curl where
/other/curl/include/curl and /other/curl/lib/libcurl.a and
/other/curl/bin/curl-config all exist and work correctly.

When configure.ac attempts to local curl, it fails; config.log shows:

  configure:5387: my-gcc -o conftest -O2 \
   -I/other/curl/include -L/other/curl/lib conftest.c -lcurl >&5
  /other/curl/lib/libcurl.a(libcurl_la-content_encoding.o):content_encoding.c:function gzip_init_writer: error: undefined reference to 'zlibVersion'

and many other errors, because the link line is missing needed
libraries.  If curl as a .so this wouldn't matter since libcurl.so
would contain references to the libraries it needs and ld.so would
handle this, but a static library obviously doesn't have that.

The problem appears to be that configure.ac is not using curl-config to
obtain the correct options to link with curl.  If I run
/other/curl/bin/curl-config --lib I get the proper flags:

  $ /other/curl/bin/curl-config --libs
  -L/other/curl/lib -lcurl -lssl -lz -lcrypto -ldl -lpthread

If configure.ac tried to use $CURLDIR/bin/curl-config --libs to obtain
the right linker options, then the link test for curl would work.


             reply	other threads:[~2020-04-26 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 19:01 Paul Smith [this message]
2020-04-26 19:47 ` Git configure with static curl is failing brian m. carlson
2020-04-26 23:14   ` Jeff King
2020-04-29  1:47     ` Paul Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d9fe8376e47a9f5330cd644c76d96987fc67c57.camel@mad-scientist.net \
    --to=paul@mad-scientist.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).