Skip to content

Build failure on GHC 8.x (macOS 10.14): ld: unknown option: -no_fixup_chains #53

@andreasabel

Description

@andreasabel

I am getting build errors on macOS 10.14 which I have not seen before. They happen with any GHC 8 version and disappear with GHC 9:

$ cabal build -w ghc-8.10.7
...
Preprocessing library for zlib-0.6.3.0..
linking /Users/abel/bin/src/zlib/dist-newstyle/build/x86_64-osx/ghc-8.10.7/zlib-0.6.3.0/build/Codec/Compression/Zlib/Stream_hsc_make.o failed (exit code 1)
rsp file was: "/Users/abel/bin/src/zlib/dist-newstyle/build/x86_64-osx/ghc-8.10.7/zlib-0.6.3.0/build/Codec/Compression/Zlib/hsc2hscall34067-2.rsp"
command was: /usr/bin/gcc /Users/abel/bin/src/zlib/dist-newstyle/build/x86_64-osx/ghc-8.10.7/zlib-0.6.3.0/build/Codec/Compression/Zlib/Stream_hsc_make.o /Users/abel/bin/src/zlib/dist-newstyle/build/x86_64-osx/ghc-8.10.7/zlib-0.6.3.0/build/Codec/Compression/Zlib/Stream_hsc_utils.o -o /Users/abel/bin/src/zlib/dist-newstyle/build/x86_64-osx/ghc-8.10.7/zlib-0.6.3.0/build/Codec/Compression/Zlib/Stream_hsc_make \
  --target=x86_64-apple-darwin -Wl,-no_fixup_chains -L/usr/local/opt/icu4c/lib -L/usr/local/opt/libxml2/lib -lz -L/usr/local/lib/ghc-8.10.7/bytestring-0.10.12.0 -L/usr/local/lib/ghc-8.10.7/deepseq-1.4.4.0 -L/usr/local/lib/ghc-8.10.7/array-0.5.4.0 -L/usr/local/lib/ghc-8.10.7/base-4.14.3.0 -liconv -L/usr/local/lib/ghc-8.10.7/integer-gmp-1.0.3.0 -L/usr/local/lib/ghc-8.10.7/ghc-prim-0.6.1 -L/usr/local/lib/ghc-8.10.7/rts -lm -ldl
error: ld: unknown option: -no_fixup_chains
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The latest macOS virtual environment does not have this problem: https://github.com/andreasabel/zlib/actions/runs/4194386615/jobs/7272477723#step:5:23
There is only a warning:

ld: warning: -undefined dynamic_lookup may not work with chained fixups

I am putting this up here, maybe someone has an idea how to work around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions