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

CI: Nightly Docker builds broken due to change in alex-3.5.0.0's command-line flags #1599

Closed
RyanGlScott opened this issue Jan 4, 2024 · 0 comments · Fixed by #1600
Closed
Labels
CI Continuous integration

Comments

@RyanGlScott
Copy link
Contributor

Recent nightly CI jobs are failing to build Dockerfiles, which attempt to install the latest version of alex (3.5.0.0). Here is an example from a recent CI job:

#13 137.2 checking for version of alex... Option '--verbose' not yet implementedUsage: alex [OPTION...] file
#13 137.2 
#13 137.2   -o FILE    --outfile=FILE     write the output to FILE (default: file.hs)
#13 137.2   -i[FILE]   --info[=FILE]      put detailed state-machine info in FILE (or file.info)
#13 137.2   -t DIR     --template=DIR     look in DIR for template files
#13 137.2   -g         --ghc              use GHC extensions
#13 137.2   -l         --latin1           generated lexer will use the Latin-1 encoding instead of UTF-8
#13 137.2   -s NUMBER  --tab-size=NUMBER  set tab size to be used in the generated lexer (default: 8)
#13 137.2   -d         --debug            produce a debugging scanner
#13 137.2   -v         --verbose          be verbose (not yet implemented)
#13 137.2   -?         --help             display this help and exit
#13 137.2   -V         --version          output version information and exit
#13 137.2              --numeric-version  output the version number and exit
#13 137.2 
#13 137.2 configure: error: Alex >= 3.2.6 && < 4 is required to compile GHC.
#13 ERROR: process "/bin/sh -c if ${PORTABILITY}; then         ghcup install ghc ${GHCVER_BOOTSTRAP} &&         ghcup set ghc ${GHCVER_BOOTSTRAP} &&         cabal v2-update &&         cabal v2-install alex happy-1.20.1.1 &&         git clone --recurse-submodules --depth 1 --branch ghc-${GHCVER}-release https://gitlab.haskell.org/ghc/ghc.git &&         cd ./ghc &&         git apply ../ghc-portability.patch &&         ./boot &&         ./configure &&         make -j &&         make install &&         cd .. &&         rm -rf ./ghc &&         ghcup rm ghc ${GHCVER_BOOTSTRAP};     else         ghcup install ghc ${GHCVER} &&         ghcup set ghc ${GHCVER};     fi" did not complete successfully: exit code: 1

The problem is that alex-3.5.0.0 changed the meaning of the -v flag from "return the version" to "dump verbose output", but the version of GHC that is built in this Dockerfile still assumes that -v means the former. See also this related GHC issue.

The most straightforward solution would be to explicitly pin the version of alex that the Dockerfile builds, much like we currently pin the version of happy that we build.

@RyanGlScott RyanGlScott added the CI Continuous integration label Jan 4, 2024
RyanGlScott added a commit that referenced this issue Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant