Skip to content
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

nixpkgs.haskellPackages.systemFileio does not build on OS X 10.9 #3540

Closed
jml opened this issue Aug 11, 2014 · 14 comments
Closed

nixpkgs.haskellPackages.systemFileio does not build on OS X 10.9 #3540

jml opened this issue Aug 11, 2014 · 14 comments
Assignees
Labels

Comments

@jml
Copy link
Contributor

jml commented Aug 11, 2014

#3162 was filed reporting the fact that many Haskell packages don't build. This bug tracks a specific issue raised on that one: that systemFileio does not build.

$ nix-env -iA nixpkgs.haskellPackages.systemFileio
installing `haskell-system-fileio-ghc7.8.3-0.3.14-shared'
these derivations will be built:
  /nix/store/9bdwv3s4vjawnnyc9gcy8vy2h28c7b83-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv
building path(s) `/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared'
building /nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared
unpacking sources
unpacking source archive /nix/store/ga1yqdwqzilj4csdjccp4plrv372361n-system-fileio-0.3.14.tar.gz
source root is system-fileio-0.3.14
patching sources
configuring
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
configure flags: --disable-split-objs --disable-library-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --enable-tests  --ghc-option=-optl=-Wl,-headerpad_max_install_names
Configuring system-fileio-0.3.14...
Dependency base >=4.0 && <5.0: using base-4.7.0.1
Dependency bytestring >=0.9: using bytestring-0.10.4.0
Dependency chell ==0.4.*: using chell-0.4
Dependency system-fileio -any: using system-fileio-0.3.14
Dependency system-filepath >=0.3.1 && <0.5: using system-filepath-0.4.12
Dependency temporary >=1.1 && <2.0: using temporary-1.2.0.3
Dependency text >=0.7.1: using text-1.1.1.3
Dependency time >=1.0 && <1.5: using time-1.4.2
Dependency transformers >=0.2: using transformers-0.3.0.0
Dependency unix >=2.3: using unix-2.7.0.1
/nix/store/iz3cwycpp1523m8i5bgm4jaiwvgmsks3-ghc-7.8.3-wrapper/bin/ghc --info
Using Cabal-1.18.1.3 compiled by ghc-7.8
Using compiler: ghc-7.8.3
Using install prefix:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared
Binaries installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/bin
Libraries installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/lib/ghc-7.8.3/system-fileio-0.3.14
Private binaries installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/libexec
Data files installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/share/x86_64-osx-ghc-7.8.3/system-fileio-0.3.14
Documentation installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/share/doc/x86_64-osx-ghc-7.8.3/system-fileio-0.3.14
Configuration files installed in:
/nix/store/9fcqv2i4iq6nra93144sp8i4l18jyfiy-haskell-system-fileio-ghc7.8.3-0.3.14-shared/etc
No alex found
Using ar found on system at:
/nix/store/p14qjms2b4rfycvpmwxrrflxndxraah4-native-darwin-cctools-wrapper/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.8.3 found on system at:
/nix/store/dlj7395zr2rg37qm0hqplf2znis8zjl8-gcc-wrapper-4.8.3/bin/gcc
Using ghc version 7.8.3 found on system at:
/nix/store/iz3cwycpp1523m8i5bgm4jaiwvgmsks3-ghc-7.8.3-wrapper/bin/ghc
Using ghc-pkg version 7.8.3 found on system at:
/nix/store/iz3cwycpp1523m8i5bgm4jaiwvgmsks3-ghc-7.8.3-wrapper/bin/ghc-pkg
No greencard found
Using haddock version 2.14.3 found on system at:
/nix/store/mvaq80bjv98sspzsrk01ha3ybzz058ka-ghc-7.8.3/bin/haddock
No happy found
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/iz3cwycpp1523m8i5bgm4jaiwvgmsks3-ghc-7.8.3-wrapper/bin/hpc
Using hsc2hs version 0.67 found on system at:
/nix/store/iz3cwycpp1523m8i5bgm4jaiwvgmsks3-ghc-7.8.3-wrapper/bin/hsc2hs
Using hscolour version 1.20 found on system at:
/nix/store/dnyvzh0kz416c496gjih06w5mylxjizj-haskell-hscolour-ghc7.8.3-1.20.3-shared/bin/HsColour
No hugs found
No jhc found
Using ld found on system at:
/nix/store/dlj7395zr2rg37qm0hqplf2znis8zjl8-gcc-wrapper-4.8.3/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
No pkg-config found
Using ranlib found on system at:
/nix/store/p14qjms2b4rfycvpmwxrrflxndxraah4-native-darwin-cctools-wrapper/bin/ranlib
Using strip found on system at:
/nix/store/p14qjms2b4rfycvpmwxrrflxndxraah4-native-darwin-cctools-wrapper/bin/strip
Using tar found on system at:
/nix/store/69zqxg4avnxdy2ws45mbih8yrcpaaxys-gnutar-1.27.1/bin/tar
No uhc found
building
Building system-fileio-0.3.14...
Preprocessing library system-fileio-0.3.14...
[1 of 1] Compiling Filesystem       ( lib/Filesystem.hs, dist/build/Filesystem.o )

lib/Filesystem.hs:79:1: Warning:
    The import of ‘when’ from module ‘Control.Monad’ is redundant

lib/Filesystem.hs:95:1: Warning:
    The import of ‘System.IO.Error’ is redundant
      except perhaps to import instances from ‘System.IO.Error’
    To import instances alone, use: import System.IO.Error()

lib/Filesystem.hs:922:1: Warning:
    Defined but not used: ‘throwErrnoPathIfMinus1’
In-place registering system-fileio-0.3.14...
Preprocessing test suite 'filesystem_tests' for system-fileio-0.3.14...
[1 of 3] Compiling FilesystemTests.Util ( tests/FilesystemTests/Util.hs, dist/build/filesystem_tests/filesystem_tests-tmp/FilesystemTests/Util.dyn_o )
[2 of 3] Compiling FilesystemTests.Posix ( tests/FilesystemTests/Posix.hs, dist/build/filesystem_tests/filesystem_tests-tmp/FilesystemTests/Posix.dyn_o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package text-1.1.1.3 ... linking ... done.
Loading package system-filepath-0.4.12 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package system-fileio-0.3.14 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package exceptions-0.6.1 ... linking ... done.
Loading package temporary-1.2.0.3 ... linking ... done.
Loading package ansi-terminal-0.6.1.1 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package monads-tf-0.1.0.2 ... linking ... done.
Loading package options-1.2 ... linking ... done.
Loading package patience-0.1.1 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package chell-0.4 ... linking ... done.

tests/FilesystemTests/Posix.hs:650:9: Warning:
    Defined but not used: ‘subdirContents’
[3 of 3] Compiling Main             ( tests/FilesystemTests.hs, dist/build/filesystem_tests/filesystem_tests-tmp/Main.dyn_o )
Linking dist/build/filesystem_tests/filesystem_tests ...
Running Haddock for system-fileio-0.3.14...
Running hscolour for system-fileio-0.3.14...
Preprocessing library system-fileio-0.3.14...
Preprocessing test suite 'filesystem_tests' for system-fileio-0.3.14...
Preprocessing library system-fileio-0.3.14...

dist/build/tmp-77129/lib/Filesystem.hs:79:1: Warning:
    The import of ‘when’ from module ‘Control.Monad’ is redundant

dist/build/tmp-77129/lib/Filesystem.hs:95:1: Warning:
    The import of ‘System.IO.Error’ is redundant
      except perhaps to import instances from ‘System.IO.Error’
    To import instances alone, use: import System.IO.Error()

dist/build/tmp-77129/lib/Filesystem.hs:922:1: Warning:
    Defined but not used: ‘throwErrnoPathIfMinus1’
Haddock coverage:
 100% ( 46 / 46) in 'Filesystem'
Documentation created: dist/doc/html/system-fileio/index.html,
dist/doc/html/system-fileio/system-fileio.txt
Preprocessing test suite 'filesystem_tests' for system-fileio-0.3.14...
running tests
Running 1 test suites...
Test suite filesystem_tests: RUNNING...
[ ABORT ] posix.copyFile.iso8859
  Test aborted due to exception: /private/var/folders/w4/_b6cpwnj1jb3jphtzkfrzr8w0000gn/T/nix-build-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv-0/tests.iso8859.77146/old_¡¢£.txt: openBinaryFile: does not exist (No such file or directory)

[ ABORT ] posix.withFile.read.iso8859
  Test aborted due to exception: /private/var/folders/w4/_b6cpwnj1jb3jphtzkfrzr8w0000gn/T/nix-build-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv-0/tests.read.iso8859.77146/¡¢£.txt: openBinaryFile: does not exist (No such file or directory)

[ ABORT ] posix.withTextFile.iso8859
  Test aborted due to exception: /private/var/folders/w4/_b6cpwnj1jb3jphtzkfrzr8w0000gn/T/nix-build-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv-0/tests.iso8859.77146/¡¢£.txt: openFile: does not exist (No such file or directory)

FAIL: 81 tests run, 66 tests passed, 12 tests skipped, 3 tests aborted
Test suite filesystem_tests: FAIL
Test suite logged to: dist/test/system-fileio-0.3.14-filesystem_tests.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for `/nix/store/9bdwv3s4vjawnnyc9gcy8vy2h28c7b83-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv' failed with exit code 1
error: build of `/nix/store/9bdwv3s4vjawnnyc9gcy8vy2h28c7b83-haskell-system-fileio-ghc7.8.3-0.3.14-shared.drv' failed
@peti
Copy link
Member

peti commented Aug 11, 2014

Please report that issue upstream. Fixing the package's test suite is beyond the scope of NixOS, so this error is not going to get resolved unless the package authors learns about it.

@jml
Copy link
Contributor Author

jml commented Aug 11, 2014

Will do.

I'm new to nix. How would I go about setting up my local environment to reproduce this problem with the latest cut of this package that failed to build?

@jml
Copy link
Contributor Author

jml commented Aug 11, 2014

Done.

Also, is there any way to work around the broken test suite? (e.g. ignore it? find the local code & fix?). I'm not particularly interested in this package, I just wanted to install yesod, got bitten by #2689 and had to rebuild everything.

@peti
Copy link
Member

peti commented Aug 11, 2014

You can run that build locally by executing the command

$ nix-build -o /tmp/haskell ~/src/nixpkgs -A haskellPackages.systemFileio 

where ~/src/nixpkgs refers to the path of your local Git check-out of the Nixpkgs repository. If you don't have one of those, then

$ nix-env -p /tmp/haskell -iA haskellPackages.systemFileio 

might also work, but I'm not sure about the exact path to the systemFileio attribute on your system in this case. Running

$ nix-env -qaP \* | grep system-fileio

should give you the correct attribute path.

@peti
Copy link
Member

peti commented Aug 11, 2014

About the test suite failure: it is possible to disable the test suite for Darwin machines. Check out the textIcuDoCheckHook in https://github.com/NixOS/cabal2nix/blob/master/src/Cabal2Nix/PostProcess.hs. If necessary, we could add a similar post-processing hook for system-fileio. Then the test suite would be disabled on Darwin, but not on other platforms.

ryantrinkle pushed a commit to ryantrinkle/nixpkgs that referenced this issue Aug 27, 2014
@peti
Copy link
Member

peti commented Nov 8, 2014

What is the state of this issue? Do we still have these kind of problems on Darwin?

@aflatter
Copy link
Contributor

@peti This still is an issue unfortunately. fpco/haskell-filesystem#5

@peti peti self-assigned this Feb 11, 2015
@peti peti reopened this Feb 11, 2015
@peti
Copy link
Member

peti commented Feb 15, 2015

Work-around committed in 2dc7059.

@peti peti closed this as completed Feb 15, 2015
@jml
Copy link
Contributor Author

jml commented Feb 28, 2015

I just tried this and it failed (in OS X 10.10). #6144 is the same bug, it looks like, so I'll put updates there.

@peti
Copy link
Member

peti commented Mar 1, 2015

It would be great to address this issue upstream.

@jml
Copy link
Contributor Author

jml commented Mar 2, 2015

I did. It's now fixed in upstream head. See fpco/haskell-filesystem#5 and fpco/haskell-filesystem#6

@peti
Copy link
Member

peti commented Mar 2, 2015

Very nice! Is there a new release available already that fixes this? Does the test suite succeed on Darwin?

@jml
Copy link
Contributor Author

jml commented Mar 3, 2015

The test suite succeeds on my Darwin (OS X 10.10) laptop. I've learned the hard way not to claim more than that.

Looks like they've done a release already: https://github.com/fpco/haskell-filesystem/blob/master/system-fileio/ChangeLog.md

@peti
Copy link
Member

peti commented Mar 4, 2015

0af5205 re-enables the test suite on Darwin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants