Giter Club home page Giter Club logo

Comments (5)

NicolasT avatar NicolasT commented on August 10, 2024

Now that's interesting... I have no clue why some tool would require access to $GHC_ROOT/lib/ghc-8.0.1/settings, what that file would/should contain, and why it's not there while it's expected to be.

I'll dig into this, though I'd be very surprised this is caused by something specific to reedsolomon: as far as I know the package does nothing fancy specific to Haddock:

$ git grep -i haddock
circle.yml:    - cabal haddock --hyperlink-source
src/Data/ReedSolomon.lhs:> {-# OPTIONS_HADDOCK show-extensions #-}
src/Data/Vector/Generic/Sized.hs:{-# OPTIONS_HADDOCK show-extensions #-}
src/Data/Vector/Storable/ByteString.hs:{-# OPTIONS_HADDOCK show-extensions #-}

As you can see, on CircleCI I do run cabal haddock --hyperlink-source, not using Stack but system-installed GHC, which completes successfully: see the artifacts at https://457-39705040-gh.circle-artifacts.com/0//tmp/circle-artifacts.opF3BYY/index.html

from reedsolomon.

bergmark avatar bergmark commented on August 10, 2024

I filed a stack issue for this commercialhaskell/stack#2631

from reedsolomon.

NicolasT avatar NicolasT commented on August 10, 2024

Here's what's going on:

$ strace -ff stack haddock 2>&1 | grep settings
[pid 18809] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18821] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18857] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18876] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18876] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18880] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18889] open("/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 10
[pid 18901] open("The Glorious Glasgow Haskell Compilation System, version 8.0.1\n/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings", O_RDONLY|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
/home/nicolas/.stack/programs/x86_64-linux/ghc-8.0.1/lib/ghc-8.0.1/settings: openFile: does not exist (No such file or directory)

The package contains a 'wrapper' for GHC to sometimes alter arguments passed to GHC, because there's no sane way to do so through Cabal: build-tools/ghc-wrapper (which is set as the GHC executable in Setup.hs).

Changing this to simply run GHC, then building Haddocks, works:

$ git diff
diff --git a/build-tools/ghc-wrapper b/build-tools/ghc-wrapper
index 7d9553e..5875c87 100755
--- a/build-tools/ghc-wrapper
+++ b/build-tools/ghc-wrapper
@@ -1,5 +1,7 @@
 #!/bin/bash -ue

+exec $@
+
 set -ue

 set +e

Some tool somewhere parses some kind of GHC output to retrieve some file location, then tries to open it, but my wrapper changes the output of GHC slightly (which I didn't expect it to?!). Needs more investigation, but doesn't seem like a Stack (or Stack GHC dist) issue.

from reedsolomon.

NicolasT avatar NicolasT commented on August 10, 2024

Hmpf, my wrapper outputs some stuff on GHC 8 systems, which is not expected of course. This patch fixes this:

diff --git a/build-tools/ghc-wrapper b/build-tools/ghc-wrapper
index 7d9553e..28239a0 100755
--- a/build-tools/ghc-wrapper
+++ b/build-tools/ghc-wrapper
@@ -10,7 +10,7 @@ RC=$?
 set -e

 set +e
-$1 --version | grep 'version 8'
+$1 --version | grep 'version 8' > /dev/null 2>&1
 GHC8=$?
 set -e

I'll need to create a new release. The build on CircleCI succeeded because there GHC 7 is used.

from reedsolomon.

NicolasT avatar NicolasT commented on August 10, 2024

reedsolomon-0.0.4.2 containing a fix has been pushed to Hackage. The CI scripts were adapted to validate Haddock building on supported platforms/build systems as well.

from reedsolomon.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.