Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,977
    • Issues 4,977
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 482
    • Merge requests 482
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16904
Closed
Open
Created Jul 04, 2019 by Shayne Fletcher@shayne-fletcher-da🥝Developer

Default configure wrong for macOS

Summary

Default configuration is wrong on macOS. Builds using ./configure (equivalently hadrian --configure) have recently begun failing with:

libraries/integer-gmp/cbits/wrappers.c:30:3: error: __GNU_MP_VERSION not defined
# error __GNU_MP_VERSION not defined
  ^
libraries/integer-gmp/cbits/wrappers.c:42:3: error: WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
# error WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
  ^

As explained at https://gitlab.haskell.org/ghc/ghc/wikis/building/preparation/mac-osx#setting-up-a-macos-x-system-for-building-ghc-head, this can be overcome by invoking configuration as CC=clang ./configure.

As recent versions of Xcode use clang, I argue that the default configuration choice is wrong. That is, CC=clang should be assumed and overridden manually if necessary to CC=gcc.

Steps to reproduce

./boot && ./configure && make

Expected behavior

The above procedure should produce a build "out of the box" without requiring setting CC.

Environment

Operating System: macOS (10.14.5), GHC 8.6.5 with

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Edited Jul 04, 2019 by Shayne Fletcher
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking