commercialhaskell/stack

Static linking support under Windows

Offen

#3.197 geöffnet am 05.06.2017

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Haskell (848 Forks)batch import
component: Windowshelp wanted

Repository-Metriken

Stars
 (4.060 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 17T 10h) (6 gemergte PRs in 30 T)

Beschreibung

General summary/comments (optional)

Steps to reproduce

  1. Build a project that depends on grenade or hmatrix libraries with those GHC options: -optl-static -optl-pthread
  2. You'll get this error:
    Linking .stack-work\dist\ca59d0ab\build\grenade-play-exe\grenade-play-exe.exe ...
    C:/Users/MyUser/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -llibopenblas
    C:/Users/MyUser/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -llibgcc_s_seh-1
    C:/Users/MyUser/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -llibgfortran-3
    C:/Users/MyUser/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -llibquadmath-0
    collect2.exe: error: ld returned 1 exit status
    `gcc.exe' failed in phase `Linker'. (Exit code: 1)

Expected

Stack to give the linker MinGW folders to find those GCC and installed libraries.

Actual

Stack give linker errors because cannot find MinGW libraries.

Stack version

Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Contributor Guide