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.8k stars 2.16k forks source link

The windows 32-bit system failed to build V #16658

Open jammny opened 1 year ago

jammny commented 1 year ago

Describe the bug

An error occurs when you run the following command: make.bat -tcc32,Maybe the new version of vc is not compatible?

Expected Behavior

Hope the official can also provide a compiled 32-bit program V.

Current Behavior

Syncing TCC from https://github.com/vlang/tccbin fatal: unable to access 'https://github.com/vlang/tccbin/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443

Updating vc...

Sync with remote https://github.com/vlang/vc

Building V...

Attempting to build v_win.c with "thirdparty\tcc\tcc.exe" Compiling .\v.exe with itself Attempting to build v_win.c with Clang .\vc\v_win.c:20748:10: error: incompatible integer to pointer conversion initializing 'voidptr' (aka 'void ') with an expression of type 'DWORD' (aka 'unsigned long') [-Wint-conversion] ...res = FormatMessage(((FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM) | FORMAT_MESSAGE_IGNORE_INSERTS), NULL, err_msg_id, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &msgbuf, 0, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\vc\v_win.c:39570:85: error: incompatible pointer to integer conversion passing 'voidptr' (aka 'void ') to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (!(!atomic_compare_exchange_weak_ptr(((voidptr*)(&ch->adr_written)), &nulladr, ((voidptr)(-1))))) break; ^~~~~~~ .\vc\v_win.c:1332:42: note: expanded from macro 'atomic_compare_exchange_weak_ptr'

define atomic_compare_exchange_weak_ptr atomic_compare_exchange_weak

^ .\vc\v_win.c:1290:54: note: expanded from macro 'atomic_compare_exchange_weak' atomic_compare_exchange_strong(object, expected, desired) ^~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39640:81: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->write_adr)), &wradr, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39644:88: error: incompatible pointer to integer conversion passing 'voidptr' (aka 'void ') to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (!(!atomic_compare_exchange_weak_ptr(((voidptr*)(&ch->adr_written)), &nulladr, wradr))) break; ^~~~~ .\vc\v_win.c:1332:42: note: expanded from macro 'atomic_compare_exchange_weak_ptr'

define atomic_compare_exchange_weak_ptr atomic_compare_exchange_weak

^ .\vc\v_win.c:1290:54: note: expanded from macro 'atomic_compare_exchange_weak' atomic_compare_exchange_strong(object, expected, desired) ^~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39680:80: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->read_adr)), &src2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39700:80: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->adr_read)), &src2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39721:97: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (have_swapped || atomic_compare_exchange_strong_ptr(((voidptr)(&ch->adr_read)), &src2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39730:96: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (have_swapped || atomic_compare_exchange_strong_ptr(((voidptr)(&ch->adr_read)), &src2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39831:81: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->read_adr)), &rdadr, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39835:86: error: incompatible pointer to integer conversion passing 'voidptr' (aka 'void ') to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (!(!atomic_compare_exchange_weak_ptr(((voidptr*)(&ch->adr_read)), &nulladr, rdadr))) break; ^~~~~ .\vc\v_win.c:1332:42: note: expanded from macro 'atomic_compare_exchange_weak_ptr'

define atomic_compare_exchange_weak_ptr atomic_compare_exchange_weak

^ .\vc\v_win.c:1290:54: note: expanded from macro 'atomic_compare_exchange_weak' atomic_compare_exchange_strong(object, expected, desired) ^~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39926:82: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->write_adr)), &dest2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39947:83: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] if (atomic_compare_exchange_strong_ptr(((voidptr)(&ch->adr_written)), &dest2, ((void)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ .\vc\v_win.c:39970:99: error: incompatible pointer to integer conversion passing 'void ' to parameter of type 'intptr_t' (aka 'int') [-Wint-conversion] ...if (have_swapped || atomic_compare_exchange_strong_ptr(((voidptr)(&ch->adr_written)), &dest2, ((void*)0))) { ^~~~~~ .\vc\v_win.c:1278:59: note: passing argument to parameter 'desired' here intptr_t desired) ^ 13 errors generated. In most cases, compile errors happen because the version of Clang installed is too old clang version 15.0.0 (https://github.com/llvm/llvm-project.git 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137) Target: i686-w64-windows-gnu Thread model: posix InstalledDir: C:/llvm-mingw-20220906-ucrt-i686/bin

Backend compiler error

Exiting from error ERROR: please follow the instructions in https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Windows

Reproduction Steps

  1. git clone https://github.com/vlang/v
  2. cd v
  3. make.bat -tcc32

Possible Solution

No response

Additional Information/Context

No response

V version

0.3.2

Environment details (OS name and version, etc.)

system: Windows 10 22H2 32 bit

felipensp commented 1 year ago

Can you try again using a newest V version?