vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.56k stars 2.15k forks source link

Cannot run v.exe due to a compiler error #21125

Open GalihPRep opened 3 months ago

GalihPRep commented 3 months ago

Describe the bug

The compiler cannot run due to varargs implementation issue in my MinGW installation (MinGW-w64 version 12.0.0).

Reproduction Steps

First output:

v

Running a file:

v run <directory>

Expected Behavior

When running v: normal output from v, e.g. list of options. When running v run <directory>: Normal output from the file located in the directory.

Current Behavior

Here's the output when I try to run v:

cannot compile `C:\Languages\v\cmd\tools\vrepl.v`: 1
==================
In file included from C:/Languages/msys64/ucrt64/include/_mingw.h:282:
C:/Languages/msys64/ucrt64/include/vadefs.h:35: error: #error VARARGS not implemented for this compiler 
...
==================
(Use `v -cg` to print the entire error message)

builder error:
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

And this is when I try to run a V file with v run "d:\@NURD\@CODING\@ALL\VProject\v_basics\for_numbers\for_numbers.v":

builder error: 
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

==================
In file included from C:/Languages/msys64/ucrt64/include/_mingw.h:282:
C:/Languages/msys64/ucrt64/include/vadefs.h:35: error: #error VARARGS not implemented for this compiler
...
==================
(Use `v -cg` to print the entire error message)

Possible Solution

No response

Additional Information/Context

No response

V version

0.4.4

Environment details (OS name and version, etc.)

Windows 11 Home Single Language version 23H2

[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.

JalonSolov commented 3 months ago

We recommend installing gcc/clang from https://winlibs.com rather than using the msys install.

danoli3 commented 1 month ago

Had this error when linking against a binary with wrong or different CRT where CRT used