boinc icon indicating copy to clipboard operation
boinc copied to clipboard

[mac] buildcurl.sh requires bash without saying so / broken on macOS 10.15

Open brevilo opened this issue 4 years ago • 5 comments

Describe the bug buildcurl.sh requires bash it seems. That's a requirement which is neither explicitly stated AFAIK and which is also not a given on macOS 10.15 anymore as it (finally) uses zsh as default shell.

Steps To Reproduce

  1. Run buildcurl.sh in zsh

Expected behavior A working script (e.g. test for bash or don't use shell-specific code or run bash subshell)

System Information

  • OS: macOS 10.15 (or just zsh)
  • BOINC Version: master

brevilo avatar Feb 27 '20 09:02 brevilo

What issues have you found to lead you to believe that you can't still use bash? My understanding is that, even though zsh is now the default shell under OS 10.15 , you can still use bash, and that bash is used if the script begins with #!/bin/bash. I also understand that zsh is mostly (though not completely) compatible with bash. Please see this.

CharlieFenton avatar Feb 27 '20 11:02 CharlieFenton

lead you to believe that you can't still use bash

No, I said the script fails in zsh, so one has to switch to bash manually to get it working again, which is what I did, of course. So as it is right now, a casual 10.15 user with its default shell will get a build failure. I described my expectations in "Expected behavior". IOW, the script itself should deal with that and be effectively shell-agnostic.

brevilo avatar Feb 27 '20 14:02 brevilo

bash is used if the script begins with #!/bin/bash

You sure that's the case when you source a script (the documented BOINC way) instead of executing it?

(sorry for the late update but GitHub is just broken today)

brevilo avatar Feb 27 '20 17:02 brevilo

I booted into my OS 10.15.3 partition, and I can confirm that the setupForBOINC.sh script (which invokes buildcurl.sh) fails when I set zsh as my standard shell. I had not seen this before because when I installed OS 10.15, I migrated my settings from an earlier version of OS X, so bash remained my default / standard shell.

I also encountered a build error for wxWidgets 3.1.0, even when using bash, which I have not seen on earlier versions of OS X, apparently because the headers HIWebView.h and CarbonUtils.h have been removed from the WebKit framework in the Mac OSX 10.15.sdk in Xcode 11 . So that is another issue (though only for building BOINC Manager, not for building the BOINC libraries.)

CharlieFenton avatar Feb 28 '20 10:02 CharlieFenton

I also encountered a build error for wxWidgets 3.1.0

Just for completeness for others reading this: that's dealt with in #3476

brevilo avatar Mar 03 '20 09:03 brevilo