Skip to content

Benchmarks can no longer be built with Stack 1.6.1 #3630

@mrkkrp

Description

@mrkkrp

I have a project, which has some benchmarks. Before upgrading to the latest Stack 1.6.1 I had no issues building and running the benchmarks, but now I'm getting the following:

stack bench mmark
mmark-0.0.1.1: unregistering (missing dependencies: criterion)
code-page-0.1.3: configure
code-page-0.1.3: build
Progress: 1/4
--  While building custom Setup.hs for package code-page-0.1.3 using:
      /home/mark/.stack/setup-exe-cache/x86_64-linux-tinfo6-nopie/Cabal-simple_mPHDZzAJ_2.0.0.2_ghc-8.2.1 --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/mark/projects/programs/haskell/mmark/.stack-work/logs/code-page-0.1.3.log

    Configuring code-page-0.1.3...
    Preprocessing library for code-page-0.1.3..
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_make.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
    /usr/bin/ld.gold: error: .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_utils.o: requires dynamic R_X86_64_PC32 reloc against 'vprintf' which may overflow at runtime; recompile with -fPIC
    collect2: error: ld returned 1 exit status
    linking .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_make.o failed (exit code 1)
    command was: /usr/bin/gcc .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_make.o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_utils.o -o .stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-2.0.0.2/build/System/Win32/CodePage_hsc_make -fuse-ld=gold -fno-PIE -fno-stack-protector -fuse-ld=gold -L/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/base-4.10.0.0 -Wl,-R,/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/base-4.10.0.0 -L/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/integer-gmp-1.0.1.0 -Wl,-R,/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/integer-gmp-1.0.1.0 -lgmp -L/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/ghc-prim-0.5.1.0 -Wl,-R,/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/ghc-prim-0.5.1.0 -L/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/rts -Wl,-R,/home/mark/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.2.1/lib/ghc-8.2.1/rts -lm -lrt -ldl -lpthread

Which apparently indicates an issue happening while building code-page-0.1.3, an error from the ld.gold linker. I'm wondering if it's an issue with Stack (because I'm using the same resolver and it worked before) or should I open an issue on the issue tracker of the code-page package.

I'm on Arch Linux.

$ stack --version
Version 1.6.1, Git revision f25811329bbc40b0c21053a8160c56f923e1201b (5435 commits) x86_64 hpack-0.20.0

Method of installation: originally unpacked the archive from https://www.stackage.org/stack/linux-x86_64 and copied the binary to ~/.local/bin/, upgraded by running

stack upgrade --git-repo=https://github.com/commercialhaskell/stack

To reproduce:

  • Clone the project I'm having issues with: https://github.com/mrkkrp/mmark
  • Run stack bench mmark.
  • Hopefully (or unfortunately) the issue will manifest itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions