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

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

From
HHHenrik Holst <henrik.holst@outlook.com>
Date
Sep 14, 2024, 22:57 UTC
Message-ID
<GV1PR02MB848925A79A9DD733848182D58D662@GV1PR02MB8489.eurprd02.prod.outlook.com>
Hej and hello!
I am tinkering with LFS 12.1 and I ran into a problem to compile git 2.44.0 with https/curl support due to an error in the ./configure script for the libcurl detection.
The relevant section of config.log:

configure:5462: checking for curl_global_init in -lcurl configure:5485: gcc -o conftest -g -O2   conftest.c -lcurl   >&5 /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../lib/libcurl.a(libcurl_la-content_encoding.o): in function `zstd_do_close': content_encoding.c:(.text+0x78): undefined reference to `ZSTD_freeDStream' /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.0/../../../../lib/libcurl.a(libcurl_la-content_encoding.o): in function `zstd_do_write': content_encoding.c:(.text+0x112): undefined reference to `ZSTD_decompressStream' /usr/bin/ld: content_encoding.c:(.text+0x11a): undefined reference to `ZSTD_isError' ...

If I set LDFLAGS to whatever pkg-config --libs libcurl says on my system (actually: -lcurl -lssl -lcrypto -lzstd -lbrotlidec -lz) then it compiles just fine. If I add LDFLAGS to the configure environment it will accept that test, and then detect, as expected, the pkg-config settings for libcurl.
Should not ./configure FIRST check for a pkg-config environment without assuming that even the most trivial curl programs should compile without any additional dependencies like zstd etc?
Thank you for your help and have a great weekend!
Henrik Holst

[System Info] git version: git version 2.44.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh compiler info: gnuc: 13.2 libc info: glibc: 2.39 $SHELL (typically, interactive shell): /usr/bin/fish

[Enabled Hooks] not run from a git repository - no hooks to show

Next: Junio C Hamano
Message 1 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.