vlang / vls

V language server. (Old V language server - see v-analyzer)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build failed when run v build.vsh in windows

lydiandy opened this issue · comments

System Information

V doctor

Paste the output of 'v doctor' here

OS: windows, Microsoft Windows 10 ͥİ v19044 64 λ
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
CC version: Error: exec failed (CreateProcess) with code 2: 系统找不到指定的文件。
cmd: cc --version

getwd: D:\v\vls
vmodules: C:\Users\abc.vmodules
vroot: D:\v\v
vexe: D:\v\v\v.exe
vexe mtime: 2022-06-11 01:47:38
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 ea71ea3.26d0514

Git version: git version 2.35.1.windows.2
Git vroot status: weekly.2022.22-87-g26d05147
.git/config present: true
thirdparty/tcc status: thirdparty-windows-amd64 125e21e2

VLS info

Paste the output of 'vls --version' here

Problem Description

v build.vsh
build failed

Expected Output

Actual Output

Building VLS...
v -g -gc boehm -d use_libbacktrace -cc cc cmd/vls -o D:\v\vls\bin\vls.exe
failed thirdparty object build cmd:
builder error: In file included from D:/v/vls/tree_sitter/lib/lib.c:15:
D:/v/vls/tree_sitter/lib/./stack.c:308: error: ';' expected (got "StackSliceArray")

Steps to Reproduce

Last Recorded LSP Requests

commented

@lydiandy for windows, you should specify the compiler you are using (e.g. v run build.vsh gcc)

@nedpals I update the latest vls code,and rerun the build.vsh:

v run gcc build.vsh

here is the new error: v expects that gcc exists, but it does not

But I try to build cmd/vls with the following v command,It successed:

 v -cc gcc -prod cmd/vls -o ./bin/vls.exe

maybe something wrong with build.vsh

commented

@nedpals I update the latest vls code,and rerun the build.vsh:

v run gcc build.vsh

here is the new error: v expects that gcc exists, but it does not

But I try to build cmd/vls with the following v command,It successed:

 v -cc gcc -prod cmd/vls -o ./bin/vls.exe

maybe something wrong with build.vsh

you had executed it wrong though. it should be v run build.vsh gcc and it will do the same as the manual compilation you did.

here is the result:

PS D:\v\vls> v run build.vsh gcc
> Usage error: for Windows, you must need to specify the compiler to use (either gcc, clang, or msvc)
commented

here is the result:

PS D:\v\vls> v run build.vsh gcc
> Usage error: for Windows, you must need to specify the compiler to use (either gcc, clang, or msvc)

OK, i think i misplaced that code for outputting it lol. Will change that, thanks

Pulled the latest and getting:

❯ C:\dev\projects-open-source\v\v.exe run .\build.vsh msvc
> Building VLS...
v -g -gc boehm  -cc msvc cmd/vls -o D:\dev\projects-open-source\vls\bin\vls.exe
C:\dev\projects-open-source\v\thirdparty\libgc\gc.obj not found, building it (with msvc)...
msvc: failed to build a thirdparty object; cmd: "D:\dev\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe" /NOLOGO /volatile:ms /MDd /D_DEBUG /DGC_THREADS=1 /DGC_BUILTIN_ATOMIC=1 /DGC_NOT_DLL=1 /DGC_WIN32_THREADS=1 -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt" -I "d:\dev\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um" -I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared" -I "C:\dev\projects-open-source\v\thirdparty\libgc\include" /c "C:\dev\projects-open-source\v/thirdparty/libgc/gc.c" /Fo"C:\dev\projects-open-source\v\thirdparty\libgc\gc.obj"
builder error: Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30137 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9002 : ignoring unknown option '/NOLOGO'
gc.c
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(12204): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(12243): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(12303): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(12329): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(12350): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(13160): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(13161): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(13571): error C2065: '__ATOMIC_SEQ_CST': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(13616): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(15938): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(15993): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(16025): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(16059): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(16750): error C2065: '__ATOMIC_ACQUIRE': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(16754): error C2065: '__ATOMIC_RELEASE': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(21850): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(22472): error C2065: '__ATOMIC_RELAXED': undeclared identifier
C:\dev\projects-open-source\v/thirdparty/libgc/gc.c(22601): error C2065: '__ATOMIC_RELAXED': undeclared identifier

Failed building VLS