Skip to content

cabal repl can fail with C sources not linked -fPIC #2590

@joeyh

Description

@joeyh

Seen running cabal repl in git-annex:

relocation R_X86_64_PC32 against undefined symbol `statvfs@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC

I suppose this is because the relevant C source file is included in an Executable stanza in my cabal file. Since it's not built as a library, cabal doesn't build it -fPIC.

Workaround: cabal configure --enable-executable-dynamic

cabal-install version 1.22.0.1
using version 1.22.1.1 of the Cabal library 
The Glorious Glasgow Haskell Compilation System, version 7.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions