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

.github: cross-compile arm64 macOS asset #796

Merged
merged 17 commits into from
Aug 17, 2023
Merged

Commits on Aug 16, 2023

  1. .github: prepare to cross-compile with matrix

    It seems like it might be easiest to build the arm64-macos asset on
    macos. Prepare to do that.
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    034f64b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    955f56e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7bb991b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9236160 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5620a67 View commit details
    Browse the repository at this point in the history
  6. .github(install-zig): macos: skip archive checksum for now

    It produced an error:
    
        shasum: standard input: no properly formatted SHA checksum lines found
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b10d252 View commit details
    Browse the repository at this point in the history
  7. config: macos: try to fix error for missing SecRandom.h

    `Security/SecRandom.h` was still not found when cross-compiling for
    arm64 macos, even when building on macos:
    
        /Users/runner/.cache/nim/configlet_r/@m..@snimdir@slib@sstd@ssysrand.nim.c:9:10: fatal error: 'Security/SecRandom.h' file not found
                 ^~~~~~~~~~~~~~~~~~~~~~
        nimble.nim(229)          buildFromDir
        1 error generated.
    
        Error: execution of an external compiler program 'zigcc -c -w -ferror-limit=3 -pthread -target aarch64-macos-none -Os   -I/Users/runner/work/configlet/configlet/nimdir/lib -I/Users/runner/work/configlet/configlet/src -o /Users/runner/.cache/nim/configlet_r/@m..@snimdir@slib@sstd@ssysrand.nim.c.o /Users/runner/.cache/nim/configlet_r/@m..@snimdir@slib@sstd@ssysrand.nim.c' failed with exit code: 1
        Error:  Build failed for the package: configlet
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    8919ed8 View commit details
    Browse the repository at this point in the history
  8. config: try -F instead of -I

    Some `clang --help` output:
    
      -F <value>              Add directory to framework include search path
      -I <dir>                Add directory to the end of the list of include search paths
      -iframeworkwithsysroot <directory>
                              Add directory to SYSTEM framework search path, absolute paths are relative to -isysroot
      -iframework <value>     Add directory to SYSTEM framework search path
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    34c641a View commit details
    Browse the repository at this point in the history
  9. config: try setting FRAMEWORK_SEARCH_PATHS

    Building with the previous commit produced a link-time error:
    
        CC: configlet.nim
        Hint:  [Link]
        warning(link): framework not found for '-framework Security'
        warning(link): Framework search paths:
        error(link): undefined reference to symbol '_SecRandomCopyBytes'
        error(link):   first referenced in '/Users/runner/.cache/nim/configlet_r/@m..@snimdir@slib@sstd@ssysrand.nim.c.o'
        error: UndefinedSymbolReference
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a18260f View commit details
    Browse the repository at this point in the history
  10. config: try using --passL

    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    cf292b8 View commit details
    Browse the repository at this point in the history
  11. config: try --passL with -F

    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    6eace88 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    443a82e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    deb3b79 View commit details
    Browse the repository at this point in the history
  14. .github(cross-compile): try enabling -flto on macOS

    I think this won't work.
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    d0e67f6 View commit details
    Browse the repository at this point in the history
  15. Revert ".github(cross-compile): try enabling -flto on macOS"

    This reverts commit d0e67f6.
    
    It produced the error:
    
        error: LTO is not yet supported with the Mach-O object format. More details: ziglang/zig#8680
    ee7 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    f9ea4e1 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Configuration menu
    Copy the full SHA
    3542cbe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7cee7f4 View commit details
    Browse the repository at this point in the history