|
476 | 476 |
|
477 | 477 | See the [Azure CI](topics/azure_ci.md) documentation. |
478 | 478 |
|
479 | | -## Windows-related |
480 | | - |
481 | | -??? question "What is licensing restrictions on Windows?" |
482 | | - |
483 | | - Currently, on Windows, GHC produces binaries linked statically with |
484 | | - [GNU Multiple Precision Arithmetic Library](https://gmplib.org/) (GMP), which is |
485 | | - used by [integer-gmp](https://hackage.haskell.org/package/integer-gmp) library |
486 | | - to provide big integer implementation for Haskell. Contrary to the majority of |
487 | | - Haskell code licensed under permissive BSD3 license, GMP library is licensed |
488 | | - under LGPL, which means resulting binaries |
489 | | - [have to be provided with source code or object files](http://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic). |
490 | | - That may or may not be acceptable for your situation. Current workaround is to |
491 | | - use GHC built with alternative big integer implementation called |
492 | | - `integer-simple`, which is free from LGPL limitations as it's pure Haskell and |
493 | | - does not use GMP. Unfortunately it has yet to be available out of the box with |
494 | | - Stack. See issue [#399](https://github.com/commercialhaskell/stack/issues/399) |
495 | | - for the ongoing effort and information on workarounds. |
496 | | - |
497 | | -??? question "How to get a working executable on Windows?" |
498 | | - |
499 | | - When executing a binary after building with `stack build` (e.g. for target |
500 | | - "foo"), the command `foo.exe` might complain about missing runtime libraries |
501 | | - (whereas `stack exec foo` works). |
502 | | - |
503 | | - Windows is not able to find the necessary C++ libraries from the standard |
504 | | - prompt because they're not in the PATH environment variable. `stack exec` works |
505 | | - because it's modifying PATH to include extra things. |
506 | | - |
507 | | - Those libraries are shipped with GHC (and, theoretically in some cases, MSYS2). |
508 | | - The easiest way to find them is `stack exec which`. For example, command: |
509 | | - |
510 | | - ~~~text |
511 | | - stack exec -- which libstdc++-6.dll |
512 | | - /c/Users/Michael/AppData/Local/Programs/stack/i386-windows/ghc-7.8.4/mingw/bin/libstdc++-6.dll |
513 | | - ~~~ |
514 | | - |
515 | | - A quick workaround is adding this path to the PATH environment variable or |
516 | | - copying the files somewhere Windows finds them (see |
517 | | - https://msdn.microsoft.com/de-de/library/7d83bc18.aspx). |
518 | | - |
519 | | - See issue [#425](https://github.com/commercialhaskell/stack/issues/425). |
520 | | - |
521 | | - Another issue that may arise with building on Windows is as follows. The default |
522 | | - location of Stack's programs folder is `%LOCALAPPDATA\Programs\stack`. If there |
523 | | - is a space character in the `%LOCALAPPDATA%` path this may, in some |
524 | | - circumstances, cause problems with building packages that make use of the GNU |
525 | | - project's `autoconf` package and `configure` shell script files. It may be |
526 | | - necessary to override the default location of Stack's programs folder. See the |
527 | | - [local-programs-path](configure/yaml/non-project.md#local-programs-path) option |
528 | | - for more information. |
529 | | - |
530 | | - See issue [#4726](https://github.com/commercialhaskell/stack/issues/4726). |
531 | | - |
532 | 479 | ## Setup-related |
533 | 480 |
|
534 | 481 | ??? question "Where is Stack installed?" |
|
658 | 605 |
|
659 | 606 | Issue [#4009](https://github.com/commercialhaskell/stack/issues/4009) goes into |
660 | 607 | further detail. |
| 608 | + |
| 609 | +## Windows-related |
| 610 | + |
| 611 | +??? question "What is licensing restrictions on Windows?" |
| 612 | + |
| 613 | + Currently, on Windows, GHC produces binaries linked statically with |
| 614 | + [GNU Multiple Precision Arithmetic Library](https://gmplib.org/) (GMP), which is |
| 615 | + used by [integer-gmp](https://hackage.haskell.org/package/integer-gmp) library |
| 616 | + to provide big integer implementation for Haskell. Contrary to the majority of |
| 617 | + Haskell code licensed under permissive BSD3 license, GMP library is licensed |
| 618 | + under LGPL, which means resulting binaries |
| 619 | + [have to be provided with source code or object files](http://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic). |
| 620 | + That may or may not be acceptable for your situation. Current workaround is to |
| 621 | + use GHC built with alternative big integer implementation called |
| 622 | + `integer-simple`, which is free from LGPL limitations as it's pure Haskell and |
| 623 | + does not use GMP. Unfortunately it has yet to be available out of the box with |
| 624 | + Stack. See issue [#399](https://github.com/commercialhaskell/stack/issues/399) |
| 625 | + for the ongoing effort and information on workarounds. |
| 626 | + |
| 627 | +??? question "How to get a working executable on Windows?" |
| 628 | + |
| 629 | + When executing a binary after building with `stack build` (e.g. for target |
| 630 | + "foo"), the command `foo.exe` might complain about missing runtime libraries |
| 631 | + (whereas `stack exec foo` works). |
| 632 | + |
| 633 | + Windows is not able to find the necessary C++ libraries from the standard |
| 634 | + prompt because they're not in the PATH environment variable. `stack exec` works |
| 635 | + because it's modifying PATH to include extra things. |
| 636 | + |
| 637 | + Those libraries are shipped with GHC (and, theoretically in some cases, MSYS2). |
| 638 | + The easiest way to find them is `stack exec which`. For example, command: |
| 639 | + |
| 640 | + ~~~text |
| 641 | + stack exec -- which libstdc++-6.dll |
| 642 | + /c/Users/Michael/AppData/Local/Programs/stack/i386-windows/ghc-7.8.4/mingw/bin/libstdc++-6.dll |
| 643 | + ~~~ |
| 644 | + |
| 645 | + A quick workaround is adding this path to the PATH environment variable or |
| 646 | + copying the files somewhere Windows finds them (see |
| 647 | + https://msdn.microsoft.com/de-de/library/7d83bc18.aspx). |
| 648 | + |
| 649 | + See issue [#425](https://github.com/commercialhaskell/stack/issues/425). |
| 650 | + |
| 651 | + Another issue that may arise with building on Windows is as follows. The default |
| 652 | + location of Stack's programs folder is `%LOCALAPPDATA\Programs\stack`. If there |
| 653 | + is a space character in the `%LOCALAPPDATA%` path this may, in some |
| 654 | + circumstances, cause problems with building packages that make use of the GNU |
| 655 | + project's `autoconf` package and `configure` shell script files. It may be |
| 656 | + necessary to override the default location of Stack's programs folder. See the |
| 657 | + [local-programs-path](configure/yaml/non-project.md#local-programs-path) option |
| 658 | + for more information. |
| 659 | + |
| 660 | + See issue [#4726](https://github.com/commercialhaskell/stack/issues/4726). |
0 commit comments