-
Notifications
You must be signed in to change notification settings - Fork 81
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
HaskellC2Hs fails with clang: error: no input files #1486
Comments
Tests are explicitly skipped in 55f2c1c; that relegates it into "wontfix" territory. I'm not sure about that, but feel that it's nonetheless very low priority. |
Calling the C pre-processor with Calling |
Good point, I think this may just be blindly copied from some place. Does changing this resolve the issue? |
This is really weird:
So it seems that Also interestingly, c2hs has some logic of its own: https://github.com/haskell/c2hs/blob/bb7079f4bf3ca4af00f6178d05a8da9238ddff7c/src/C2HS/Config.hs#L53-L67 So, the Using the |
Re-activate tests that had been disabled because of `c2hs` failing with `clang: error: no input files`. Fixes #1486
The `cpp` tool on Darwin (and Windows) errors out when using the `-x c` flags: ``` $ cpp -x c /tmp/ch2s.h clang: error: no input files ``` When using `cpp` as the tool for the `c2hs --cpp=` option, `c2hs` adds the `-x c` flags automatically which then causes the error. (see [Config.hs]) Using the C compiler instead (with `-E`) makes this work on all systems. Re-activate tests that had been disabled because of `c2hs` failing with `clang: error: no input files`. Fixes #1486 [Config.hs]: https://github.com/haskell/c2hs/blob/bb7079f4bf3ca4af00f6178d05a8da9238ddff7c/src/C2HS/Config.hs#L53-L67
Describe the bug
The
HaskellC2Hs
action ofc2hs_library
fails on macOS in bindist mode with the errorExample occurrence: CI log, BuildBuddy
To Reproduce
Run the following command on macOS in bindist mode
Expected behavior
The build should succeed.
Environment
Additional context
I can reproduce the issue on a macOS machine locally. Jumping into the sandbox dir (
bazel ... --sandbox_debug
) I can boil it down to this cpp invocation that fails in the same wayThe file exists and only contains
The text was updated successfully, but these errors were encountered: