git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ./configure fails to link test program due to missing dependencies
@ 2024-09-14 22:57 Henrik Holst
  2024-09-15 16:37 ` Junio C Hamano
  0 siblings, 1 reply; 31+ messages in thread
From: Henrik Holst @ 2024-09-14 22:57 UTC (permalink / raw)
  To: git@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-09-30 16:31 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 22:57 ./configure fails to link test program due to missing dependencies Henrik Holst
2024-09-15 16:37 ` Junio C Hamano
2024-09-15 16:47   ` brian m. carlson
2024-09-16  7:50   ` Patrick Steinhardt
2024-09-18 10:04     ` Phillip Wood
2024-09-18 22:39       ` Junio C Hamano
2024-09-24 12:10         ` Patrick Steinhardt
2024-09-24 13:59           ` Eli Schwartz
2024-09-24 14:25             ` Paul Smith
2024-09-25  4:36             ` Patrick Steinhardt
2024-09-25  6:02               ` Eli Schwartz
2024-09-25  6:04                 ` Patrick Steinhardt
2024-09-26 13:55                   ` Phillip Wood
2024-09-26 14:02                     ` Patrick Steinhardt
2024-09-27 10:10                       ` Phillip Wood
2024-09-26 16:04                     ` Eli Schwartz
2024-09-27 10:00                       ` phillip.wood123
2024-09-26 16:22                     ` Junio C Hamano
2024-09-29 17:56                       ` Johannes Schindelin
2024-09-29 18:10                         ` Eli Schwartz
2024-09-30  8:50                           ` Phillip Wood
2024-09-30 13:57                             ` Eli Schwartz
2024-09-30 16:31                               ` Junio C Hamano
2024-09-30 16:05                             ` Johannes Schindelin
2024-09-25 19:15                 ` Patrick Steinhardt
2024-09-25 19:17                   ` Patrick Steinhardt
2024-09-24 17:39           ` Junio C Hamano
2024-09-25 15:33             ` Paul Smith
2024-09-26  1:35               ` Eli Schwartz
2024-09-26 19:42                 ` Paul Smith
2024-09-24 14:31   ` Eli Schwartz

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).