commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
4k stars 843 forks source link

Received ExitFailure 1 when running stack setup #4426

Closed AlexGoico closed 5 years ago

AlexGoico commented 5 years ago

General summary/comments

I am on MacOS Mojave (10.14) and am unable to get past stack setup.

Steps to reproduce

  1. Create a project stack new projectName
  2. Inside projectName, run stack setup

Expected

ghc to be installed into the project

Actual

Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.                
Configuring GHC ...                                                             
Received ExitFailure 1 when running
Raw command: /Users/alexgoico/.stack/programs/x86_64-osx/ghc-8.4.4.temp/ghc-8.4.4/configure --prefix=/Users/alexgoico/.stack/programs/x86_64-osx/ghc-8.4.4/
Run from: /Users/alexgoico/.stack/programs/x86_64-osx/ghc-8.4.4.temp/ghc-8.4.4/

Here is stack setup --verbose output.

Stack version

$ stack --version
Version 1.9.1, Git revision f9d0042c141660e1d38f797e1d426be4a99b2a3c (6168 commits) x86_64 hpack-0.31.0

Method of installation

mattaudesse commented 5 years ago

Hey @AlexGoico,

Based on your --verbose output it seems like you may be experiencing this problem - would you please try running xcode-select --install and see if that resolves the issue?

AlexGoico commented 5 years ago

Running xcode-select --install yields code-select: error: command line tools are already installed, use "Software Update" to install updates. Upon opening "Software Update" I get a "Your Mac is up to date".

uptodate

Any other suggestions I could try?

mpereira commented 5 years ago

I see the same on 1.9.3. The config.log shows a few errors:

``` This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by The Glorious Glasgow Haskell Compilation System configure 8.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ /Users/murilo/.stack/programs/x86_64-osx/ghc-8.6.3.temp/ghc-8.6.3/configure --prefix=/Users/murilo/.stack/programs/x86_64-osx/ghc-8.6.3/ ## --------- ## ## Platform. ## ## --------- ## hostname = balloon uname -m = x86_64 uname -r = 18.2.0 uname -s = Darwin uname -v = Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 /usr/bin/uname -p = i386 /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = Mach kernel version: Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 Kernel configured for up to 8 processors. 4 processors are physically available. 8 processors are logically available. Processor type: x86_64h (Intel x86-64h Haswell) Processors active: 0 1 2 3 4 5 6 7 Primary memory available: 16.00 gigabytes Default processor set: 501 tasks, 2694 threads, 8 processors Load average: 3.57, Mach factor: 4.42 /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/opt/gnu-getopt/bin PATH: /usr/local/opt/coreutils/libexec/gnubin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/sbin PATH: /sbin PATH: /Library/TeX/texbin PATH: /usr/local/go/bin PATH: /opt/X11/bin PATH: /Applications/Emacs-26.1.app/Contents/MacOS/bin-x86_64-10_10 PATH: /Applications/Emacs-26.1.app/Contents/MacOS/libexec-x86_64-10_10 PATH: /usr/local/bin PATH: /opt/local/bin PATH: /Applications/Postgres.app/Contents/Versions/latest/bin PATH: /Applications/CMake.app/Contents/bin PATH: /Users/murilo/Library/Python/3.6/bin PATH: /Library/Frameworks/Python.framework/Versions/3.6/bin PATH: /usr/local/go/bin PATH: /Users/murilo/.go/bin PATH: /Users/murilo/.cargo/bin PATH: /Users/murilo/mesosphere/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:2327: checking build system type configure:2341: result: x86_64-apple-darwin18.2.0 configure:2361: checking host system type configure:2374: result: x86_64-apple-darwin18.2.0 configure:2394: checking target system type configure:2407: result: x86_64-apple-darwin18.2.0 configure:3284: checking for path to top of build tree configure:3310: result: /Users/murilo/.stack/programs/x86_64-osx/ghc-8.6.3.temp/ghc-8.6.3 configure:3330: checking for perl configure:3348: found /usr/bin/perl configure:3360: result: /usr/bin/perl configure:3390: checking for a BSD-compatible install configure:3458: result: /usr/local/opt/coreutils/libexec/gnubin/install -c configure:3476: checking for gfind configure:3509: result: no configure:3476: checking for find configure:3494: found /usr/local/bin/find configure:3506: result: /usr/local/bin/find configure:3588: checking whether ln -s works configure:3592: result: yes configure:3604: checking for gsed configure:3635: result: sed configure:3647: checking XCode version configure:3653: result: not found (too old?) configure:3724: checking for gcc configure:3740: found /usr/bin/gcc configure:3751: result: gcc configure:3782: checking for C compiler version configure:3791: gcc --version >&5 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 configure:3802: $? = 0 configure:3791: gcc -v >&5 Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin configure:3802: $? = 0 configure:3791: gcc -V >&5 clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files configure:3802: $? = 1 configure:3791: gcc -qversion >&5 clang: error: unknown argument: '-qversion' clang: error: no input files configure:3802: $? = 1 configure:3822: checking whether the C compiler works configure:3844: gcc conftest.c >&5 configure:3848: $? = 0 configure:3896: result: yes configure:3899: checking for C compiler default output file name configure:3901: result: a.out configure:3907: checking for suffix of executables configure:3914: gcc -o conftest conftest.c >&5 configure:3918: $? = 0 configure:3940: result: configure:3962: checking whether we are cross compiling configure:3970: gcc -o conftest conftest.c >&5 configure:3974: $? = 0 configure:3981: ./conftest configure:3985: $? = 0 configure:4000: result: no configure:4005: checking for suffix of object files configure:4027: gcc -c conftest.c >&5 configure:4031: $? = 0 configure:4052: result: o configure:4056: checking whether we are using the GNU C compiler configure:4075: gcc -c conftest.c >&5 configure:4075: $? = 0 configure:4084: result: yes configure:4093: checking whether gcc accepts -g configure:4113: gcc -c -g conftest.c >&5 configure:4113: $? = 0 configure:4154: result: yes configure:4171: checking for gcc option to accept ISO C89 configure:4234: gcc -c -g -O2 conftest.c >&5 configure:4234: $? = 0 configure:4247: result: none needed configure:4273: checking how to run the C preprocessor configure:4304: gcc -E conftest.c configure:4304: $? = 0 configure:4318: gcc -E conftest.c conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found #include ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:4318: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "The Glorious Glasgow Haskell Compilation System" | #define PACKAGE_TARNAME "ghc-8.6.3" | #define PACKAGE_VERSION "8.6.3" | #define PACKAGE_STRING "The Glorious Glasgow Haskell Compilation System 8.6.3" | #define PACKAGE_BUGREPORT "glasgow-haskell-bugs@haskell.org" | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include configure:4343: result: gcc -E configure:4363: gcc -E conftest.c configure:4363: $? = 0 configure:4377: gcc -E conftest.c conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found #include ^~~~~~~~~~~~~~~~~~ 1 error generated. configure:4377: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "The Glorious Glasgow Haskell Compilation System" | #define PACKAGE_TARNAME "ghc-8.6.3" | #define PACKAGE_VERSION "8.6.3" | #define PACKAGE_STRING "The Glorious Glasgow Haskell Compilation System 8.6.3" | #define PACKAGE_BUGREPORT "glasgow-haskell-bugs@haskell.org" | #define PACKAGE_URL "" | /* end confdefs.h. */ | #include configure:4519: checking for gcc option to accept ISO C99 configure:4668: gcc -c -g -O2 conftest.c >&5 configure:4668: $? = 0 configure:4681: result: none needed configure:4720: checking for gcc option to accept ISO C99 configure:4869: gcc -c conftest.c >&5 configure:4869: $? = 0 configure:4882: result: none needed configure:4921: checking for gcc option to accept ISO C99 configure:5070: gcc -c conftest.c >&5 configure:5070: $? = 0 configure:5083: result: none needed configure:5221: checking for -ld.lld configure:5251: result: no configure:5261: checking for ld.lld configure:5291: result: no configure:5221: checking for -ld.gold configure:5251: result: no configure:5261: checking for ld.gold configure:5291: result: no configure:5221: checking for -ld configure:5251: result: no configure:5261: checking for ld configure:5277: found /usr/bin/ld configure:5288: result: ld configure:5358: unknown linker version configure:5362: unable to convince 'gcc' to use linker 'ld' configure:5377: checking for -ld configure:5407: result: no configure:5417: checking for ld configure:5433: found /usr/bin/ld configure:5444: result: ld configure:5781: checking whether ld is GNU ld configure:5792: result: NO configure:5798: checking whether ld understands --build-id configure:5812: result: no configure:5822: checking whether ld understands -no_compact_unwind configure:5836: result: yes configure:5846: checking whether ld understands -filelist configure:5867: result: yes configure:5879: checking for -strip configure:5909: result: no configure:5919: checking for strip configure:5935: found /usr/bin/strip configure:5946: result: strip configure:6021: checking for llc-6.0 configure:6051: result: no configure:6021: checking for llc configure:6051: result: no configure:6141: checking for opt-6.0 configure:6171: result: no configure:6141: checking for opt configure:6171: result: no configure:6216: checking version of gcc configure:6273: result: 10.0.0 configure:6281: checking whether GCC supports -no-pie configure:6291: result: no configure:6297: checking for extra options to pass gcc when compiling via C configure:6351: result: -fwrapv -fno-builtin configure:6358: checking Setting up CFLAGS, LDFLAGS, IGNORE_LINKER_LD_FLAGS and CPPFLAGS configure:6446: result: done configure:6450: checking Setting up CONF_CC_OPTS_STAGE0, CONF_GCC_LINKER_OPTS_STAGE0, CONF_LD_LINKER_OPTS_STAGE0 and CONF_CPP_OPTS_STAGE0 configure:6538: result: done configure:6542: checking Setting up CONF_CC_OPTS_STAGE1, CONF_GCC_LINKER_OPTS_STAGE1, CONF_LD_LINKER_OPTS_STAGE1 and CONF_CPP_OPTS_STAGE1 configure:6630: result: done configure:6635: checking Setting up CONF_CC_OPTS_STAGE2, CONF_GCC_LINKER_OPTS_STAGE2, CONF_LD_LINKER_OPTS_STAGE2 and CONF_CPP_OPTS_STAGE2 configure:6723: result: done configure:7005: checking for .subsections_via_symbols configure:7018: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7018: $? = 0 configure:7019: result: yes configure:7034: checking whether your assembler supports .ident directive configure:7040: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7040: $? = 0 configure:7041: result: yes configure:7062: checking for GNU non-executable stack support configure:7075: gcc -c conftest.c >&5 conftest.c:14:1: warning: expression result unused [-Wunused-value] 0 ^ :1:19: error: unexpected token in '.section' directive .section .note.GNU-stack,"",@progbits ^ 1 warning and 1 error generated. configure:7075: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "The Glorious Glasgow Haskell Compilation System" | #define PACKAGE_TARNAME "ghc-8.6.3" | #define PACKAGE_VERSION "8.6.3" | #define PACKAGE_STRING "The Glorious Glasgow Haskell Compilation System 8.6.3" | #define PACKAGE_BUGREPORT "glasgow-haskell-bugs@haskell.org" | #define PACKAGE_URL "" | #define HAVE_SUBSECTIONS_VIA_SYMBOLS 1 | /* end confdefs.h. */ | __asm__ (".section .note.GNU-stack,\"\",@progbits"); | int | main () | { | 0 | ; | return 0; | } configure:7080: result: no configure:7107: checking for grep that handles long lines and -e configure:7165: result: /usr/local/bin/grep configure:7170: checking for egrep configure:7232: result: /usr/local/bin/grep -E configure:7237: checking for ANSI C header files configure:7257: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7257: $? = 0 configure:7330: gcc -o conftest -g -O2 -fno-stack-protector conftest.c >&5 configure:7330: $? = 0 configure:7330: ./conftest configure:7330: $? = 0 configure:7341: result: yes configure:7354: checking for sys/types.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for sys/stat.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for stdlib.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for string.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for memory.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for strings.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for inttypes.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for stdint.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7354: checking for unistd.h configure:7354: gcc -c -g -O2 -fno-stack-protector conftest.c >&5 configure:7354: $? = 0 configure:7354: result: yes configure:7370: checking size of void * configure:7375: gcc -o conftest -g -O2 -fno-stack-protector conftest.c >&5 configure:7375: $? = 0 configure:7375: ./conftest configure:7375: $? = 0 configure:7389: result: 8 configure:7462: checking for -ar configure:7492: result: no configure:7502: checking for ar configure:7518: found /usr/bin/ar configure:7529: result: ar configure:7551: checking whether ar is GNU ar configure:7562: result: no configure:7569: checking for ar arguments configure:7599: result: qcls configure:7610: checking whether ar supports @file configure:7630: result: no configure:7684: checking for ranlib configure:7700: found /usr/bin/ranlib configure:7711: result: ranlib configure:8070: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## This file was extended by The Glorious Glasgow Haskell Compilation System config.status 8.6.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = CONFIG_HEADERS = CONFIG_LINKS = CONFIG_COMMANDS = $ ./config.status on balloon config.status:845: creating settings config.status:991: error: could not create settings ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=x86_64-apple-darwin18.2.0 ac_cv_c_compiler_gnu=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_unistd_h=yes ac_cv_host=x86_64-apple-darwin18.2.0 ac_cv_objext=o ac_cv_path_EGREP='/usr/local/bin/grep -E' ac_cv_path_GREP=/usr/local/bin/grep ac_cv_path_PerlCmd=/usr/bin/perl ac_cv_path_SedCmd=sed ac_cv_path_fp_prog_find=/usr/local/bin/find ac_cv_path_install='/usr/local/opt/coreutils/libexec/gnubin/install -c' ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_ac_ct_LD=ld ac_cv_prog_ac_ct_RANLIB=ranlib ac_cv_prog_ac_ct_STRIP=strip ac_cv_prog_ac_ct_fp_prog_ar=ar ac_cv_prog_cc_c89= ac_cv_prog_cc_g=yes ac_cv_sizeof_void_p=8 ac_cv_target=x86_64-apple-darwin18.2.0 fp_cv_gcc_extra_opts=' -fwrapv -fno-builtin' fp_cv_gcc_version=10.0.0 fp_cv_gnu_ld=NO fp_cv_ld_build_id=no fp_cv_ld_has_filelist=yes fp_cv_ld_no_compact_unwind=yes fp_cv_prog_ar_args=qcls fp_cv_prog_ar_is_gnu=no fp_cv_prog_ar_needs_ranlib=yes fp_cv_prog_ar_supports_atfile=no ## ----------------- ## ## Output variables. ## ## ----------------- ## ARM_ISA='' AS='' ArArgs='qcls' ArCmd='ar' ArIsGNUAr='NO' ArSupportsAtFile='NO' BuildArch_CPP='x86_64' BuildOS_CPP='darwin' BuildPlatform='x86_64-apple-darwin' BuildPlatform_CPP='x86_64_apple_darwin' BuildVendor_CPP='apple' CC='gcc' CFLAGS='-g -O2 -fno-stack-protector' CONF_CC_OPTS_STAGE0=' -fno-stack-protector' CONF_CC_OPTS_STAGE1=' -fno-stack-protector' CONF_CC_OPTS_STAGE2=' -fno-stack-protector' CONF_CPP_OPTS_STAGE0='' CONF_CPP_OPTS_STAGE1='' CONF_CPP_OPTS_STAGE2='' CONF_GCC_LINKER_OPTS_STAGE0='' CONF_GCC_LINKER_OPTS_STAGE1=' ' CONF_GCC_LINKER_OPTS_STAGE2=' ' CONF_LD_LINKER_OPTS_STAGE0='' CONF_LD_LINKER_OPTS_STAGE1='' CONF_LD_LINKER_OPTS_STAGE2='' CPP='gcc -E' CPPFLAGS='' CrossCompilePrefix='' CrossCompiling='NO' DEFS='-DPACKAGE_NAME=\"The\ Glorious\ Glasgow\ Haskell\ Compilation\ System\" -DPACKAGE_TARNAME=\"ghc-8.6.3\" -DPACKAGE_VERSION=\"8.6.3\" -DPACKAGE_STRING=\"The\ Glorious\ Glasgow\ Haskell\ Compilation\ System\ 8.6.3\" -DPACKAGE_BUGREPORT=\"glasgow-haskell-bugs@haskell.org\" -DPACKAGE_URL=\"\" -DHAVE_SUBSECTIONS_VIA_SYMBOLS=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8' ECHO_C='\c' ECHO_N='' ECHO_T='' EGREP='/usr/local/bin/grep -E' EXEEXT='' FFIIncludeDir='' FFILibDir='' FindCmd='/usr/local/bin/find' GMP_INCLUDE_DIRS='' GMP_LIB_DIRS='' GREP='/usr/local/bin/grep' GccExtraViaCOpts=' -fwrapv -fno-builtin' GccLT46='NO' GccVersion='10.0.0' HaskellCPPArgs='-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs' HaskellCPPCmd='gcc' HaskellHaveGnuNonexecStack='False' HaskellHaveIdentDirective='True' HaskellHaveRTSLinker='YES' HaskellHaveSubsectionsViaSymbols='True' HaskellTargetArch='ArchX86_64' HaskellTargetOs='OSDarwin' HostArch_CPP='x86_64' HostOS_CPP='darwin' HostPlatform='x86_64-apple-darwin' HostPlatform_CPP='x86_64_apple_darwin' HostVendor_CPP='apple' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' LD='ld' LDFLAGS='' LIBOBJS='' LIBS='' LLC='' LLVMTarget_CPP='x86_64-apple-darwin' LN_S='ln -s' LTLIBOBJS='' LdCmd='ld' LdHasBuildId='NO' LdHasFilelist='YES' LdHasNoCompactUnwind='YES' LdIsGNULd='NO' LlcCmd='' OBJEXT='o' OPT='' OptCmd='' PACKAGE_BUGREPORT='glasgow-haskell-bugs@haskell.org' PACKAGE_NAME='The Glorious Glasgow Haskell Compilation System' PACKAGE_STRING='The Glorious Glasgow Haskell Compilation System 8.6.3' PACKAGE_TARNAME='ghc-8.6.3' PACKAGE_URL='' PACKAGE_VERSION='8.6.3' PATH_SEPARATOR=':' PerlCmd='/usr/bin/perl' RANLIB='ranlib' RANLIB_CMD='ranlib' READELF='' REAL_RANLIB_CMD='ranlib' RanlibCmd='ranlib' SHELL='/bin/sh' STRIP='strip' SedCmd='sed' SettingsArCommand='ar' SettingsCCompilerCommand='gcc' SettingsCCompilerFlags=' -fno-stack-protector' SettingsCCompilerLinkFlags=' ' SettingsCCompilerSupportsNoPie='NO' SettingsClangCommand='clang' SettingsDllWrapCommand='/bin/false' SettingsHaskellCPPCommand='gcc' SettingsHaskellCPPFlags='-E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs' SettingsLdCommand='ld' SettingsLdFlags='' SettingsLibtoolCommand='libtool' SettingsLlcCommand='llc' SettingsOptCommand='opt' SettingsPerlCommand='/usr/bin/perl' SettingsRanlibCommand='ranlib' SettingsTouchCommand='touch' SettingsWindresCommand='/bin/false' StripCmd='strip' TargetArch_CPP='x86_64' TargetOS_CPP='darwin' TargetPlatform='x86_64-apple-darwin' TargetPlatformFull='x86_64-apple-darwin' TargetPlatform_CPP='x86_64_apple_darwin' TargetVendor_CPP='apple' TargetWordSize='8' TmpLd='ld' Unregisterised='NO' ac_ct_CC='gcc' ac_ct_LLC='' ac_ct_OPT='' bindir='${exec_prefix}/bin' build='x86_64-apple-darwin' build_alias='' build_cpu='x86_64' build_os='darwin18.2.0' build_vendor='apple' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='${prefix}' exeext_host='' exeext_target='' fp_prog_ar='ar' fp_prog_find='/usr/local/bin/find' hardtop='/Users/murilo/.stack/programs/x86_64-osx/ghc-8.6.3.temp/ghc-8.6.3' host='x86_64-apple-darwin' host_alias='' host_cpu='x86_64' host_os='darwin18.2.0' host_vendor='apple' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/Users/murilo/.stack/programs/x86_64-osx/ghc-8.6.3' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' soext_host='.dylib' soext_target='.dylib' sysconfdir='${prefix}/etc' target='x86_64-apple-darwin' target_alias='' target_cpu='x86_64' target_os='darwin18.2.0' target_vendor='apple' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "The Glorious Glasgow Haskell Compilation System" #define PACKAGE_TARNAME "ghc-8.6.3" #define PACKAGE_VERSION "8.6.3" #define PACKAGE_STRING "The Glorious Glasgow Haskell Compilation System 8.6.3" #define PACKAGE_BUGREPORT "glasgow-haskell-bugs@haskell.org" #define PACKAGE_URL "" #define HAVE_SUBSECTIONS_VIA_SYMBOLS 1 #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define SIZEOF_VOID_P 8 configure: exit 1 ```
mattaudesse commented 5 years ago

Hey @AlexGoico and @mpereira - sorry it's taken me so long to respond.

I still can't reproduce this on my macOS Mojave machine, and I'm not sure what else to try at this point, but I wonder if the problem has something to do with installing via the Haskell Platform vs. the shell script method documented here (which is what I used).

I can see from Alex's original message that he used the Haskell Platform - did you as well, @mpereira?

dbaynard commented 5 years ago

This wouldn't be the first odd error I've seen on macos involving haskell platform — e.g. #4504

f-z commented 5 years ago

I tried installing from scratch on Mojave both by using homebrew and via the shell script method and the problem appears on both occasions. I also removed the command line tools and reinstalled them using xcode-select --install, but that was of no help either. I think it might be caused by an error when trying to compile a C program on Mojave.

mattaudesse commented 5 years ago

Cross-linking with this discussion on the gitter.im channel since it has some potentially useful diagnostic info.

snoyberg commented 5 years ago

Does this problem occur if you try manually download, unpacking, and ./configureing the GHC tarball for OS X?

snoyberg commented 5 years ago

No follow up, closing

valsan commented 5 years ago

Don't know if it's still relevant but I found a solution, instead of

xcode-select --install , which doesn't install SDK_headers in Mojave, you should do:

cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg

then follow the instructions from the wizard.

I found the solution here: https://stackoverflow.com/questions/19580758/gcc-fatal-error-stdio-h-no-such-file-or-directory

snoyberg commented 5 years ago

A PR to add that information to the FAQ doc or similar would definitely be welcome.

zmccoy commented 5 years ago

@valsan Even with running the solution you've posted I'm still receiving the same issues. Have you heard of anything like that happening still?

ryalman commented 5 years ago

In my case the problem was about gawk. running stack --verbose will give you detailed log. After running the commands below, everything is working now. My stack version is 1.9.3

brew unlink gawk brew install awk

AlexGoico commented 5 years ago

Ends up this was all a false alarm.

It was an old clang version blocking the apple version in my path (an old Anaconda installation).