koka-lang / koka

Koka language compiler and interpreter
http://koka-lang.org
Other
3.25k stars 161 forks source link

Koka 3.1.2 fails to install/build: `'assert.h' file not found` #568

Open oconnor0 opened 1 month ago

oconnor0 commented 1 month ago

On Windows 10, I installed VSCode via scoop install vscode and then installed the official Koka extension. It installed Clang and after installation failed to build. I don't have the exact error, but it's similar to the one below.

Then I uninstalled those, installed Clang via scoop install clang, downloaded and ran curl -sSL -o %tmp%\install-koka.bat https://github.com/koka-lang/koka/releases/latest/download/install.bat && %tmp%\install-koka.bat, and when I ran koka get the following error message:

In file included from c:/Users/me/.koka/v3.1.2/clang-cl-debug-27e583/std_core.c:2:
In file included from c:/Users/me/.koka/v3.1.2/clang-cl-debug-27e583\std_core.h:5:
c:/Users/me/AppData/Local/koka/share/koka/v3.1.2/kklib/include\kklib.h(38,10): fatal error:
      'assert.h' file not found
   38 | #include <assert.h>           // assert
      |          ^~~~~~~~~~
1 error generated.
^
std/core(1, 1): build error: user error (error  : command failed (exit code 1)
daanx commented 1 week ago

Strange. Not sure what is the cause since clang installed. However, Koka invokes clang-cl on windows and it might use the Windows Universal C runtime -- maybe that is not installed on your system? https://www.microsoft.com/en-us/download/details.aspx?id=50410

I thought this would be installed by Clang but maybe not.. Let me know if this works (and in that case we should add a check for it in the Koka installer).