-
Notifications
You must be signed in to change notification settings - Fork 13
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
Change here-string bashism to POSIX echo #14
base: amd-fftw
Are you sure you want to change the base?
Conversation
Hi @jeroen-mostert , We will check on this and get back to you.
2)Generate a different build of the library based on the configure command 3)Run "make small check" , "make check" "make big check" Please share/attach the results in this PR itself. Thanks |
Alright, I have a few issues with this, so fasten your seat belts. :) If this is a "standard practice", it's probably a good idea to actually write that down somewhere in a guide for contributors. Of course it's even better to have a build pipeline for it, but that's another kettle of fish. It is not possible to run There is no I also assume that by "share the results" you mean sharing the confirmation that the tests passed, and not the entire output of all tests, as this runs in the megabytes for I suggest the following sequence of commands as a sanity check instead, building all precisions with a reasonable set of options that apply:
After each of these, it should be verified that these messages appeared:
Even this takes a substantial time on the first compile, but And yes, to be complete: I have verified my changes pass these tests, trivial as they are. :P |
Thank for your detailed enthusiastic response. We are planning to publish a guide for contributors pretty soon and also add a CI pipeline in the near future. A few combinations of configure options are not permitted for use together and the user shall avoid them based on the error message. In my previous message, I missed to remove space from "make small check" and "make big check", but a general FFTW user would know. You can share the test completion status instead of the full logs. |
@@ -683,13 +683,13 @@ if test "$have_amd_opt" = yes && test "${enable_debug+set}" != "set" && test "$I | |||
fi | |||
SUBSTRCLANG='clang' | |||
SUBSTRGCC='gcc' | |||
if grep -q "$SUBSTRCLANG" <<<"$CC"; then | |||
if echo "$CC" | grep -q "$SUBSTRCLANG"; then | |||
if [[ -z "${AMD_ARCH}" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren’t [[
/]]
bashism as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're quite right. To be fair I spent exactly as much effort as needed to get things to run on a distro that used dash for sh and nothing more, and the clang branch was never hit. If I have copious free time I can check the whole file for bashisms (shellcheck
does not pick up on this, for some reason).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully these bashism stuffs can be found in Ubuntu GitHub Actions once implemented.
The
<<<
syntax is not POSIX and won't work on systems wheresh
cares about such niceties (mostly dash). Replace it with a simpleecho
to get things to work. Note that grepping the CC substring forgcc
andclang
is probably not a good way of doing these feature checks to begin with (and some flags are duplicated) sinceAX_CHECK_COMPILER_FLAGS
is a thing, but that's left as an exercise to the reader.Note that
configure
has to be regenerated withautoconf
before this sticks. I haven't made this part of my commit since it causes a lot of churn.