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

How to install GHCJS? #819

Open
hasufell opened this issue Oct 26, 2021 · 17 comments
Open

How to install GHCJS? #819

hasufell opened this issue Oct 26, 2021 · 17 comments

Comments

@hasufell
Copy link

I'm looking at the readme and it provides no installation instructions.

https://github.com/ghcjs/ghcjs#quick-start---developing-ghcjs seems to talk about "Developing GHCJS".

@jneira
Copy link

jneira commented Oct 26, 2021

I think you will get more info about ghcjs in https://github.com/dmjio/miso#quick-start than in this repo

@hasufell
Copy link
Author

@jneira I'm not interested in using nix.

Also see: https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/275

@jneira
Copy link

jneira commented Oct 26, 2021

There are some outdated instructions using... you guess? stack! here: https://github.com/ghcjs/ghcjs/wiki/GHCJS-User-Guide
I installed it from source in windows using its ghc make build system (copied from ghc) or cabal

@Mikolaj
Copy link

Mikolaj commented Oct 26, 2021

I installed [edit: on Ubuntu] with cabal new-build when GHC 8.6.5 was the highest version supported. The instructions in README were enough, with a hicup or two.

@hasufell
Copy link
Author

So there are no bindists?

@Mikolaj
Copy link

Mikolaj commented Oct 26, 2021

I don't think there are any.

@jneira
Copy link

jneira commented Oct 26, 2021

I had a little hiccup installing it in windows too: #750

@Mikolaj
Copy link

Mikolaj commented Oct 26, 2021

This is closest to bindist that it ever was, I think: https://launchpad.net/~hvr/+archive/ubuntu/ghcjs

@hasufell
Copy link
Author

I don't think there are any.

Why? Is something wrong with the build system?

@Mikolaj
Copy link

Mikolaj commented Oct 26, 2021

I don't think there are any.

Why? Is something wrong with the build system?

Not right now, it probably builds now, but there are years when nothing builds or only old GHCs do.

However, GHCJS is formally a set of libraries, one of them not on hackage. You just build them with cabal or something and that's the build system and the bindists would just be the built versions of the packages, which may presumably depend on the version of node or the webassembly compiler that has a name similar to emacs and these are not bundled. The old version @hvr built only required node, but no idea if he included it and what extra tricks were needed.

@hasufell
Copy link
Author

Excellent, so only the ancient long gone Maya still know the ways to build a GHCJS bindist... knowledge isn't linear. Sometimes it's lost. 😭

@Mikolaj
Copy link

Mikolaj commented Oct 26, 2021

Moreover, we know that the tradition of the ancients worked great for them and made them happy, but even if recovered, it can't be applied to our situation (the webassembly thing and probably other changes).

@Ericson2314
Copy link
Member

I think basically all GHCJS uses use Nix....precisely because it is best way to codify this sort of knowledge so it doesn't rot away!

Look at:

The current plan as I am told is also to upstream GHCJS so these issues go away once and for all.

@cdsmith
Copy link

cdsmith commented Oct 27, 2021

For what it's worth, I'm a GHCJS user who doesn't use nix. See https://github.com/google/codeworld/blob/master/install.sh#L203 for the build process I use.

@hasufell
Copy link
Author

I think basically all GHCJS uses use Nix

Apparently not, because users have requested GHCJS support in ghcup, which is why I'm investigating the options.

For what it's worth, I'm a GHCJS user who doesn't use nix. See https://github.com/google/codeworld/blob/master/install.sh#L203 for the build process I use.

That looks interesting.

@phadej
Copy link
Contributor

phadej commented Oct 29, 2021

I think basically all GHCJS uses use Nix

I don't. I have build my own .deb at https://github.com/phadej/ghcjs-ubuntu, i tried to document what I did, but is PITA to do. The steps take quite some time (e.g. booting the boot libraries, see https://github.com/phadej/ghcjs-ubuntu/blob/master/ghcjs-8.6/boot-bin.sh).

IMHO, ghcup installation from source is not viable in uncontrolled environment, so I'd think twice before adding support to ghcup.

@phadej
Copy link
Contributor

phadej commented Oct 29, 2021

Forgot to mention: nor GHCJS ever had any proper releases, which further adds inconvenience.

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

6 participants