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

stack build fails on macOS because of cabal's bug #27

Closed
Koki-Yamaguchi opened this issue Jun 26, 2021 · 0 comments · Fixed by #28
Closed

stack build fails on macOS because of cabal's bug #27

Koki-Yamaguchi opened this issue Jun 26, 2021 · 0 comments · Fixed by #28

Comments

@Koki-Yamaguchi
Copy link
Contributor

Summary

The same with haskell/cabal#4739

Steps to reproduce

Just execute the following on the environment mentioned below

stack build

environments:

$ stack --version
Version 2.7.1, Git revision 8afe0c2932716b0441cf4440d6942c59568b6b19 x86_64 hpack-0.34.4

macOS Catalina Version 10.15.5

Expected behavior

build succeeds

Actual behavior

$ stack build
Jikka> configure (lib + exe)
Configuring Jikka-5.0.5.0...
Jikka> build (lib + exe)
Preprocessing library for Jikka-5.0.5.0..
Building library for Jikka-5.0.5.0..
Preprocessing executable 'jikka' for Jikka-5.0.5.0..
Building executable 'jikka' for Jikka-5.0.5.0..

/Users/koki/programming/others/Jikka/<built-in>:15:10: error:
     error: non-portable path to file '".stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/Jikka/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Werror,-Wnonportable-include-path]
#include ".stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/jikka/autogen/cabal_macros.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         ".stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/Jikka/autogen/cabal_macros.h"
1 error generated.

/Users/koki/programming/others/Jikka/.stack-work/dist/x86_64-osx/Cabal-3.2.1.0/build/jikka/autogen/Paths_Jikka.hs:1:1: error:
    `gcc' failed in phase `C pre-processor'. (Exit code: 1)
  |
1 | {-# LANGUAGE CPP #-}
  | ^


--  While building package Jikka-5.0.5.0 (scroll up to its section to see the error) using:
      /Users/koki/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.4 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.2.1.0 build lib:Jikka exe:jikka --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
@kmyk kmyk closed this as completed in #28 Jun 26, 2021
kmyk added a commit that referenced this issue Jun 26, 2021
This will prevent issues like #27
kmyk added a commit that referenced this issue Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant