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

Update GHC to 8.0.2, pull in upstream Arch scripts #2204

Merged
merged 2 commits into from
Feb 27, 2017

Conversation

alethea
Copy link
Contributor

@alethea alethea commented Feb 24, 2017

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.

patch -Np1 -i "$srcdir/0006-Add-MinGW-_unlock_file-symbol.patch"

./boot
./configure \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move ./configure to build().

@mingwandroid
Copy link
Member

@Mistuke, can I request a review of this please? Thanks in advance.

@Mistuke
Copy link
Contributor

Mistuke commented Feb 24, 2017

@mingwandroid sure, I'll take a look tonight.

Copy link
Contributor

@Mistuke Mistuke left a 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
Copy link
Contributor

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"
Copy link
Contributor

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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'
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@alethea
Copy link
Contributor Author

alethea commented Feb 25, 2017

Not sure why CI is failing, looks like something to do with an older GCC? It build okay on my machine.

@mati865
Copy link
Collaborator

mati865 commented Feb 25, 2017

Not sure why CI is failing

It's Wine bug, Tea is Linux running MSYS2 under Wine.

@Alexpux Alexpux merged commit f867cfd into msys2:master Feb 27, 2017
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

Successfully merging this pull request may close these issues.

5 participants