You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rev_news/drafts/edition-118.md
+132-2Lines changed: 132 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,139 @@ This edition covers what happened during the months of November and December 202
25
25
### Reviews
26
26
-->
27
27
28
-
<!---
29
28
### Support
30
-
-->
29
+
30
+
+[./configure fails to link test program due to missing dependencies](https://lore.kernel.org/git/GV1PR02MB848925A79A9DD733848182D58D662@GV1PR02MB8489.eurprd02.prod.outlook.com/)
31
+
32
+
Last September Henrik Holst reported an issue when trying to compile
33
+
Git 2.44.0 with HTTPS/curl support on LFS 12.1. The 'configure' script
34
+
failed to detect libcurl's dependencies properly when trying to link
35
+
statically.
36
+
37
+
The issue occurred because the 'configure' script only used the
38
+
`-lcurl` build flag without running `pkg-config --libs libcurl` to
39
+
add build flags for dependencies like `zstd` that libcurl
40
+
needs. Henrik found that manually setting the LDFLAGS environment
41
+
variable to include build flags for all dependencies (like `-lcurl
42
+
-lssl -lcrypto -lzstd -lbrotlidec -lz`) allowed the build to
43
+
succeed. This sparked a broader discussion about Git's build system
44
+
situation.
45
+
46
+
Looking at 'configure.ac', Junio Hamano, the Git maintainer, noted
47
+
that `pkg-config` isn't used at all, instead `curl-config --libs` is
48
+
used to detect curl's flags. Even if the 'configure' script was
49
+
added early in the history of the Git project, Junio said it was an
50
+
afterthought and nobody has considered "upgrading" from
51
+
`curl-config` to `pkg-config` for dependency detection.
52
+
53
+
In fact, our own Jakub Narębski
54
+
[initially added the 'configure' script](https://lore.kernel.org/git/200607030156.50455.jnareb@gmail.com/)
55
+
back in 2006 to make it much easier to create RPM spec files when
56
+
compilation follows traditional `configure && make && make install`
57
+
steps.
58
+
59
+
brian m. carlson replied to Junio that users shouldn't statically
60
+
link libcurl or OpenSSL at all, as this creates security issues.
61
+
With static linking, security updates to these libraries would
62
+
require recompiling Git to take effect. In contrast, dynamic linking
63
+
allows security updates to be applied as soon as a new Git process
64
+
is spawned.
65
+
66
+
Patrick Steinhardt replied to Junio suggesting it might be time to
67
+
reconsider Git's three build systems
68
+
([GNU Make](https://www.gnu.org/software/make/),
69
+
[Autoconf](https://www.gnu.org/software/autoconf/), and
70
+
[CMake](https://cmake.org/)). He proposed potentially dropping
71
+
Autoconf and making CMake officially supported, or switching to
72
+
[Meson](https://mesonbuild.com/) as an alternative.
73
+
74
+
CMake was [added more recently in 2020](https://lore.kernel.org/git/pull.614.git.1587700897.gitgitgadget@gmail.com/)
75
+
by Sibi Siddharthan as a third build system with the main goal of
76
+
improving the build experience for developers on Windows.
77
+
78
+
Soon after Patrick's reply, the Git Contributors' Summit happened
0 commit comments