Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Error in vscode: "gcc.exe' failed in phase C pre-processor'. (Exit code: 1)" #1519

Open
@fendor

Description

@fendor

@jneira found that it happens on our install script project when you have never built it before.

Steps to reproduce:

git clone https://github.com/mpickering/haskell-ide-engine hie
cd hie/install
code .

or, if project is already cloned

cd <path-to-haskell-ide-engine>/install
rm -rf .stack-work/ dist-newstyle/ dist/
code .

where code . is just an arbitrary lsp-client.

In the project hie-install, the cradle Cabal-Helper-v2 will be selected due to the presence of cabal.project.
Simply opening any haskell source file in the project will lead to the described error message.
Error is specifically that a cabal_macros.h can not be found, which is not generated when c-h initialises the project context.
Workaround: use stack build and cabal build respectively to generate this file.

EDIT: adding a hie.yaml works for me as expected even when the project has never been built before.

Originally posted by @fendor in mpickering#47 (comment)

Related issue haskell/cabal#2209.

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