-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
gcc-arm-embedded 9-2019-q4-major (new formula) #46584
Conversation
So I've run into a bit of a problem. I changed all of the resources into
Do either of those sound appropriate? Or if you have any other suggestions those would be welcome as well. Thanks! |
Generally you should be able to tell a build script where it can find dependencies. If this is not the case here, please file an issue or pull request upstream suggesting to change that. If that doesn't work you might want to replace the paths in the build script instead using inreplace in the formula. |
It looks like the URL has changed as well. trying to use this results in
|
It seems there was some problem on their end (bug report). I'll update with the new URL when I push the changes for the dependencies. I'll try to do that tonight or tomorrow. |
Last message says the problem was fixed. |
Correct, they fixed it and the URL is now different. |
This formula installs the GNU Arm Embedded Toolchain for Arm Cortex-M and Cortex-R processors. This used to be included in Homebrew Cask but was removed because according to Homebrew policy, the binaries should be built and not simply linked to, since it is an open-source CLI tool (Homebrew#56802).
34b40c3
to
86fb3cd
Compare
depends_on "mpfr" | ||
|
||
def install | ||
ENV.deparallelize |
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.
All the components (binutils, gcc) should build fine in parallel. What is the problem?
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.
The build fails when it is run in parallel like this. There are specific makefiles that can be run in parallel and the build will succeed on Catalina, but not on High Sierra and Mojave if they use APFS. This bug seems to be related to an APFS issue that looks like it is fixed on Catalina.
I referenced this on a response to a prior change you requested (#46584 (comment)).
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.
I'm sorry, we have some many PRs open, it's sometimes hard to keep track. Right now, a 4-hour build for a formula with minor usage is not something we can have in Homebrew core, I'm sorry.
Regarding parallel building, if you go to the GCC bugzilla issue, you'll see it was reported by me, actually… 😄 and it was fixed, so it should definitely not be an issue anymore. We build many GCC versions in parallel, in the gcc*
formulas.
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.
I didn't even realize that lol! What're the odds. And I understand, I do think this formula would get some usage due to the gcc arm embedded compiler being needed for compiling CircuitPython, but I see your point. I am hoping I can get this formula to a place that is acceptable as it would be my first formula contribution, which is somewhat exciting.
I will change the formula and put back the inreplace
for parallel building. However, I cannot test this on my own machine for the High Sierra and Mojave builds. So I will just have to see what happens with the test bot. Is this okay?
|
||
test do | ||
# 'error Unsupported architecture' is thrown by XCode preprocessor, removing CPATH fixes this | ||
ENV.delete "CPATH" |
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.
How about a simpler test? Compiling a simple C program, for example.
After 4 hours, I killed the CI job. Non-parallel make is not going to be acceptable. |
- Add parallel execution for makefiles.
Killed again, please fix the parallel build before pushing again @dunkmann00 |
The last commit did address the parallel build. While it didn't make everything run in parallel, it would make most of the build do so. When I build it on my machine it takes around 1.5 hours. If the amount of time that it takes the test bot is unacceptable then I am not sure how to proceed. I understand you don't want certain builds occupying too much of the test bot's time, but I waited until the build queue was empty, and this is not a formula that would be updated frequently. I kindly request for you to allow it to run for a little while longer? If this is not something you are willing to allow I would like to ask if it would once again be acceptable to add the formula for a prebuilt version of the gcc arm embedded toolchain into homebrew-cask? I reference this issue in my original pull request comment and I will reference it here again for convenience Homebrew/homebrew-cask#56802 |
It still defines that it should not be running in parallel as the first line in the install block. @fxcoudert opinions? |
Apparently it still uses parallelisation inside. @BrewTestBot test this please I'm still concerned about the fragility of this formula, but… given the effort, probably it is worth merging. |
The high-sierra build failed with:
|
I killed the build to free up some CI time for other things. High-Sierra failed (see above), and Catalina and Mojave were running for more than 3 hours, so I think it's better to fix the first failure first. I also find the 3 hours build time suspicious. Even building llvm from source takes less time. |
I am new to homebrew. I use these toolchains in binary form from a lot. I was excited to use brew to install this toolchain. But there wasn't a cask/formula to do so. Wanting to learn by doing, I thought maybe I'd have a go. But it turns that @dunkmann00 was ahead of me. But the logic seems really circular. There's apparently a bit of complexity about getting this built right. But somebody else already does that job and makes a binary available. It used to be a cask. But then it got removed and turned into a formula. But the formula's not ready. As a newcomer, I was a bit surprised to find this kind of pedanticism. I'm used to that in the Debian world of 10 years ago. Anyway, when in Rome... so... can I help this effort in anyway? Can I at least test this formula and benefit from it in it's not-yet-approved state? I am running Catalina... |
You can always make a tap where you keep this formula as it currently is, or where you distribute the binary form. But for it to be in the core tap it needs to build in parallel and needs to fix the failures. |
I did the
|
We have a bit more CI time so I’ve restarted the build. |
At this stage, it seems the build is too fragile, and too specific, for us to maintain in Homebrew core. The software was added back as a cask: Homebrew/homebrew-cask#75091 |
This formula installs the GNU Arm Embedded Toolchain for Arm Cortex-M
and Cortex-R processors. This used to be included in Homebrew Cask but
was removed because according to Homebrew policy, the binaries should be
built and not simply linked to, since it is an open-source CLI tool
(Homebrew/homebrew-cask#56802).
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 <formula>
)?