Skip to content

Trouble building with profiling enabled #50

Closed

Description

@nagaflokhu

I am unable to build this package with cabal. In particular, running cabal install -p random produces the following error message:

/usr/bin/ld.gold: fatal error: -pie and -r are incompatible
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
cabal: Leaving directory '/tmp/cabal-tmp-22972/random-1.1'
cabal: Error: some packages failed to install:
random-1.1-9LLJAJa4iQFLJiLXBOBXBV failed during the building phase. The
exception was:
ExitFailure 1

There are also warnings about tab characters further up cabal's message.

cabal install random (without the -p flag) doesn't give me errors.

Some relevant information:

$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
$ gcc --version
gcc (GCC) 8.2.1 20180831
$ grep DISTRIB /etc/lsb-release 
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.0.0
DISTRIB_CODENAME=Illyria
DISTRIB_DESCRIPTION="Manjaro Linux"

Please let me know if I can help and thank you!

Activity

  1. cartazio commented on Nov 22, 2018

    @cartazio
    Contributor
    1. i usually just have library-profiling: True in my ~/.cabal/config directory

    2. i see this manjaro is based on arch, from what i know, ANY use of ANY of the standard haskell builds of various stuff as provided by Arch, will be broken in some frustrating way

    3. i see you're using GOLD, an alternative linker on linux. have you considered trying either gnu ld or llvm ld? cursory googling suggests that GOLD sometimes has gotchas in terms of search path or other stuff https://stackoverflow.com/questions/3476093/replacing-ld-with-gold-any-experience/30801735

    4. you didn't install the profiling flavor of the base ghc / base / etc libraries?

  2. nagaflokhu commented on Nov 26, 2018

    @nagaflokhu
    Author

    Thanks a lot for replying so quickly and in so much detail! I see from your reply that my issue has nothing to do with the random package: feel free to close this issue.

    I tried setting library-profiling: True and reinstalling random, but that didn't work. I've been reading about using Haskell on Arch and about changing ghc's behaviour (in this case, getting it to use another linker). As for the profiling flavor of other libraries, I don't think so. I installed the Haskell Platform.

  3. cartazio commented on Nov 26, 2018

    @cartazio
    Contributor
  4. nagaflokhu commented on Nov 27, 2018

    @nagaflokhu
    Author

    I installed Arch's ghc, uninstalled it, and then installed the Haskell Platform. I mention the first installation in case it might affect the ghc that came with the Haskell Platform.

    I don't have a Debian or Ubuntu machine, but I will try reproducing this on Linux Mint (based off Ubuntu). Thanks!

  5. lehins commented on Jun 23, 2020

    @lehins
    Contributor

    Closing. Indeed this issue is not specific to random package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions