-
-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace bashisms in m4/sage_spkg_collect.m4, m4/sage_spkg_enable.m4, build/pkgs/*/spkg-configure.m4, src/bin/sage-env, build/make/Makefile.in #29345
Comments
comment:1
I agree in general - do you actually run this with a CONFIG_SHELL other than bash? Is the other configure code clean? |
comment:2
This should probably be done on top of #29287, which touches the same file |
comment:3
Things seem to run OK with dash if I comment out the part of configure.ac that forces bash. Of course I can't be sure that it works until I have a suggestion for how to fix |
comment:4
One way to address this is to make things a liitle more static (see #29114 - "Only ./bootstrap should glob build/pkgs"), also getting rid of GNU-make-isms and macrology in
|
Author: Michael Orlitzky |
Commit: |
Branch: u/mjo/ticket/29345 |
comment:6
The printf stuff is going to make anyone reading the code think we're stupid, but it works and didn't involve changing much code. I just completed a full build using |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:8
Nice on first glance. I'll be happy to do a full review after 9.1 is out |
comment:9
it's a bit in vain, as there are bashisms or just "bash required" in several Sage packages. |
comment:10
regarding newline, perhaps https://stackoverflow.com/questions/21880891/newline-character-in-posix-shell says something. |
comment:11
Replying to @dimpase:
Ultimately my goal is to not install any sage packages =) I'll always need bash installed for other stuff, but ./configure is noticeably faster with dash. It may be a "micro-optimization" but half of what I do lately is re-run ./configure. |
comment:12
Replying to @dimpase:
The suggestion there is to print a newline and a space at the end of each line, and then remove the space afterwards. Since all of the lines in question are indented, what I did instead was switch to printing a newline and some spaces at the beginning of each line -- that way the newline is still followed by spaces (and therefore doesn't get dropped), but the spaces aren't "extra" and don't need to be removed. |
comment:13
needs rebase. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:15
fixed, thanks |
comment:16
A interesting test (apart from using dash) would be to use ksh (on OpenBSD - trying this now for lolz) or zsh (the latter is the default on recent macOS, I am told). |
comment:17
./configure fails with
Since it was executed via /bin/sh, I think zsh is already in bourne-shell compatibility mode. |
comment:18
ksh also notices a stray break and prints a warning, no error. |
comment:19
with ksh/openbsd, the ugly hack in spkg-install of lrcalc does not work, as copied over config.status gets really confused, and complains about -cp "$SAGE_ROOT"/config/config.* .
+autoreconf -ivf |
Dependencies: 29098 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:42
That last one is just a rebase onto the rebase in #29098. |
Changed dependencies from 29098 to #29098 |
comment:44
oops, needs another rebase, over the beta0 that just came out. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Changed dependencies from #29098 to none |
comment:46
Done again. |
comment:47
lgtm |
Reviewer: Dima Pasechnik |
This comment has been minimized.
This comment has been minimized.
comment:49
rebased over 9.2.beta1 - making this critical, as we're approaching a rebase hell state with this ticket not merged for 4 weeks. Last 10 new commits:
|
Changed branch from u/mjo/ticket/29345 to public/build/29345rebased |
comment:50
0e66a0a is already merged on Volker's branch. |
Changed branch from public/build/29345rebased to u/mjo/ticket/29345 |
Changed branch from u/mjo/ticket/29345 to |
comment:53
Replying to @orlitzky:
no, lrcalc on OpenBSD is still broken due to this |
Changed commit from |
Autoconf scripts should be POSIX sh rather than bash, but there are a few bashisms in m4/sage_spkg_collect.m4 and m4/sage_spkg_enable.m4:
$'\n'
VAR+=VALUE
Some of these should be straightforward to fix. The format
can be changed to
since the newline is only used to make the
BUILT_PACKAGES
rule in the resulting Makefile look nice. Changing them to spaces doesn't change what the rule does. I'm not sure aboutand
though, because those are inserted verbatim into the Makefile as rules, and the newlines probably matter.
Upstream: Fixed upstream, in a later stable release.
CC: @dimpase @mkoeppe @embray @vbraun
Component: build: configure
Author: Michael Orlitzky
Branch:
0e66a0a
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29345
The text was updated successfully, but these errors were encountered: