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

Re: ./configure fails to link test program due to missing dependencies

From
Eli Schwartz <eschwartz93@gmail.com>
Date
Sep 24, 2024, 14:31 UTC
Message-ID
<b28b1256-01bc-46a3-8338-e47f2301eccf@gmail.com>
In-Reply-To
<xmqqldzsrhyp.fsf@gitster.g>
On 9/15/24 12:37 PM, Junio C Hamano wrote:
Show 11 quoted lines
> Looking at configure.ac, pkg-config is not used for any package.
> Specifically for curl, it seems that "curl-config --libs" is used.
> 
> Presumably the reason behind the current behaviour is combination of
> (1) ./configure is an after-thought in the build infrastructure for
> this project, (2) pkg-config was not ubiquitous back when autoconf
> support was written for this project, and (3) nobody considered
> "upgrading" our use of "curl-config" and our manual detection of
> dependency detection for other libraries to just use "pkg-config".
> 
> Patches welcome ;-)
As an aside: I am skeptical of this explanation.

pkg-config's first git commit in 2005 is an import of a 2001 commit from another version control system (probably GNU Arch -- author "Arch Librarian"). The changelog it includes starts a year earlier, in 2000. Wikipedia agrees, claiming the initial release of pkg-config was in 2000 and citing gtk-devel mailing list discussions from June of that year.

git added a configure.ac script 6 years later. Curl itself had installed a .pc file for 7 months at that time, and OpenSSL had installed one for nearly 4 years.

But git's configure script looked -- and still looks -- for -lcurl only to set NO_CURL for the Makefile. In 2018, ./configure started using curl-config, in order to set CURL_LDFLAGS.

I suppose it was copied by rote from the Makefile, which has less flexibility to try pkg-config and fall back to curl-config.

Part 1 of the explanation is valid: ./configure was an after-thought. :)
-- 
Eli Schwartz
Gentoo Developer and Meson Build maintainer
Previous: Paul Smith
Message 31 of 31 in “./configure fails to link test program due to missing dependencies”
  1. Henrik HolstSep 14, 2024
  2. Junio C HamanoSep 15, 2024
  3. brian m. carlsonSep 15, 2024
  4. Patrick SteinhardtSep 16, 2024
  5. Phillip WoodSep 18, 2024
  6. Junio C HamanoSep 18, 2024
  7. Patrick SteinhardtSep 24, 2024
  8. Eli SchwartzSep 24, 2024
  9. Paul SmithSep 24, 2024
  10. Patrick SteinhardtSep 25, 2024
  11. Eli SchwartzSep 25, 2024
  12. Patrick SteinhardtSep 25, 2024
  13. Phillip WoodSep 26, 2024
  14. Patrick SteinhardtSep 26, 2024
  15. Phillip WoodSep 27, 2024
  16. Eli SchwartzSep 26, 2024
  17. phillip.wood123@gmail.comSep 27, 2024
  18. Junio C HamanoSep 26, 2024
  19. Johannes SchindelinSep 29, 2024
  20. Eli SchwartzSep 29, 2024
  21. Phillip WoodSep 30, 2024
  22. Eli SchwartzSep 30, 2024
  23. Junio C HamanoSep 30, 2024
  24. Johannes SchindelinSep 30, 2024
  25. Patrick SteinhardtSep 25, 2024
  26. Patrick SteinhardtSep 25, 2024
  27. Junio C HamanoSep 24, 2024
  28. Paul SmithSep 25, 2024
  29. Eli SchwartzSep 26, 2024
  30. Paul SmithSep 26, 2024
  31. Eli SchwartzSep 24, 2024

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.