commercialhaskell / commercialhaskell/stack

Stack fails to build threadscope with TH on Windows

Open
#3,334 1 comment 1 reaction 0 assignees View on GitHub
component: Windows
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

### General summary/comments (optional)

I'm investigating why [this branch of threadscope](https://github.com/maoe/ThreadScope/tree/1da0d1cd810539c4a8321e3739bc81ea5fbe8ab2) fails to build with stack on Windows.

### Steps to reproduce
I've tested the following procedure with Windows Server 2016 on Google Compute Engine.

1. Install the latest stack (1.5.1-windows-x86_64) using the installer
1. Install the latest MSYS2 (msys2-x86_64-20161025)
1. Launch MINGW64 shell and update packages (restart the shell as needed)
- `pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime msys2-runtime-devel`
- `pacman --noconfirm -Syuu`
- `pacman --noconfirm -Suu`
1. Check out [this threadscope](https://github.com/maoe/ThreadScope/tree/1da0d1cd810539c4a8321e3739bc81ea5fbe8ab2)
1. Install gtk2 and pkg-config
- `pacman -S $MINGW_PACKAGE_PREFIX-{gtk2,pkg-config}`
1. Build threadscope using the existing MSYS2
- `echo 'export PATH=$APPDATA/local/bin:$PATH' >> ~/.profile`
- `source ~/.profile`
- `stack build --skip-msys threadscope`

### Expected

Stack builds threadscope without errors.

### Actual

It fails while building the modules in the threadscope project. The stack output is [here](https://gist.github.com/maoe/55c993682b79e9e2f1f38d4b28fa4bdd).

If I do the same thing in command prompt, an error dialog pops up with the following message:

> The procedure entry point inflateValidate could not be located in the dynamic link library C:\msys64\mingw64\bin\libpng16-16.dll.

I suspect this is a stack misbehavior because `cabal new-build` using the GHC which was downloaded by stack works just fine in the same shell.

### Stack version

```
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e x86_64 hpack-0.17.1
```

### Method of installation

Official binary using the Windows x86_64 installer.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.