Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cabal >= 3 does not pass through options to $CC correctly when building C code for FFI modules. #315

Copy link
Copy link
@Ailrun

Description

@Ailrun
Issue body actions

A project built with llvm-hs gives an error like this in GHC 8.10.3:

Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/<MyProject>/<MyProject> ...
ld.lld: error: undefined symbol: typeinfo for llvm::ErrorInfoBase
>>> referenced by BitcodeC.o:(typeinfo for llvm::ErrorInfo<llvm::ErrorList, llvm::ErrorInfoBase>) in archive <HOME>/.stack/snapshots/x86_64-linux-tinfo6/d1a1b99df71b047a18276db4b4d4dcaa7c67873cb82e9c6788ea3b790131ffee/8.10.3/lib/x86_64-linux-ghc-8.10.3/llvm-hs-9.0.1-1RtPvEeO6wN3mXnaO6NE50/libHSllvm-hs-9.0.1-1RtPvEeO6wN3mXnaO6NE50.a
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
Completed 14 action(s).             

--  While building package <MyProject>-0.1.0.0 (scroll up to its section to see the error) using:
      <HOME>/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.2.1.0_ghc-8.10.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0 build exe:<MyProject> --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

, though I'm not sure it is generally reproducible with other GHC 8.10 versions.

Is this expected?

(FYI, it works well with GHC 8.8.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalIssue with external toolsIssue with external tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.