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

can't build V under windows 7 32b #23137

Open
21h opened this issue Dec 11, 2024 · 4 comments
Open

can't build V under windows 7 32b #23137

21h opened this issue Dec 11, 2024 · 4 comments
Labels
Bug This tag is applied to issues which reports bugs. Compiler: GCC Bugs/feature requests, that are related to compiler GCC. OS: Windows Bugs/feature requests, that are specific to Windows OS.

Comments

@21h
Copy link

21h commented Dec 11, 2024

Describe the bug

Got from winlibs.com last version of gcc with MSVCRT runtime for win32 (with LLVM)
Unpacked gcc to c:\mingw
Added c:\mingw\bin and c:\mingw\i686-w64-mingw32\include to PATH
Build V:

git clone https://github.com/vlang/v
cd v
.\make.bat -gcc --local

Reproduction Steps

Output:

C:\apps\v>make -gcc --local
Building V...
 > Attempting to build "./v_win_bootstrap.exe" (from v_win.c) with GCC
./vc/v_win.c:531: No include path in which to find inttypes.h
./vc/v_win.c:544: No include path in which to find stddef.h
./vc/v_win.c:871: No include path in which to find stdio.h
./vc/v_win.c:872: No include path in which to find stdlib.h
./vc/v_win.c:873: No include path in which to find string.h
./vc/v_win.c:875: No include path in which to find stdarg.h
./vc/v_win.c:899: #error "Unknown architecture endianness"
./vc/v_win.c:949: No include path in which to find windows.h
./vc/v_win.c:951: No include path in which to find io.h
./vc/v_win.c:952: No include path in which to find direct.h
./vc/v_win.c:954: No include path in which to find signal.h
./vc/v_win.c:1021: No include path in which to find stdint.h
./vc/v_win.c:1166: No include path in which to find float.h
./vc/v_win.c:1181: No include path in which to find time.h
./vc/v_win.c:1196: No include path in which to find time.h
./vc/v_win.c:1222: No include path in which to find stddef.h
./vc/v_win.c:1223: No include path in which to find stdint.h
./vc/v_win.c:1224: No include path in which to find windows.h
./vc/v_win.c:1579: No include path in which to find winsock2.h
./vc/v_win.c:1594: No include path in which to find sys\stat.h
./vc/v_win.c:1599: No include path in which to find errno.h
./vc/v_win.c:1612: No include path in which to find process.h
./vc/v_win.c:1627: No include path in which to find sys\utime.h
./vc/v_win.c:1642: No include path in which to find windows.h
./vc/v_win.c:1657: No include path in which to find signal.h
./vc/v_win.c:1672: No include path in which to find synchapi.h
./vc/v_win.c:1687: No include path in which to find time.h
./vc/v_win.c:15361: No include path in which to find synchapi.h
In most cases, compile errors happen because the version of GCC installed is too old
2.95

Backend compiler error

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

C:\apps\v>

Expected Behavior

Build of V is completed

Current Behavior

GCC can't find header files

Possible Solution

No response

Additional Information/Context

No response

V version

master

Environment details (OS name and version, etc.)

Windows 7, 32 bit

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.

Huly®: V_0.6-21574

@21h 21h added the Bug This tag is applied to issues which reports bugs. label Dec 11, 2024
@21h
Copy link
Author

21h commented Dec 11, 2024

Added -Ic:\mingw\i686-w64-mingw32\include into make.bat

output with maaaaany duplicated errors in intrin-impl.h:

C:\apps\v>make.bat build -gcc --local
Building V...
 > Attempting to build "./v_win_bootstrap.exe" (from v_win.c) with GCC
In file included from c:\mingw\i686-w64-mingw32\include\stdlib.h:770,
                 from ./vc/v_win.c:872:
c:\mingw\i686-w64-mingw32\include\malloc.h:84: mm_malloc.h: No such file or directory
In file included from c:\mingw\i686-w64-mingw32\include\winnt.h:27,
                 from c:\mingw\i686-w64-mingw32\include\minwindef.h:163,
                 from c:\mingw\i686-w64-mingw32\include\windef.h:9,
                 from c:\mingw\i686-w64-mingw32\include\windows.h:69,
                 from ./vc/v_win.c:949:
c:\mingw\i686-w64-mingw32\include\psdk_inc\intrin-impl.h:586: `defined' without an identifier
c:\mingw\i686-w64-mingw32\include\psdk_inc\intrin-impl.h:586: `defined' without an identifier
c:\mingw\i686-w64-mingw32\include\psdk_inc\intrin-impl.h:586: parse error

@JalonSolov
Copy link
Contributor

Sounds like you just have a bad install of gcc. First recommendation is to delete whatever you have, and install the 32-bit version from https://winlibs.com/

@21h
Copy link
Author

21h commented Dec 11, 2024

I checked again archive file, file is correct

MSVCRT runtime
GCC 14.2.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 19.1.1 + MinGW-w64 12.0.0 (MSVCRT) - release 2 (LATEST)
Win32:

https://github.com/brechtsanders/winlibs_mingw/releases/download/14.2.0posix-19.1.1-12.0.0-msvcrt-r2/winlibs-i686-posix-dwarf-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2.7z

@felipensp felipensp added OS: Windows Bugs/feature requests, that are specific to Windows OS. Compiler: GCC Bugs/feature requests, that are related to compiler GCC. labels Dec 16, 2024
@ArisAthena
Copy link

That's great work. Maybe you can verify that the gcc compiler is run from C:\mingw\bin and not another conflicting compiler installed. Are you sure that the that the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables are set correctly?
By giving this command: set C_INCLUDE_PATH=C:\mingw\i686-w64-mingw32\include and this one: set CPLUS_INCLUDE_PATH=C:\mingw\i686-w64-mingw32\include and checking with these two commands:
echo %C_INCLUDE_PATH%
echo %CPLUS_INCLUDE_PATH%
what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Compiler: GCC Bugs/feature requests, that are related to compiler GCC. OS: Windows Bugs/feature requests, that are specific to Windows OS.
Projects
None yet
Development

No branches or pull requests

4 participants