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

out\main.c(1,10): fatal error: 'assert.h' file not found #700

Closed
damon-kwok opened this issue Mar 19, 2020 · 3 comments
Closed

out\main.c(1,10): fatal error: 'assert.h' file not found #700

damon-kwok opened this issue Mar 19, 2020 · 3 comments

Comments

@damon-kwok
Copy link

$ carp
Welcome to Carp 0.3.0
This is free software with ABSOLUTELY NO WARRANTY.
Evaluate (help) for more information.

(defn add [a b] (+ a b))
(add 2 3)
clang-cl: warning: unable to find a Visual Studio installation; try running Clang from a developer command prompt [-Wmsvc-not-found]
out\main.c(1,10): fatal error: 'assert.h' file not found
#include <assert.h>
^~~~~~~~~~
1 error generated.
carp.exe: callCommand: clang-cl.exe -D _CRT_SECURE_NO_WARNINGS out\main.c -o "out\Untitled" -ID:/msys64/home/damon/.ome
_local/repo/carp/core/ (exit 1): failed

@hellerve
Copy link
Member

Hello! Would you mind sharing some details about your setup? What OS and compiler are you using?

It seems like you’re running Windows. What command prompt are you using?

Also, I might add that the WIndows version of Carp is sadly extremely undertested. We appreciate you trying it out there, but you might run into trouble getting everything to work properly at this time.

@damon-kwok
Copy link
Author

damon-kwok commented Mar 19, 2020

@hellerve
OS:Window10+MSYS2
Carp:0.3.0(git master)
GHC:8.8.2
Stack:2.2.0 (git master)
Clang:9.0.1
VS:VisualStudio2019 Preview(v16.5.0-pre.5.0)

Carp install: ome install carp
https://github.com/damon-kwok/oh-my-env/blob/5f8a8113103d900bf6df0b5681a66b23f62c76f2/plugins/carp#L7

resolved:first,run cmd
`
set PATH=D:\msys64\mingw64\bin;D:\msys64\usr\bin;%PATH%

@call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64

bash
`

then:
$ carp
Welcome to Carp 0.3.0
This is free software with ABSOLUTELY NO WARRANTY.
Evaluate (help) for more information.

(defn add [a b] (+ a b))
(add 3 4)
In file included from out\main.c:21:
D:/msys64/home/damon/.ome_local/repo/carp/core\carp_double.h(43,5): warning: 'memcpy' will always overflow; destination
buffer has size 4, but size argument is 8 [-Wfortify-source]
memcpy(&y, &x, sizeof(double));
^
In file included from out\main.c:24:
D:/msys64/home/damon/.ome_local/repo/carp/core\carp_string.h(19,5): warning: format specifies type 'long' but the
argument has type 'ssize_t' (aka 'long long') [-Wformat]
CHK_INDEX(i, strlen(*s));
^~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/home/damon/.ome_local/repo/carp/core\core.h(31,64): note: expanded from macro 'CHK_INDEX'
printf(FILE CHK_INDEX_FORMAT_STRING, LINE, (ssize_t)i,
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
In file included from out\main.c:24:
D:/msys64/home/damon/.ome_local/repo/carp/core\carp_string.h(19,5): warning: format specifies type 'long' but the
argument has type 'ssize_t' (aka 'long long') [-Wformat]
CHK_INDEX(i, strlen(*s));
^~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/home/damon/.ome_local/repo/carp/core\core.h(32,20): note: expanded from macro 'CHK_INDEX'
(ssize_t)n);
^~~~~~~~~~
In file included from out\main.c:24:
D:/msys64/home/damon/.ome_local/repo/carp/core\carp_string.h(56,5): warning: format specifies type 'long' but the
argument has type 'long long' [-Wformat]
CHK_INDEX(i + lsrc, strlen(*into) + 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/home/damon/.ome_local/repo/carp/core\core.h(31,64): note: expanded from macro 'CHK_INDEX'
printf(FILE CHK_INDEX_FORMAT_STRING, LINE, (ssize_t)i,
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
In file included from out\main.c:24:
D:/msys64/home/damon/.ome_local/repo/carp/core\carp_string.h(56,5): warning: format specifies type 'long' but the
argument has type 'long long' [-Wformat]
CHK_INDEX(i + lsrc, strlen(*into) + 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/home/damon/.ome_local/repo/carp/core\core.h(32,20): note: expanded from macro 'CHK_INDEX'
(ssize_t)n);
^~~~~~~~~~
5 warnings generated.
7


but,i don‘t know,why carp need VisualStudio?maby clang-ci is build by vs...

@eriksvedang
Copy link
Collaborator

Try installing LLVM and use clang-cl.exe for compilation.

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

No branches or pull requests

3 participants