bootstrap: Clean up use of gettextize
mkoeppe opened this issue · 33 comments
See discussion at
Homebrew/homebrew-core#53192
Instead of using gettextize at bootstrap time, we just vendor the files m4/iconv.m4 and config/config.rpath in the source tree.
This is done by using gnulib: gnulib-tool --import iconv (and ignoring all the other files that it is offering us).
CC: @dimpase
Component: build: configure
Author: Matthias Koeppe
Branch: d9bd946
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29549
Definitely not for 9.1.
Description changed:
---
+++
@@ -1,3 +1,6 @@
See discussion at
https://github.com/Homebrew/homebrew-core/issues/53192
+
+Instead of gettextize, we may want to use gnulib https://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
+(from dimpase on #27823)
Bruno Haible says on bug-autoconf that one should use gnulib's iconv module to install config.rpath etc. Indeed,
gnulib-tool --import iconv
will install config.rpath into config/ (among with other things that probably can be ignored).
So this is something to try in order to get rid of the hacky install_config_rpath() in comment:18
Unfortunately, gnulib is not present on homebrew (https://repology.org/project/gnulib/versions), so we should not try to use it in the bootstrap phase... Of course we can just commit the generated file -- it probably does not change so often.
Author: Matthias Koeppe
New commits:
318f58c | m4/iconv.m4, config/config.rpath: Import using gnulib-tool --import iconv |
Description changed:
---
+++
@@ -2,5 +2,8 @@
https://github.com/Homebrew/homebrew-core/issues/53192
-Instead of gettextize, we may want to use gnulib https://www.gnu.org/software/gnulib/manual/html_node/gettextize-and-autopoint.html
+Instead of using `gettextize` at bootstrap time, we just vendor the files `m4/iconv.m4` and `config/config.rpath` in the source tree.
+This is done by using gnulib: `gnulib-tool --import iconv` (and ignoring all the other files that it is offering us).
+
+Replying to @mkoeppe:
Unfortunately,
gnulibis not present onhomebrew(https://repology.org/project/gnulib/versions), so we should not try to use it in thebootstrapphase... Of course we can just commit the generated file -- it probably does not change so often.
any reason for gnulib not being on homebrew?
(anyhow, I'm testing this now).
Replying to @dimpase:
any reason for gnulib not being on
homebrew?(anyhow, I'm testing this now).
upstream says: just use git to get gnulib, as there is nothing to build.
https://lists.gnu.org/archive/html/bug-gnulib/2018-02/msg00041.html
Hmm, yes, we can in principle have gnulib installed as a git submodule...
Replying to @dimpase:
upstream says: just use git to get
gnulib, as there is nothing to build.
That's what I did, and I committed the result.
Branch pushed to git repo; I updated commit sha1. New commits:
2f9b436 | build/bin/write-dockerfile.sh: Copy config.rpath to container |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
e52fd00 | build/bin/write-dockerfile.sh: Copy config.rpath to container |
I tested this before the last 2 commits were added. Should they be tested with docker somehow?
It ran successfully at https://github.com/mkoeppe/sage/actions/runs/2561994135
Reviewer: Dima Pasechnik
ok, lgtm
Thanks!
When actually trying to use the generated confball I get (on OSX):
Using cached file /Users/buildbot-sage/worker/sage_git/build/upstream/configure-4b0180ea3fe0842fd17ffa15afa79dc3b4bf2cd0.tar.gz
config/install-sh: Skipping hardlink pointing to itself: config/install-sh
tar: Error exit delayed from previous errors.
The build seems to continue but skipping to untar a file is probably not good...
which tar?
Do use rdfind in this tree?
Branch pushed to git repo; I updated commit sha1. New commits:
d9bd946 | Makefile, bootstrap: Remove duplication of install-sh |
Can't reproduce without more detail but here's removing a duplication of install-sh as an argument to tar.
let me test this on macOS
lgtm - running ./bootstrap -s followed by /bootstrap -d works without warnings/errors.
Thanks!
Changed branch from u/mkoeppe/bootstrap__clean_up_use_of_gettextize to d9bd946