-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Build macOS arm64 variants #2618
Conversation
.github/workflows/macos.yml
Outdated
make -j4 | ||
echo "$(file ./jq) built against host ${{ matrix.arch }}-apple-darwin$(uname -r)") |
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 guessing the build error:
/Users/runner/work/_temp/7b085663-5c80-4857-8ebd-8f06e512b15e.sh: line 6: syntax error near unexpected token `)'
Is because of the ending ")"
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.
There you see what happens if you can't debug locally ;)
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.
Yeap is a mess to debug and interate :)
Thanks! i was actually just thinking of looking into this ... and also do att alpine docker image :) |
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Reorganize CI for different OSes (linux.yml, macos.yml & windows.yml) into ci.yml * Add release job to release `jq` when tagged with v* * Standardize artifact compiler with `clang` on CI. * Provide extensible matrix for future cross-compile builds, e.g. jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
MAKEVARS: ${{ matrix.makevars }} | ||
run: | | ||
autoreconf -fi | ||
rm src/lexer.c src/lexer.h | ||
rm src/parser.c src/parser.h | ||
./configure --disable-valgrind --with-oniguruma=builtin YACC="$(brew --prefix)/opt/bison/bin/bison -y" $COVERAGE | ||
./configure --disable-valgrind --with-oniguruma=builtin --target=${{ matrix.arch }}-apple-darwin$(uname -r) YACC="$(brew --prefix)/opt/bison/bin/bison -y" $COVERAGE |
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.
Fails on arm64 builds fails with:
If you meant to cross compile, use `--host'.
I tried this locally and this succeeded:
$ CC="clang -arch arm64" ./configure --disable-valgrind --with-oniguruma=builtin --host=arm64-apple-darwin$(uname -r) YACC="$(brew --prefix)/opt/bison/bin/bison -y" && make clean && make
...
$ file jq
jq: Mach-O 64-bit executable arm64
But i don't have much experience using clang+auto* to cross compile
Hi all, forgive the intrusion, but I was hoping to just use this branch to build my own jq on my M1 Mac, but I don't use homebrew (otherwise I'd just get the brew version of jq, anyway), so it would be a ton of hoops jumping to build from scratch (I have Bison, but not e.g. autoreconf). Any chance a temporary release/download could be offered, maybe from the reneleonhardt fork? |
* Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for jqlang#2618.
* Release pipeline * Group CI builds for different OSes into `ci.yml`. * Add release job to release `jq` when tag is in the format of v*. * Use `clang` as the only compiler on CI. * Provide extensible matrix for future cross-compile builds, e.g. for #2618. * Locate bison for Windows build * Also install flex for Windows build * Add matrix to test all available GH Actions images * Enable all tests for Windows * Run `brew update-reset` when `brew update` fails `brew update` can fail for "Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!" Ref: https://github.com/owenthereal/jq/actions/runs/5432314910/jobs/9879266028#step:3:19 * Select gcc binaries to release * Only enable CI when push to master & tag * Try out statick build * No need to enforce the same `AM_INIT_AUTOMAKE` version for MacOS * Disable static build for ubuntu-20.04 See #2620 (comment)
Fixes #2386
Old names:
New names: