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 build alex from git sources? Instructions in README.md are broken. #198

Open
andreasabel opened this issue Jan 22, 2022 · 3 comments
Labels
bug build / install Concerning building and/or installing Alex documentation

Comments

@andreasabel
Copy link
Member

https://github.com/simonmar/alex/blob/e4843f22818451299acd3620042b151ad2294ace/README.md#L51-L57
Nope:

$ cabal install
Error: cabal: sdist of alex-3.2.7: filepath wildcard 'src/Parser.y.boot' does
not match any files.

https://github.com/simonmar/alex/blob/e4843f22818451299acd3620042b151ad2294ace/README.md#L59-L66
Again, sorry, no (even with the correct tarball location):

$ make sdist
...
Wrote tarball sdist to
./dist-newstyle/sdist/alex-3.2.7.tar.gz
...
$ cabal install ./dist-newstyle/sdist/alex-3.2.7.tar.gz
Error: cabal: Unknown target './dist-newstyle/sdist/alex-3.2.7.tar.gz'.
The package alex has no file target 'dist-newstyle/sdist/alex-3.2.7.tar.gz'.

The Makefile goals work though, e.g., I can run the tests locally with make sdist-test.

@Ericson2314
Copy link
Collaborator

Ericson2314 commented Jan 23, 2022

Ah sorry this is annoying

  1. cabal install dist/alex-*.tar.gz I think fails because this was removed in v2-build or something, just a guess. At least I am pretty sure I took it from the old readme when reformatting and I assume it once worked.

  2. Error: cabal: sdist of alex-3.2.7: filepath wildcard 'src/Parser.y.boot' does not match any files.

    sounds like something got messed up with the build system overhauls. I think I can fix.

@andreasabel andreasabel added bug build / install Concerning building and/or installing Alex documentation labels Jan 25, 2022
@BridgeTheMasterBuilder
Copy link

What's the status on this? It seems to still be broken.

@andreasabel
Copy link
Member Author

andreasabel commented Sep 26, 2023

This should work from the project root (semi-tested):

ROOT=$PWD
TMP=$(mktemp -d)
make sdist
cd $TMP
cabal get $ROOT/dist-newstyle/sdist/alex-*
cd alex-*
cabal install
cd $ROOT
rm -rf $TMP

If the root didn't have a cabal.project, one could do without switching to a temporary directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build / install Concerning building and/or installing Alex documentation
Projects
None yet
Development

No branches or pull requests

3 participants