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

Windows build/install instructions #974

Open
jmn opened this issue Feb 28, 2017 · 6 comments
Open

Windows build/install instructions #974

jmn opened this issue Feb 28, 2017 · 6 comments

Comments

@jmn
Copy link

jmn commented Feb 28, 2017

Hi,
I would like to install and/or build Yi on Windows, but I can't seem to find instructions on how to do so. Also, might it be a good idea to add AppVeyor CI (like Travis CI) to automatically ensure the code builds on Windows.

@noughtmare
Copy link
Member

What have you tried? We don't officially support windows, but the pango frontend should work. AFAIK Using stack install yi should still work on windows.

@jmn
Copy link
Author

jmn commented Feb 28, 2017

Thanks, I tried:

> stack install yi

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for unix-2.7.2.0:
    unbuildable must match <0, but the stack configuration has no specified version

Plan construction failed.

And cabal install yi -fpango :

Failed to install cairo-0.13.3.1
Build log ( C:\Users\jmn\AppData\Roaming\cabal\logs\cairo-0.13.3.1.log ):
Failed to install glib-0.13.4.1
Build log ( C:\Users\jmn\AppData\Roaming\cabal\logs\glib-0.13.4.1.log ):
Failed to install text-icu-0.7.0.1
Build log ( C:\Users\jmn\AppData\Roaming\cabal\logs\text-icu-0.7.0.1.log ):
Configuring text-icu-0.7.0.1...
setup-Simple-Cabal-1.22.5.0-x86_64-windows-ghc-7.10.3.exe: Missing
dependencies on foreign libraries:
* Missing C libraries: icuuc, icuin, icudt
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install terminfo-0.4.0.2
Build log ( C:\Users\jmn\AppData\Roaming\cabal\logs\terminfo-0.4.0.2.log ):

And from git:

C:\Users\jmn\git\yi>stack build

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for unix-2.7.2.0:
    unbuildable must match <0, but the stack configuration has no specified version
needed due to yi-frontend-vty-0.13.5 -> unix-2.7.2.0

Plan construction failed.

@noughtmare
Copy link
Member

Can you try stack install yi --flag yi:-vty that should disable the vty frontend (which requires unix).

@jmn
Copy link
Author

jmn commented Mar 2, 2017

Okay, currently stuck at trying to build glib and cairo:

> stack install yi --flag yi:-vty --extra-lib-dirs=c:\users\jmn\usr\local\lib
process-extras-0.4.1.4: configure
cairo-0.13.3.0: configure
process-extras-0.4.1.4: build
glib-0.13.4.0: configure
optparse-applicative-0.13.0.0: configure
process-extras-0.4.1.4: copy/register
optparse-applicative-0.13.0.0: build
optparse-applicative-0.13.0.0: copy/register
Progress: 4/21
--  While building package glib-0.13.4.0 using:
      C:\Users\jmn\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\bin\ghc.EXE --make -odir C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\.stack-work\dist\ca59d0ab\setup -hidir C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\.stack-work\dist\ca59d0ab\setup -i -i. -package=Cabal-1.24.2.0 -clear-package-db -global-package-db -package-db=C:\sr\snapshots\c77fadea\pkgdb C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\Setup.hs C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs -main-is StackSetupShim.mainOverride -o C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\.stack-work\dist\ca59d0ab\setup\setup -threaded
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\jmn\git\yi\.stack-work\logs\glib-0.13.4.0.log

    [1 of 2] Compiling Main             ( C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\Setup.hs, C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\.stack-work\dist\ca59d0ab\setup\Main.o )

    C:\Users\jmn\AppData\Local\Temp\stack8504\glib-0.13.4.0\Setup.hs:8:29: error:
        * Couldn't match expected type `Distribution.Simple.UserHooks.UserHooks'
                      with actual type `Cabal-1.24.0.0:Distribution.Simple.UserHooks.UserHooks'
          NB: `Cabal-1.24.0.0:Distribution.Simple.UserHooks.UserHooks'
                is defined in `Distribution.Simple.UserHooks'
                    in package `Cabal-1.24.0.0'
              `Distribution.Simple.UserHooks.UserHooks'
                is defined in `Distribution.Simple.UserHooks'
                    in package `Cabal-1.24.2.0'
        * In the first argument of `defaultMainWithHooks', namely
            `gtk2hsUserHooks'
          In the expression: defaultMainWithHooks gtk2hsUserHooks
          In an equation for `main':
              main = defaultMainWithHooks gtk2hsUserHooks


--  While building package cairo-0.13.3.0 using:
      C:\Users\jmn\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\bin\ghc.EXE --make -odir C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\.stack-work\dist\ca59d0ab\setup -hidir C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\.stack-work\dist\ca59d0ab\setup -i -i. -package=Cabal-1.24.2.0 -clear-package-db -global-package-db -package-db=C:\sr\snapshots\c77fadea\pkgdb C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\Setup.hs C:\sr\setup-exe-src\setup-shim-Z6RU0evB.hs -main-is StackSetupShim.mainOverride -o C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\.stack-work\dist\ca59d0ab\setup\setup -threaded
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\jmn\git\yi\.stack-work\logs\cairo-0.13.3.0.log

    [1 of 2] Compiling Main             ( C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\Setup.hs, C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\.stack-work\dist\ca59d0ab\setup\Main.o )

    C:\Users\jmn\AppData\Local\Temp\stack8504\cairo-0.13.3.0\Setup.hs:8:29: error:
        * Couldn't match expected type `Distribution.Simple.UserHooks.UserHooks'
                      with actual type `Cabal-1.24.0.0:Distribution.Simple.UserHooks.UserHooks'
          NB: `Cabal-1.24.0.0:Distribution.Simple.UserHooks.UserHooks'
                is defined in `Distribution.Simple.UserHooks'
                    in package `Cabal-1.24.0.0'
              `Distribution.Simple.UserHooks.UserHooks'
                is defined in `Distribution.Simple.UserHooks'
                    in package `Cabal-1.24.2.0'
        * In the first argument of `defaultMainWithHooks', namely
            `gtk2hsUserHooks'
          In the expression: defaultMainWithHooks gtk2hsUserHooks
          In an equation for `main':
              main = defaultMainWithHooks gtk2hsUserHooks

@noughtmare
Copy link
Member

noughtmare commented Mar 2, 2017

This is a known issue with building gtk2hs projects with stack.

Try stack setup --upgrade-cabal and then try again (maybe first stack clean).

Try installing with cabal If that doen't work.

Edit: building with --resolver lts-6 might also work.

@ghost
Copy link

ghost commented May 4, 2019

circa 2015 blog Post running XP Home (32-bit)

C:>ECHO %ProgramFiles%
C:\Programmer

C:>

i.e., installed on a Danish version XP

gtk+-bundle_3.6.4-20130921_win32.zip
HaskellPlatform-2014.2.0.0-i386-setup.exe

https://nurmi-labs.blogspot.com/2015/10/yi.html

presuming you intend for a Windows-native not WSL install

https://nurmi-labs.blogspot.com/2017/03/p9p.html

for WSL you could use VcXsrv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants