-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
chapel: resolve failures in mac m1 #107405
chapel: resolve failures in mac m1 #107405
Conversation
What failures on M1 are you referring to? Does this require This will fail |
Chapel build fails with |
The error that Bhavani listed above is occurring M1 installs of the chapel bottle. Our local builds are not encountering this issue and feel that it should be regenerated to resolve the issue. As for the addition of the head tag as something we could do to facilitate better testing of our package, but did not consider the issues with failing audit. |
You can add diff --git a/Formula/chapel.rb b/Formula/chapel.rb
index 6b20db9a0d2..fd3881e9067 100644
--- a/Formula/chapel.rb
+++ b/Formula/chapel.rb
@@ -4,6 +4,7 @@ class Chapel < Formula
url "https://github.com/chapel-lang/chapel/releases/download/1.27.0/chapel-1.27.0.tar.gz"
sha256 "558b1376fb7757a5e1f254c717953f598a3e89850c8edd1936b8d09c464f3e8b"
license "Apache-2.0"
+ head "https://github.com/chapel-lang/chapel.git", branch: "main"
bottle do
sha256 arm64_monterey: "47e7d368c685aed62e699dbb9e87a881ab7d6a65873425b10d83d58458b62557" Could you elaborate on when this failure started? What caused it? Adding We should also update the test to catch the failure. |
Unfortunately, we don't have answers to either of those questions. We found the error when one of our team members updated their homebrew setup at the end of July. It appears to only affect M1 systems. There is some known issues with how we handle the paths to build tools and we have a PR for that fix going in for our 1.28 release. As for the need to rebuild, our team believes a rebuild of the bottle will resolve the path issues, and I will say that I was not aware that simply changing the revision would do that. More pushups for Tim. We do want to add the head tag to facilitate some automated testing we are working to get setup internally and will move it to the location you suggested. We will also work on the updated tests to help catch this error. Thanks for your assistance... |
Here's the patch that you need: diff --git a/Formula/chapel.rb b/Formula/chapel.rb
index 6b20db9a0d2..16c1148f7d9 100644
--- a/Formula/chapel.rb
+++ b/Formula/chapel.rb
@@ -4,6 +4,8 @@ class Chapel < Formula
url "https://github.com/chapel-lang/chapel/releases/download/1.27.0/chapel-1.27.0.tar.gz"
sha256 "558b1376fb7757a5e1f254c717953f598a3e89850c8edd1936b8d09c464f3e8b"
license "Apache-2.0"
+ revision 1
+ head "https://github.com/chapel-lang/chapel.git", branch: "main"
bottle do
sha256 arm64_monterey: "47e7d368c685aed62e699dbb9e87a881ab7d6a65873425b10d83d58458b62557" |
Also: Please use the preferred commit-message style for homebrew/core. We put the name of the formula first in commit-message headings. For new formulae:
For existing formulae:
Refer to the commit style guide for more details. Also, when making further changes to your pull request, use the following guidelines to make sure that @BrewTestBot can merge your commits:
|
Thanks carlocab! I will make the suggested changes |
I've made a PR for Chapel to try to avoid the problem in the future: chapel-lang/chapel#20385 . From that PR description:
In particular, we had saved I have not checked the situation on linuxbrew but I think that it's very likely that the GCC 12 upgrade is running into a similar issue (see also #106755 (comment) ). |
Thanks for the explanation, @mppf. It seems like If you tell me where the |
Yes we are using On my system, the relevant In any case this |
Signed-off-by: bhavanijayakumaran <82669529+bhavanijayakumaran@users.noreply.github.com>
Or, maybe to make it simpler, since we run That will cause the test to fail when any of the dependencies change prompting us to rebuild. |
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.
Ok to merge now since this helps fix existing problems.
However, I'd like to see a follow up that:
- Fixes the
test
to catch this breakage - Fixes the
install
so that we don't hardcode fragile Cellar paths
🤖 A scheduled task has triggered a merge. |
@carlocab - thanks. I did have one question about this
Wasn't the Chapel test already failing e.g. in PR #106755 ? Is the issue just that the fact that Chapel needed a rebuild was totally unclear from the error message? From the CI test run for that PR I see this
which is the failure caused by the path no longer being present. The fact that the error looks like a problem with |
Move override-ld to printchplenv This PR addresses a future work item left by PR #18880. In particular, historically we have saved the linker to use in a file `override-ld` and then the LLVM backend reads this file and uses the selected linker in order to link the binary. We recently observed some problems with this strategy in the context of Homebrew. The Homebrew Chapel package had this `override-ld` file referring to clang in a particular location; but the Homebrew clang package was upgraded and clang was no longer available at that location. (See also Homebrew/homebrew-core#107405 ). So, this PR moves the `override-ld` logic to something supported by the chplenv Python scripts. One wrinkle with that is that the Makefile logic was using `GASNET_LD_REQUIRES_MPI` but that variable is not stored in the Gasnet .pc file that is used by the chplenv scripts in LLVM compilation. So, this PR uses the approximation of determining `GASNET_LD_REQUIRES_MPI` by searching for `mpi` in the `GASNET_LD` command name. Additionally, while debugging the issue, I noticed some odd things about the error handling within `executeAndWait`, so this PR cleans that function up a bit as well. It also removes some arguments to that function that aren't really necessary. It adds a C++ dyno test of this function to make sure the return value of the function is 0 when the command runs and something other than 0 when the command does not exist. The chpl-env-gen.h needed some adjustment to work with this change so I tidied it up to stop filtering out environment variables that often have characters that can't be in a `#define` and instead to use a more comprehensive pattern when replacing such characters with `_`. Future Work: * include https://bitbucket.org/berkeleylab/gasnet/pull-requests/554 in our bundled GASNet to actually use `GASNET_LD_REQUIRES_MPI` in the logic to match the previous behavior. Reviewed by @arezaii - [x] full local testing - [x] XC gasnet+aries testing - [x] XC ugni testing - [x] XC mpi testing - [x] Mac OS X testing - [x] testing Hello world on a real ibv system
Signed-off-by: bhavanijayakumaran 82669529+bhavanijayakumaran@users.noreply.github.com
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?