Skip to content

FreeBSD build fails, -fPIC option? #6

@mutkach

Description

@mutkach

Hi! Firstly, let me say thanks to you for great work, it is very much appreciated.
I've been using brick on Linux for some time now, but my current OS is FreeBSD (-13.2 Release). I would appreciate any directions for fixing the problem myself.
Building vty-unix fails with a following error:

/usr/local/bin/ld: /usr/lib/libtinfow.a(lib_cur_term.o): relocation R_X86_64_32 against symbol `ttytype' can not be used when making a shared object; recompile with -fPIC
/usr/local/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
CallStack (from HasCallStack):
  withMetadata, called at src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.2.1-inplace:Distribution.Simple.Utils
Error: cabal: Failed to build vty-unix-0.2.0.0-inplace.

cabal: 3.6.2.0, 3.10.2.0
GHC: 9.8.1

Adding -fPIC to ghc-options in vty-unix.cabal does not seem to change matters a bit. Maybe I'm doing it wrong? Any other ideas to try?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions