Commit b4addc2
Bootstrap libltdl to fix libtool v2.4 + automake v1.17 (#1900)
Bootstrap libltdl to fix libtool v2.4 + automake v1.17 build
gmake[3]: Entering directory .../libltdl
.../cfgaux/missing: line 85: aclocal-1.16: command not found
gmake[3]: *** [Makefile:561: .././../libltdl/aclocal.m4]
Error 127
During bootstrap.sh run, libtoolize copies prepackaged
configure and Makefile.in files into our libltdl directory:
* libltdl/configure from libtool v2.4 has aclocal version set
to 1.16;
* libltdl/Makefile.in from libtool v2.4 uses
configure-set aclocal version to build aclocal.m4
Thus, libltdl/Makefile (generated from libltdl/Makefile.in
above) runs aclocal-1.16 if "make" needs to build
libltdl/aclocal.m4.
Normally, "make" does not need to build libltdl/aclocal.m4
because that file was created by libtoolize. However, libtool
v2.4 is packaged with (generated by packaging folks)
libltdl/Makefile.in that makes libltdl/aclocal.m4 target
dependent on files in libltld/../m4 directory. Squid does not
have that ./m4 directory, so "make" attempts to re-generate
libltdl/aclocal.m4. When it does, it uses aclocal-1.16.
Our bootstrap.sh generated new ./configure but preserved
copied libltdl/configure with its aclocal version set to
1.16. In other words, our bootstrap.sh did not bootstrap
libltdl sub-project. In build environments without
aclocal-1.16, Squid build failed.
Several solutions or workarounds have been tried or
considered:
* Adjust bootstrap.sh to bootstrap libltdl (this change).
2008 attempt to do that was reverted in commit bfd6b6a with
"better to fix libtool installation" rationale. Another
potential argument against this option is that packages
should be bootstrapped by their distributors, not "users". We
are not distributing libtool, but this is a gray area because
we do distribute files that libtoolize creates. Finally,
libtool itself does not provide a bootstrapping script and
does not explicitly recommend bootstrapping in documentation.
* "Fix libtool installation". We failed to find a good way to
do that on MacOS (without building and installing newer
libtool from sources).
* Place m4 files where libtool v2.4 expects to find them.
That change fixes MacOS builds that use automake v1.17, but
breaks Gentoo builds because Gentoo libtool installs a buggy
libltdl/Makefile.in that must be regenerated by automake
before it can work. Fixing m4 files location prevents that
regeneration.
We picked the first option despite its drawbacks because the
third option did not work on Gentoo, and asking Squid
developers to install libtool from sources (i.e. the second
option) felt like a greater evil.
This old problem was exposed by recently introduced CI MacOS
tests that started to fail when MacOS brew updated automake
package from v1.16 without the corresponding libtoolize
package changes.
Also work around what seems to be a libtool packaging bug
affecting MacOS/brew environments, including GitHub Actions
runners we use for CI:
libtool (2.4.7) : glibtool libtool path :
/opt/homebrew/bin Bootstrapping glibtoolize: error:
creating 'libltdl/configure.ac' ... failed glibtoolize:
error: creating 'libltdl/configure' ... failed glibtoolize
failed
That workaround will be removed after libtool package is
fixed.
Also removed a single-iteration "for dir" loop with several
stale hacks from bootstrap.sh: With only two directories to
bootstrap and with a directory-specific mkdir command, source
comments, and progress messages, it is best to unroll that
loop.
----
Backport of PR #18771 parent 0046ea6 commit b4addc2
1 file changed
+40
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
149 | 137 | | |
150 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
0 commit comments