Open augustss opened 3 years ago
Lennart! Good to see you here :-) Ah, I actually develop Koka mainly on Windows so it should just work.
Note that you need to run in a x64 Visual Studio command prompt (or otherwise koka cannot link with the windows SDK or find the CL compiler). I also have clang-cl installed as remarked in the releases page. If you have time, let me know what went wrong so I can fix it for others. Best, Daan
I want it to be as easy as for Linux/MacOS. I.e., just run some command. Or use a standard Windows installer. I don't want to fire up VS to just try out Koka. I have a very low tolerance for nonsense these days. :)
Hi there, I'm also running into installation issues on Windows
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.4.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
C:\Program Files\Microsoft Visual Studio\2022\Community>curl -sSL -o %tmp%\install-koka.bat https://github.com/koka-lang/koka/releases/download/v2.4.0/install.bat && %tmp%\install-koka.bat
Downloading: https://github.com/koka-lang/koka/releases/download/v2.4.0/koka-v2.4.0-windows-x64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 40.7M 100 40.7M 0 0 6714k 0 0:00:06 0:00:06 --:--:-- 7456k
Installing to prefix: C:\Users\[user]\AppData\Local\koka
- unpacking..
- install pre-compiled libraries: <prefix>\lib\koka\v2.4.0
- install source libraries : <prefix>\share\koka\v2.4.0
- install executable : <prefix>\bin\koka.exe
- install symlink : <prefix>\bin\koka-v2.4.0.exe
- install vscode editor support
Installing extensions...
Extension 'koka.language-koka' is already installed.
-----------------------------------------------------------------------
Installed koka v2.4.0 to: C:\Users\[user]\AppData\Local\koka\bin\koka
Type 'koka' to enter the interactive compiler.
C:\Program Files\Microsoft Visual Studio\2022\Community>koka
_ _
| | | |
| | _ ___ | | _ __ _
| |/ / _ \| |/ / _' | welcome to the koka interactive compiler
| ( (_) | ( (_| | version 2.4.0, Feb 6 2022, libc x64 (clang-cl)
|_|\_\___/|_|\_\__,_| type :? for help, and :q to quit
loading: std/core
loading: std/core/types
loading: std/core/hnd
> println("hi")
check : interactive
error: unknown target triple 'wasm32-pc-windows-msvc19.20.0', please use -triple or -arch
failure during code generation:
error : command failed (exit code 1)
command: C:/Users/[user]/wasi-sdk-16.0-mingw/wasi-sdk-16.0/bin/clang-cl.exe -DWIN32 -nologo -Wno-everything -Wall -Wextra -Wpointer-arith -Wshadow -Wstrict-aliasing -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wno-cast-qual -Wno-undef -Wno-reserved-id-macro -Wno-unused-macros -Wno-cast-align -Wno-extra-semi-stmt -Wno-extra-semi -Wno-float-equal -MDd -Zi -O1 -D__clang_msvc__ -EHs -TP -c -I C:/Users/[user]/AppData/Local/koka/share/koka/v2.4.0/kklib/include -DKK_MIMALLOC=8 -FoC:/Users/[user]/AppData/Local/Temp/.koka/v2.4.0/clang-cl-debug/interactive.obj C:/Users/[user]/AppData/Local/Temp/.koka/v2.4.0/clang-cl-debug/interactive.c
check : interactive
error: unknown target triple 'wasm32-pc-windows-msvc19.20.0', please use -triple or -arch
failure during code generation:
error : command failed (exit code 1)
command: C:/Users/[user]/wasi-sdk-16.0-mingw/wasi-sdk-16.0/bin/clang-cl.exe -DWIN32 -nologo -Wno-everything -Wall -Wextra -Wpointer-arith -Wshadow -Wstrict-aliasing -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wno-cast-qual -Wno-undef -Wno-reserved-id-macro -Wno-unused-macros -Wno-cast-align -Wno-extra-semi-stmt -Wno-extra-semi -Wno-float-equal -MDd -Zi -O1 -D__clang_msvc__ -EHs -TP -c -I C:/Users/[user]/AppData/Local/koka/share/koka/v2.4.0/kklib/include -DKK_MIMALLOC=8 -FoC:/Users/[user]/AppData/Local/Temp/.koka/v2.4.0/clang-cl-debug/interactive.obj C:/Users/[user]/AppData/Local/Temp/.koka/v2.4.0/clang-cl-debug/interactive.c
>
I'm not really sure how to fix it, but I thought I'd just put my experience out there. Hope this info is somewhat useful.
@daanx It would be nice if Koka could be installed using scoop.
It currently says
_
| | | |
| | _ ___ | | _ __ _ welcome to the koka interactive compiler
| |/ / _ \| |/ / _' | version 3.1.1, Mar 4 2024, libc x64 (clang-cl)
| ( (_) | ( (_| | output dir: c:/Users/ice10/AppData/Local/Temp/.koka/v3.1.1/clang-cl-debug-7dd288
|_|\_\___/|_|\_\__,_| type :? for help, and :q to quit
load : std/core/types
load : std/core/int
load : std/core/undiv
load : std/core/unsafe
load : std/core/bool
load : std/core/order
load : std/core/hnd
load : std/core/exn
load : std/core/string
load : std/core/char
load : std/core/sslice
load : std/core/list
load : std/core/tuple
load : std/core/maybe
load : std/core/vector
load : std/core/delayed
load : std/core/show
load : std/core/either
load : std/core/console
load : std/core/debug
parse : .../std/core.kk
check : std/core
In file included from c:/Users/ice10/AppData/Local/Temp/.koka/v3.1.1/clang-cl-debug-7dd288/std_core.c:2:
In file included from c:/Users/ice10/AppData/Local/Temp/.koka/v3.1.1/clang-cl-debug-7dd288/std_core.h:5:
In file included from c:/Users/ice10/AppData/Local/koka/share/koka/v3.1.1/kklib/include\kklib.h:38:
c:\Program Files\LLVM\lib\clang\17\include\inttypes.h(21,15): fatal error: 'inttypes.h' file not found
21 | #include_next <inttypes.h>
| ^~~~~~~~~~~~
1 error generated.
^
std/core(1, 1): build error: user error (error : command failed (exit code 1)
command: "c:/Program Files/LLVM/bin/clang-cl.exe" -DWIN32 -nologo -Wno-everything -Wall -Wextra -Wpointer-arith -Wshadow -Wstrict-aliasing -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wno-cast-qual -Wno-undef -Wno-reserved-id-macro -Wno-unused-macros -Wno-cast-align -Wno-extra-semi-stmt -Wno-extra-semi -Wno-float-equal -MDd -Zi -O1 -D__clang_msvc__ -EHs -TP -c -I c:/Users/ice10/AppData/Local/koka/share/koka/v3.1.1/kklib/include -DKK_MIMALLOC=8 -Foc:/Users/ice10/AppData/Local/Temp/.koka/v3.1.1/clang-cl-debug-7dd288/std_core.obj c:/Users/ice10/AppData/Local/Temp/.koka/v3.1.1/clang-cl-debug-7dd288/std_core.c)
unable to load the std/core module; standard functions are not available
after I install it, I have Windows 11
I think this might help:
https://github.com/koka-lang/koka/issues/455#issuecomment-1919321032
I think this might help:
https://github.com/koka-lang/koka/issues/455#issuecomment-1919321032
🤯
Mmm, that is not great. I never had this issue but that is probably because I already had Visual Studio installed. One would think that clang comes with inttypes.h
.. I'll look into it further to see what causes this. TBC
I do have VS build tools but didn't have that portion installed
Edit:
Looks like I have a decent amount of things installed
I tried installing Koka on Windows. After some fiddling I gave up and installed it in WSL instead. Given that Koka comes from Microsoft, I expected Windows installation to be smooth. :)