Skip to content
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

Release two architectures for macOS #18

Merged
merged 5 commits into from
Apr 1, 2021
Merged

Release two architectures for macOS #18

merged 5 commits into from
Apr 1, 2021

Conversation

xeago
Copy link
Contributor

@xeago xeago commented Mar 25, 2021

No description provided.

xeago added 2 commits March 25, 2021 15:54
Lint failure observed using `rustc 1.51.0 (2fd73fabe 2021-03-23)`.
walles added a commit that referenced this pull request Mar 27, 2021
This is to be able to test changes, such as in PR #18.
walles added a commit that referenced this pull request Mar 27, 2021
This is to be able to test changes, such as in PR #18.
@walles

This comment has been minimized.

@walles
Copy link
Owner

walles commented Mar 27, 2021

Since the start of that comment might have just drowned in the build lot I'll just write it again:

This fails for me with (newly added flag) release.sh --dry. I'm on an x86 Mac / 10.15 Catalina, what's your setup?

@walles
Copy link
Owner

walles commented Mar 29, 2021

@xeago
Copy link
Contributor Author

xeago commented Mar 30, 2021

Hmm, I've tried again, commented the building of the linux binary (for which the musl toolchain fails to install thus far). Using M1 with Big Sur (11.2.3), and perhaps key to this Xcode 12.4. I think as of Xcode 12.2 these headers are included on Catalina too.

What version of Xcode is being used on your end and in CI?

@xeago
Copy link
Contributor Author

xeago commented Mar 30, 2021

I also believe you'll have issues testing the arm64 variant; you'll be unable to invoke it for --version. For what it's worth, lipo target/*-apple-darwin/release/riff -create universal makes this a universal binary.

Overall; this is somewhat of a mess, apologies for dragging you down this rabbit hole.

release.sh Outdated Show resolved Hide resolved
@walles
Copy link
Owner

walles commented Apr 1, 2021

Overall; this is somewhat of a mess, apologies for dragging you down this rabbit hole.

Rabbit hole schmabbit school this is where you learn stuff :)

@walles
Copy link
Owner

walles commented Apr 1, 2021

the musl toolchain fails to install thus far

Just for clarity, there's a comment in release.sh saying you have to do brew install FiloSottile/musl-cross/musl-cross.

Is it that brew invocation that doesn't work for you?

@xeago
Copy link
Contributor Author

xeago commented Apr 1, 2021

A week ago that brew invocation failed after ~2 hours, I can't quite remember specifically why, saw something about certain symbols not being found, in a few million lines of output. I'm giving it another try. :)

Co-authored-by: Johan Walles <johan.walles@gmail.com>
@xeago
Copy link
Contributor Author

xeago commented Apr 1, 2021

I find it interesting you were required to set SDKROOT, that should come by default with newer versions of Xcode. I suppose this will break explicitly on older versions of Xcode?

@xeago
Copy link
Contributor Author

xeago commented Apr 1, 2021

brew install FiloSottile/musl-cross/musl-cross:

                 code_helper code, const tree type, tree op0, tree op1, tree op2, tree op3, tree op4)
                                                                                       ^
gimple-match.c:99340:98: warning: unused parameter 'op4' [-Wunused-parameter]
                 code_helper code, const tree type, tree op0, tree op1, tree op2, tree op3, tree op4)
                                                                                                 ^
41 warnings generated.
166 warnings generated.
171 warnings generated.
rm -rf libbackend.a
ar rc libbackend.a gimple-match.o generic-match.o insn-attrtab.o insn-automata.o insn-dfatab.o insn-emit.o insn-extract.o insn-latencytab.o insn-modes.o insn-opinit.o insn-output.o insn-peep.o insn-preds.o insn-recog.o in
ranlib  libbackend.a
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
  cp ../prev-gcc/cc1-checksum.c cc1-checksum.c; \
else \
  build/genchecksum c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cp
                     checksum-options > cc1-checksum.c.tmp &&            \
  ../../src_gcc/gcc/../move-if-change cc1-checksum.c.tmp cc1-checksum.c; \
fi
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
   cp ../prev-gcc/cc1plus-checksum.c cc1plus-checksum.c; \
else \
  build/genchecksum cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o c
                     checksum-options > cc1plus-checksum.c.tmp &&          \
  ../../src_gcc/gcc/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c; \
fi
clang++ -fbracket-depth=512 -no-pie   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing
        lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a -L/private/tmp/musl-cro
clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
Undefined symbols for architecture arm64:
  "_host_hooks", referenced from:
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)
      toplev::main(int, char**) in libbackend.a(toplev.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [../../src_gcc/gcc/lto/Make-lang.in:81: lto1] Error 1
gmake[3]: *** Waiting for unfinished jobs....
rm gcc.pod
gmake[3]: Leaving directory '/private/tmp/musl-cross-20210401-11588-1t8t1uc/musl-cross-make-0.9.9/build/local/x86_64-linux-musl/obj_gcc/gcc'
gmake[2]: *** [Makefile:4361: all-gcc] Error 2
gmake[2]: Leaving directory '/private/tmp/musl-cross-20210401-11588-1t8t1uc/musl-cross-make-0.9.9/build/local/x86_64-linux-musl/obj_gcc'
gmake[1]: *** [Makefile:222: obj_gcc/gcc/.lc_built] Error 2
gmake[1]: Leaving directory '/private/tmp/musl-cross-20210401-11588-1t8t1uc/musl-cross-make-0.9.9/build/local/x86_64-linux-musl'
gmake: *** [Makefile:183: install] Error 2```

@walles walles merged commit 1654367 into walles:master Apr 1, 2021
@walles
Copy link
Owner

walles commented Apr 1, 2021

This works for me now, thanks @xeago!

If you want to make release.sh work on M1 macs, make another PR for that!

I would welcome it, but I don't have one myself so I won't do it myself.

@walles
Copy link
Owner

walles commented Apr 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants