New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error compiling Cabal with custom snapshot #1356

Closed
hesselink opened this Issue Nov 16, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@hesselink
Contributor

hesselink commented Nov 16, 2015

This issue is similar to #1110 but that one is fixed for me, and this isn't. If I compile Cabal-1.22.4.0 on a custom snapshot based on ghc-7.8 which includes a newer unix than comes with that ghc (2.7.1.0 instead of 2.7.0.1), there is an error linking the setup executable for Cabal:

--  While building package Cabal-1.22.4.0 using:
      /usr/local/bin/ghc --make -odir /tmp/stack31011/Cabal-1.22.4.0/.stack-work/dist/x86_64-linux/Cabal-1.18.1.3/setup/ -hidir /tmp/stack31011/Cabal-1.22.4.0/.stack-work/dist/x86_64-linux/Cabal-1.18.1.3/setup/ -i -i. -package=Cabal-1.18.1.3 -clear-package-db -global-package-db -package-db=/home/erik/.stack/snapshots/x86_64-linux/custom-silk-2015-09/7.8.3/pkgdb/ /tmp/stack31011/Cabal-1.22.4.0/Setup.hs -o /tmp/stack31011/Cabal-1.22.4.0/.stack-work/dist/x86_64-linux/Cabal-1.18.1.3/setup/setup
    ...
    <snip compiling modules>
    ....
    Linking /tmp/stack31011/Cabal-1.22.4.0/.stack-work/dist/x86_64-linux/Cabal-1.18.1.3/setup/setup ...
    /usr/local/lib/ghc-7.8.3/unix-2.7.0.1/libHSunix-2.7.0.1.a(execvpe.o): In function `pPrPr_disableITimers':
    execvpe.c:(.text+0x340): multiple definition of `pPrPr_disableITimers'
    /home/erik/.stack/snapshots/x86_64-linux/custom-silk-2015-09/7.8.3/lib/x86_64-linux-ghc-7.8.3/unix-2.7.1.0/libHSunix-2.7.1.0.a(ghcrts.o):(.text+0x0): first defined here

The weird thing is that this only happens on linux (Ubuntu 14.04.1 LTS), not on Mac. I've uploaded a reproduction here. Further information: stack Version 0.1.6.0, Git revision e22271f5ce9afa2cb5be3bad9cafa392c623f85c (2313 commits) x86_64, ghc 7.8.3.

/usr/local/lib/ghc-7.8.3/package.conf.d
   Cabal-1.18.1.3
   HTTP-4000.2.12
   HTTP-4000.2.16.1
   QuickCheck-2.7.6
   array-0.5.0.0
   base-4.7.0.1
   bin-package-db-0.0.0.0
   binary-0.7.1.0
   bytestring-0.10.4.0
   containers-0.5.5.1
   cpphs-1.18.5
   deepseq-1.3.0.2
   directory-1.2.1.0
   filepath-1.3.0.2
   ghc-7.8.3
   ghc-prim-0.3.1.0
   haskeline-0.7.1.2
   haskell2010-1.1.2.0
   haskell98-2.0.0.3
   hoopl-3.10.0.1
   hpc-0.6.0.1
   integer-gmp-0.5.1.0
   mtl-2.1.3.1
   network-2.4.2.3
   old-locale-1.0.0.6
   old-time-1.1.0.2
   parsec-3.1.5
   polyparse-1.9
   pretty-1.1.1.1
   primitive-0.5.3.0
   process-1.2.0.0
   random-1.0.1.1
   rts-1.0
   setenv-0.1.1.1
   stm-2.4.3
   tar-0.4.0.1
   template-haskell-2.9.0.0
   terminfo-0.4.0.0
   text-1.1.0.1
   tf-random-0.5
   time-1.4.2
   transformers-0.3.0.0
   unix-2.7.0.1
   xhtml-3000.2.1
   zlib-0.5.4.1

@mgsloan mgsloan added the type: bug label Nov 16, 2015

@borsboom

This comment has been minimized.

Contributor

borsboom commented Nov 25, 2015

Thanks for the detailed report. I am able to reproduce this locally with stack-0.1.8.0 as well.

@borsboom borsboom added this to the P1: Must milestone Nov 25, 2015

@borsboom borsboom assigned borsboom and unassigned borsboom Nov 30, 2015

@borsboom

This comment has been minimized.

Contributor

borsboom commented Dec 21, 2015

@mgsloan: since you're working on changes to custom snapshots already, can you look into this?

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Dec 22, 2015

Sure! Should be possible to work on this in the next couple weeks.

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 18, 2016

Downgrading to P2 since it doesn't seem to affect many people. Still something to keep in mind for the custom snapshots revamp.

@mgsloan mgsloan modified the milestones: P2: Should, P1: Must Feb 18, 2016

mgsloan added a commit that referenced this issue May 15, 2016

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented May 15, 2016

@hesselink I believe this is now fixed. The issue was that when building Cabal-1.22's Setup.hs, it was linking against Cabal-1.18. I've added a special case for this.

@mgsloan mgsloan closed this May 15, 2016

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