-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update GHC to 8.0.2, pull in upstream Arch scripts #2204
Conversation
mingw-w64-ghc/PKGBUILD
Outdated
patch -Np1 -i "$srcdir/0006-Add-MinGW-_unlock_file-symbol.patch" | ||
|
||
./boot | ||
./configure \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move ./configure
to build().
@Mistuke, can I request a review of this please? Thanks in advance. |
@mingwandroid sure, I'll take a look tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ghc
patches are fine, just a few comments about the build stuff.
|
||
$(CPP) $($1_$2_MKDEPENDC_OPTS) $($1_$2_$(firstword $($1_$2_WAYS))_ALL_CC_OPTS) $($(basename $4)_CC_OPTS) -MM -x c $4 -MF $3.bit | ||
- $(foreach w,$5,sed -e 's|\\|/|g' -e 's| /$$| \\|' -e "1s|\.o|\.$($w_osuf)|" -e "1s|^|$(dir $4)|" -e "1s|$1/|$1/$2/build/|" -e "1s|$2/build/$2/build|$2/build|g" -e "s|$(TOP)/||g$(CASE_INSENSITIVE_SED)" $3.bit >> $3.tmp &&) true | ||
+ $(foreach w,$5,sed -e 's|\\|/|g' -e 's|\r$$||' -e 's| /$$| \\|' -e "1s|\.o|\.$($w_osuf)|" -e "1s|^|$(dir $4)|" -e "1s|$1/|$1/$2/build/|" -e "1s|$2/build/$2/build|$2/build|g" -e "s|$(TOP)/||g$(CASE_INSENSITIVE_SED)" $3.bit >> $3.tmp &&) true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed anymore. sed got patched by MSYS as the recent behavior is a regression on Windows.
"${MINGW_PACKAGE_PREFIX}-haskell-cabal") | ||
|
||
|
||
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-sphinx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newer sphinx also requires the requests
package now. I don't know how you'd specify it since it needs pip to install but without it the compile should fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, perfect!
"https://downloads.haskell.org/~ghc/$pkgver/ghc-$pkgver-testsuite.tar.xz" | ||
"https://downloads.haskell.org/~ghc/$pkgver/ghc-$pkgver-src.tar.xz"{,.sig} | ||
"https://downloads.haskell.org/~ghc/$pkgver/ghc-$pkgver-testsuite.tar.xz"{,.sig} | ||
"https://downloads.haskell.org/~ghc/$pkgver/ghc-$pkgver-$_hsarch-unknown-mingw32.tar.xz"{,.sig} | ||
'build.mk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's in the build.mk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's configuration settings for a release build of the GHC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, it's re-using the one from the previous patch. Got it.
unzip -o cabal-install-1.24.0.0-$SYST-unknown-mingw32.zip -d host/bin | ||
export PATH=$srcdir/host/bin:$PATH | ||
cabal update | ||
cabal install alex happy --prefix=$srcdir/host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy
and alex
are required. I don't see them being provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. It builds without them, so I assumed they're in the source tree and the host compiler builds them, but I'll check, and add the binaries if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the host compiler doesn't build them as we need them to be resolved at configure time. Likely they're being picked up from a different location or a previous install. It's also a long existing limitation of Cabal
that the solver can't currently resolve build-tools
only dependencies see haskell/cabal#4217 and haskell/cabal#4241
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we feel about using cabal-install
to install them? I don't like that it adds a download step that doesn't run through the SHA sums checks, but I think that's the cleanest thing to do until I can get them packaged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alethea Ah no need. I see that the files are pre-processed in the source distributions. Which is why configure allows them to be missing. Fair enough, from the GHC
point of view this looks good.
Not sure why CI is failing, looks like something to do with an older GCC? It build okay on my machine. |
It's Wine bug, Tea is Linux running MSYS2 under Wine. |
This should get it building again, and the upstream scripts should make it possible to handle Haskell libraries for distributing the rest of the Haskell platform.