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

Bindist doesn't install haddock binary #5

Closed
borsboom opened this issue Jun 9, 2019 · 5 comments
Closed

Bindist doesn't install haddock binary #5

borsboom opened this issue Jun 9, 2019 · 5 comments

Comments

@borsboom
Copy link

borsboom commented Jun 9, 2019

The bindist in ghc-8.6.5-x86_64-unknown-linux-musl.tar.xz doesn't appear to install haddock when installed using ./configure --prefix=… && make install on Alpine Linux.

I haven't checked any other bindists, so not sure if this is specific to this bindist or applies to all of them.

(I'm investigating whether these bindists can be used to add first-class Alpine/musl support to Stack, and it's looking very promising aside from this. See commercialhaskell/stack#2387 (comment).)

@redneb
Copy link
Owner

redneb commented Jun 10, 2019

I was under the impression that haddock is not built during the (default) ghc build process, it's just an independent package.

I did make the binaries with HADDOCK_DOCS=NO, but I don't think this has anything to do with building haddock itself; it simply controls whether the *.haddock files are generated.

Also, the linux binaries in the official ghc download page do not contain the haddock binary.

@borsboom
Copy link
Author

This GHC issue implies that it's expected for official GHC bindists to include haddock (since it was a bug when it was missing from some Windows bindists). I also verified with an official bindist:

# curl https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz|tar xJf -
…
# cd ghc-8.6.5
# ./configure --prefix=/opt/ghc-8.6.5 && make install
…
# ls -l /opt/ghc-8.6.5/bin/haddock*
lrwxrwxrwx 1 root root  17 Jun 10 09:50 /opt/ghc-8.6.5/bin/haddock -> haddock-ghc-8.6.5
-rwxr-xr-x 1 root root 269 Jun 10 09:50 /opt/ghc-8.6.5/bin/haddock-ghc-8.6.5

Do you recall which BuildFlavour you're using to build these? I think the official bindists use perf.

I did make the binaries with HADDOCK_DOCS=NO

N.B.: Stack expects haddocks to be included with the bindist as well in order for stack haddock to work (since it doesn't rebuild packages that are included with GHC).

Of course you are welcome to package bindists however works for your use case, but it'd be beautiful if Stack could build on your excellent work putting together the bindists without extra duplication of effort.

@redneb
Copy link
Owner

redneb commented Jun 10, 2019

Well, it appears that HADDOCK_DOCS=YES causes haddock to be built and included in the binary-dist tarball. I will try to upload new binaries for 8.6.5 tomorrow.

@redneb
Copy link
Owner

redneb commented Jun 11, 2019

I uploaded a new set of binaries for ghc 8.6.5 which include haddock and all the *.haddock files. Let me know if that works for you.

@borsboom
Copy link
Author

That seems to work great! It passes stack-2.1's more stringent sanity checks, and stack haddock works perfectly. Thank you!

hasufell added a commit to haskell/ghcup that referenced this issue Jul 10, 2019
* the bindists are not official
* we have to allow curl to follow redirects, because github
  hosts on AWS
* bindists are built without haddock support, so those symlinks
  must be conditional for now, see
  redneb/ghc-alt-libc#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants