macOS: Freshly installed GHC 8.10.5 linker reports undefined symbol `___darwin_check_fd_set_overflow`
Just downloaded https://downloads.haskell.org/~ghc/8.10.5/ghc-8.10.5-x86_64-apple-darwin.tar.xz and installed it via ./configure && make install
. It does not seem to want to build executables:
$ cabal install alex
Resolving dependencies...
Build profile: -w ghc-8.10.5 -O1
In order, the following will be built (use -v for more details):
- alex-3.2.6 (exe:alex) (requires build)
Configuring executable 'alex' for alex-3.2.6..
Preprocessing executable 'alex' for alex-3.2.6..
Building executable 'alex' for alex-3.2.6..
...
[22 of 22] Compiling Main ( src/Main.hs, dist/build/alex/alex-tmp/Main.o )
Linking dist/build/alex/alex ...
Undefined symbols for architecture x86_64:
"___darwin_check_fd_set_overflow", referenced from:
_awaitEvent in libHSrts.a(Select.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
cabal: Failed to build exe:alex from alex-3.2.6.
I didn't have this problem before, neither with 8.10.4 or 9.0.1. This issue seems to be the same as closed issue #18760 (closed).
Shouldn't ./configure
check that I have a compatible infrastructure?
The written system requirements for the binary dist are: (https://www.haskell.org/ghc/download_ghc_8_10_5.html#macosx_x86_64)
This is a distribution for Mac OS X, 10.7 or later. The package requires the command line tools package of Xcode 4 or XCode 5 to be installed.
System information:
- macOS Mojave 10.14.6
$ xcodebuild -version
Xcode 11.3.1
Build version 11C504
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin