Ticket #7359 (new bug)

Opened 8 months ago

Last modified 36 hours ago

unix-2.6.0.0 fails to install on mac os x with 7.4.* (works with 7.6.1)

Reported by: AndreasVoellmy Owned by: igloo
Priority: highest Milestone: 7.6.3
Component: libraries/unix Version: 7.4.1
Keywords: unix package Cc: george.colpitts@…, ekmett@…
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Some package I am trying to build with cabal causes cabal to try to install unix-2.6.0.0 . This fails with the following errors:

[35 of 38] Compiling System.Posix.Signals ( dist/build/System/Posix/Signals.hs, dist/build/System/Posix/Signals.o )
/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c: In function ‘ghc_wrapper_dtUw_sigismember’:

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:8:0:
     warning: dereferencing ‘void *’ pointer

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:8:0:
     error: void value not ignored as it ought to be
/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c: In function ‘ghc_wrapper_dtUF_sigfillset’:

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:10:0:
     warning: dereferencing ‘void *’ pointer

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:10:0:
     error: invalid use of void expression
/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c: In function ‘ghc_wrapper_dtUR_sigdelset’:

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:12:0:
     warning: dereferencing ‘void *’ pointer

/var/folders/_c/4n2x0zfx7mx5gk_46pdxn3pm0000gn/T/ghc30459_0/ghc30459_0.c:12:0:
     error: invalid use of void expression
Failed to install unix-2.6.0.0

This seems to be a recent problem for me, so it may be due to some software updates for mac os x. I am running os x version 10.8.2 build 12c60. I have XCode version 4.5.1 with the "Command Line Tools" installed. I installed ghc from the haskell-platform after updating the os x and xcode (and command line tools).

Change History

Changed 8 months ago by AndreasVoellmy

Additional piece of info on my configuration:

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

Changed 8 months ago by jfischoff

  • summary changed from unix-2.6.0.0 fails to install on mac os x to unix-2.6.0.0 fails to install on mac os x with 7.4.* (works with 7.6.1)

I am also getting this, but the really odd thing about it is I only get it with GHC 7.4.2, works fine with 7.6.1.

Changed 8 months ago by lukexi

Seems related to:  http://hackage.haskell.org/trac/ghc/ticket/2979 (which explains why it works with 7.6.1)

I fixed it by cabal unpacking, and swapping lines 615-622 with those from unix-2.5.1.1 in System/Posix/Signals.hsc: foreign import ccall unsafe "hscore_sigdelset"

c_sigdelset
Ptr CSigset -> CInt -> IO CInt

foreign import ccall unsafe "hscore_sigfillset"

c_sigfillset
Ptr CSigset -> IO CInt

foreign import ccall unsafe "hscore_sigismember"

c_sigismember
Ptr CSigset -> CInt -> IO CInt

and cabal installing.

Changed 4 months ago by george.colpitts

  • cc george.colpitts@… added

Any chance of a fix for this? Many packages depend on unix and these packages can't be installed on Mac OS with the latest Haskell Platform

Changed 4 months ago by george.colpitts

  • keywords unix package added

Changed 4 months ago by andykitchen

bump, unix-2.6.0.1 also fails to build. This breaks a lot of things for Haskell platform users.

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.2

$ gcc-mp-4.7 -v
Using built-in specs.
COLLECT_GCC=gcc-mp-4.7
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.7.2/lto-wrapper
Target: x86_64-apple-darwin12
Configured with: ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin12 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --with-pkgversion='MacPorts gcc47 4.7.2_2'
Thread model: posix
gcc version 4.7.2 (MacPorts gcc47 4.7.2_2) 

Changed 4 months ago by simonmar

  • owner set to igloo
  • difficulty set to Unknown
  • priority changed from normal to highest
  • milestone set to 7.6.3

Ian, I think this is your area.

Changed 3 months ago by ekmett

  • cc ekmett@… added

Changed 3 months ago by AndreasVoellmy

This ticket:2979 seems to be related. It looks like the problem on this ticket would be solved by the commit at the end of ticket:2979, namely 7b24c3fffecbf9fc219c10f24d1472d0d03da6a1. It doesn't look like this commit is in the history for the ghc-7.4.2-release tag.

Changed 2 months ago by MtnViewMark

The unix package is supplied with GHC. You can't, in general, just use a different version. Haskell Platform 2012.4 ships with GHC 7.4.1, which includes unix-2.5.1.1. I wouldn't expect unix-2.6.x.y to work with GHC 7.4.1 at all. Of course unix-2.6.x.y works with GHC 7.6.z, as that is the version of GHC that distributes with it.

I'm curious what caused the OP's system to think it needed unix-2.6.0.0. I'm also wondering if I should be reading something into "I installed ghc from the haskell-platform" - does that mean they installed HP whole, or did some surgery to install just GHC?

Changed 2 months ago by MtnViewMark

Upon further investigation of George's situation, which I suspect is the same as others, this is version of "Cabal hell":

George's system had multiple versions of packages, including some newer versions of packages that are supplied with GHC.

A line from verbose cabal output tells the story:

rejecting: unix-2.5.1.1/installed-296... (conflict: cairo => bytestring==0.10.0.1/installed-9b0..., unix => bytestring==0.9.2.1/installed-004...)

That is, cabal rejected the installed unix-2.5.1.1 because it was compiled against bytestring-0.9.2.1 (both supplied with GHC 7.4.1, and with HP 2012.4.0.0)... and the installed version of cairo it picked (0.12.4) was compiled against bytestring-0.10.0.1 (which was also installed). The only solution cabal could find was to pick unix-2.6.0.1. However, that, as we know (and expect) is incompatible with GHC-7.4.2.

So the bug is that unix should have some dependency on ghc, which in turn would cause Cabal to give up in this situation - because the compiler essentially constrains the version of unix to just one.

Changed 36 hours ago by AndreasVoellmy

It looks like the reason that my package tried to install unix-2.6.0.0 was that my cabal specified "bytestring >= 0.10.0.1" in build-depends field. I don't seem to really need that, so I can fix the problem by deleting that constraint. So this seems to be mainly user error, although fixing the dependency in the way that MtnViewMark?'s last comment suggests may have helped me find the problem earlier.

Note: See TracTickets for help on using tickets.