Fix ndless_installer_4.5 on macOS#200
Conversation
|
I'll try that later as I need to update my toolchain anyway and I previously made some changes about that... |
| OS_NAME := $(shell uname -s | tr A-Z a-z) | ||
| payload: ndless_installer.bin | ||
| (../tools/MakeChunkDispatch/MakeChunkDispatch 0x1800e7f4 0x12480000; cat $^) | base64 -w0 > $@ || rm $@ | ||
| ifeq ($(OS_NAME),darwin) |
There was a problem hiding this comment.
This should be done by using feature detection instead. base64 doesn't have/need the -w0 option on some Linux distros either.
|
I don't think the The |
|
So, I've been able to use So I guess your modifications aren't actually needed? Must be some configuration on your side, for brew etc. I don't believe I have anything special in my PATH to make it work... Regarding the base64 thing in installer-4.5, yeah, we need to have a solution properly, as it wouldn't work on macOS otherwise. Anyway, I agree with what @Vogtinator said, otherwise. |
Vogtinator
left a comment
There was a problem hiding this comment.
Can you drop the changes to build_toolchain.sh and make the installer-4.5/Makefile use feature detection? Then I'll merge.
|
@Vogtinator I believe I've done as you asked; I'm not 100% certain if my modification actually works. Notably, while rebuilding the toolchain on macOS to test my handiwork, I ran into the following issue: Removing |
|
That's probably due to the other recent changes, uh oh :p
|
|
when trying to compile my crummy code. I can at least say with confidence that the toolchain compiles successfully on macOS, once |
Yeah, I don't think
That means it was run as part of the rule command passed to
For autodetection of the compression algorithm, but that might not . Just to be sure, you didn't change anything other than |
Apparently, the tar macOS uses (BSD tar) always auto detects compression formats without any special parameters: https://www.freebsd.org/cgi/man.cgi?tar(1) CTRL+F for "compression automatically when reading archives" I can also confirm removing -a does the trick on macOS. |
macOS failure is expected at this time, see ndless-nspire#200 (comment)
Seems like both BSD and GNU tar autodetect the method for decompression, but BSD tar doesn't like the -a option for extraction. Fixes part of #200
Even better, so both BSD and GNU tar are happy with just |
macOS failure is expected at this time, see ndless-nspire#200 (comment)
This: works perfectly on macOS |
This is probably not native base64. |
Tried with a fresh macOS 10.15.7 install. |
That would break build on systems where |
* Add a CI workflow for the toolchain and SDK * CI: fix toolchain permissions * CI: use tar to accelerate artifacts * CI: temporarily force packaging the toolchain, and gz it * CI: skip packaging again if there's a cache * CI: fix paths * CI: fix artifact download path * CI: minor formatting * CI: expand SDK build to more OSs macOS failure is expected at this time, see #200 (comment) * CI: remove macOS for now more steps (including a separate toolchain build for macOS) are needed for this * CI: install necessary dependencies * CI: separate toolchain for each OS * CI: add Ubuntu 20.04 * CI: use matrix.os instead of runner.os * Update .github/workflows/main.yml use -j4 for make Co-authored-by: Fabian Vogt <fabian@ritter-vogt.de> * CI: merge jobs into one * CI: always install toolchain dependencies * CI: clarify a step * CI: remove ubuntu-16.04 * CI: simplify artifact upload * Revert "CI: simplify artifact upload" This reverts commit 8c01113. * ci: remove artifact uploads * CI: update PATH setup to use environment files see https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
How would it break it ? The "BASE64" variable is defaulted to |
The detection doesn't work. Here the |
…se64 command Signed-off-by: unilock <unilock@example.com>
|
The latest hastily-pushed commit should work. I didn't have time to test in the context of building Ndless. |
It doesn't seem to work. |
Ah, that's because |
Yeah, confirmed to work here. The main point of this is to fix it for macOS, so this really should be tested there before merging. |
|
Ok. The use of |
`-w` expects a valid wrap size
|
Done. I can confirm that works on both Linux and macOS. |

Mostly untested. Assumes the following have been installed with brew:
May break if more than one gcc version is installed.