melted / get-idris Goto Github PK
View Code? Open in Web Editor NEWSetting up an Idris dev environment on Windows
Setting up an Idris dev environment on Windows
Clean windows 8.1 patched to current date, on a VM (I can rewind/retry on it)
Only deviation was changing idris cabal-install line to
~/bin/cabal install --max-backjumps=-1
Ran the file from powershell installed in the 8.1 Operating system.
[97 of 97] Compiling Pkg.Package ( src\Pkg\Package.hs, dist\build\Pkg\Package.o )
In-place registering idris-0.9.14.1...
Preprocessing executable 'idris' for idris-0.9.14.1...
[1 of 2] Compiling Paths_idris ( dist\build\autogen\Paths_idris.hs, dist\build\idris\idris-tmp\Paths_idris.o )
[2 of 2] Compiling Main ( main\Main.hs, dist\build\idris\idris-tmp\Main.o )
Linking dist\build\idris\idris.exe ...
C:\t\msys\home\LA\idris\dist\build/libHSidris-0.9.14.1.a(REPL.o):fake:(.text+0x357b): undefined reference to initWinSock' C:\t\msys\home\LA\idris\dist\build/libHSidris-0.9.14.1.a(REPL.o):fake:(.text+0x99c09): undefined reference to
initWinSock'
c:/t/msys/ghc-7.8.3/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\t\msys\home\LA\idris\dist\build/libHSidris-0.9.14.1.a(REPL.o): bad reloc address 0x0 in section `.data'
c:/t/msys/ghc-7.8.3/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status
While running the script on Windows 10, the following line fails:
mv msys64 msys
Error message:
mv : Access to the path 'C:\Users\vladi\get-idris\msys64' is denied.
At C:\Users\vladi\get-idris\get-idris.ps1:112 char:9
+ mv msys64 msys
+ ~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\Users\vladi\get-idris\msys64:DirectoryInfo) [Move-Item], IOException
+ FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand
This is treated as a non-fatal error by the script, which merrily run on, but of course the installation fails.
Workaround:
Open the get-idris.ps1
in PowerShell ISE and set a breakpoint (F9) on on the relevant line (112). Run the script (F5). When you hit the breakpoint, just continue the running the script (F5). The delay of user input ensures that vm can get the permission.
it comes with PS v4
PS C:\Users\pzixe\Documents\Repos\get-idris> .\get-idris.ps1$
Directory: C:\Users\pzixe\Documents\Repos\get-idris$
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 08.12.2019 1:33 downloads
d----- 08.12.2019 1:33 support
Getting 7-zip
Getting msys64
Getting bootstrap GHC 64-bit
Getting cabal.exe
Starting msys configuration
mkdir: cannot change permissions of '/dev/shm': Permission denied
mkdir: cannot change permissions of '/dev/mqueue': Permission denied
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: Generating pacman keyring master key...
gpg: skipping control `%no-protection' ()
+++++
.+++++
gpg: key ABD7CF67 marked as ultimately trusted
gpg: Done
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 4 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 4 signed: 3 trust: 0-, 0q, 0n, 4m, 0f, 0u
gpg: depth: 2 valid: 3 signed: 0 trust: 3-, 0q, 0n, 0m, 0f, 0u
gpg: refreshing 8 keys from hkp://pool.sks-keyservers.net
gpg: requesting key ABD7CF67 from hkp server pool.sks-keyservers.net
gpg: requesting key CA25678A from hkp server pool.sks-keyservers.net
gpg: requesting key AEEA755C from hkp server pool.sks-keyservers.net
gpg: requesting key 3E0D0813 from hkp server pool.sks-keyservers.net
gpg: requesting key 3E652008 from hkp server pool.sks-keyservers.net
gpg: requesting key A47D45A1 from hkp server pool.sks-keyservers.net
gpg: requesting key 2C51581E from hkp server pool.sks-keyservers.net
gpg: requesting key 4CA56930 from hkp server pool.sks-keyservers.net
gpg: key CA25678A: "Alexey Pavlov (Alexpux) <[email protected]>" 4 new signatures
gpg: key AEEA755C: "Martell Malone (martell) <[email protected]>" 3 new signatures
gpg: key 3E0D0813: "Ray Donnelly (MSYS2 Developer - master key) <[email protected]>" 2 new signatures
gpg: key 3E652008: "Ignacio Casal Quinteiro <[email protected]>" 2 new signatures
gpg: key A47D45A1: "Alexey Pavlov (Alexpux) <[email protected]>" 1 new signature
gpg: key 2C51581E: "Martell Malone (MSYS2 Developer) <[email protected]>" not changed
gpg: key 4CA56930: "Ray Donnelly (MSYS2 Developer) <[email protected]>" 2 new signatures
gpg: Total number processed: 7
gpg: unchanged: 1
gpg: new signatures: 14
gpg: keyserver communications error: key not found
gpg: keyserver communications error: bad public key
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 4 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 4 signed: 3 trust: 0-, 0q, 0n, 4m, 0f, 0u
gpg: depth: 2 valid: 3 signed: 0 trust: 3-, 0q, 0n, 0m, 0f, 0u
gpg: keyserver refresh failed: bad public key
==> ERROR: A specified local key could not be updated from a keyserver.
install-info: warning: no info dir entry in `/usr/share/info/time.info.gz'
Installing packages
warning: gzip-1.8-1 is up to date -- reinstalling
warning: dependency cycle detected:
warning: mingw-w64-x86_64-gcc-libgfortran will be installed before its mingw-w64-x86_64-gcc-libs dependency
Getting and building Idris
Cloning into 'idris'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (80/80), done.
Receiving objectsremote: Total 67253 (delta 42), reused 26 (delta 12), pack-reused 67161: % (67253
Receiving objects: 100% (67253/67253), 36.22 MiB | 2.68 MiB/s, done.
Resolving deltas: 100% (45489/45489), done.
Checking out files: 100% (1622/1622), done.
cabal.exe: unrecognised command: v1-install (try --help)
make: *** [Makefile:18: install] Error 1
cabal-install version 2.4.1.0
After providing make manually, I have the following errors:
###################################################################
# #
# #
# C A U T I O N #
# #
# This is first start of MSYS2. #
# You MUST restart shell to apply necessary actions. #
# #
# #
###################################################################
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error: try running pacman-db-upgrade
Config file path source is default config file.
Config file C:\Users\apol\AppData\Roaming\cabal\config not found.
Writing default configuration to C:\Users\apol\AppData\Roaming\cabal\config
Downloading the latest package list from hackage.haskell.org
Resolving dependencies...
Downloading alex-3.1.3...
Configuring alex-3.1.3...
Building alex-3.1.3...
Failed to install alex-3.1.3
Build log ( C:\Users\apol\AppData\Roaming\cabal\logs\alex-3.1.3.log ):
Building alex-3.1.3...
Preprocessing executable 'alex' for alex-3.1.3...
src\Data\Ranged\RangedSet.hs:64:8:
Could not find module `Test.QuickCheck'
There are files missing in the `QuickCheck-2.7.6' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
cabal.exe: Error: some packages failed to install:
alex-3.1.3 failed during the building phase. The exception was:
ExitFailure 1
Cloning into 'idris'...
remote: Counting objects: 33790, done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 33790 (delta 55), reused 3 (delta 0)
Receiving objects: 100% (33790/33790), 20.48 MiB | 586.00 KiB/s, done.
Resolving deltas: 100% (20872/20872), done.
Checking connectivity... done.
Resolving dependencies...
Configuring idris-0.9.15.1...
Failed to install idris-0.9.15.1
Build log ( C:\Users\apol\AppData\Roaming\cabal\logs\idris-0.9.15.1.log ):
cabal.exe: Error: some packages failed to install:
idris-0.9.15.1 failed during the configure step. The exception was:
user error (
dist\setup\setup.hs:23:18:
Could not find module `Data.Text.IO'
There are files missing in the `text-1.2.0.0' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
)
After the check to see if ($msys -eq 32)
both branches call install-msys64
.
The script hasnt been updated for 2 years, and during that time links have expired as new version have become available.
Pacman seems to have seen some changes during that time as well, and things fail PGP check.
Whilst building Idris the cabal install stage fails due to a failure to install/build code-page-0.1.1. Specifically the error message is:
Resolving dependencies...
Configuring code-page-0.1.1...
Building code-page-0.1.1...
Failed to install code-page-0.1.1
Build log ( C:\Users\eabi\AppData\Roaming\cabal\logs\code-page-0.1.1.log ):
Building code-page-0.1.1...
Preprocessing library code-page-0.1.1...
[1 of 2] Compiling System.Win32.CodePage ( dist\build\System\Win32\CodePage.hs, dist\build\System\Win32\CodePage.o )
[2 of 2] Compiling System.IO.CodePage ( src\System\IO\CodePage.hs, dist\build\System\IO\CodePage.o )
src\System\IO\CodePage.hs:119:48:
Couldn't match expected type[GHC.IO.Encoding.Types.TextEncoding]' with actual type
Maybe GHC.IO.Encoding.Types.TextEncoding'
In the second argument ofmapM_', namely
mbOrigStdinEnc'
In a stmt of a 'do' block:
mapM_ (hSetEncoding stdin) mbOrigStdinEnc
src\System\IO\CodePage.hs:131:49:
Couldn't match expected type[GHC.IO.Encoding.Types.TextEncoding]' with actual type
Maybe GHC.IO.Encoding.Types.TextEncoding'
In the second argument ofmapM_', namely
mbOrigStdoutEnc'
In a stmt of a 'do' block:
mapM_ (hSetEncoding stdout) mbOrigStdoutEnc
src\System\IO\CodePage.hs:132:49:
Couldn't match expected type[GHC.IO.Encoding.Types.TextEncoding]' with actual type
Maybe GHC.IO.Encoding.Types.TextEncoding'
In the second argument ofmapM_', namely
mbOrigStderrEnc'
In a stmt of a 'do' block:
mapM_ (hSetEncoding stderr) mbOrigStderrEnc
The problem is because the mapM_ used in CodePage is the one from Prelude. The second argument to this was (with GHC 7.8.4) of type [a], whereas with later versions (at least with GHC 8.0.1) it is the more general (Foldable t) => t a.
In the end (strictly I'm not sure it is) of installation:
[1 of 1] Compiling Main ( dist\setup\setup.hs, dist\setup\Main.o )
Linking .\dist\setup\setup.exe ...
Configuring idris-0.9.15.1...
setup.exe: make: does not exist
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.