make: show instructions about installing a C compiler, when the bootstrap compilation with cc fails (#23718)

This commit is contained in:
Delyan Angelov 2025-02-14 08:13:39 +02:00 committed by GitHub
parent 81a2e7a772
commit 49fb7ca501
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 20 additions and 4 deletions

View File

@ -98,7 +98,7 @@ endif
all: latest_vc latest_tcc latest_legacy
ifdef WIN32
$(CC) $(CFLAGS) -std=c99 -municode -w -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS) -lws2_32
$(CC) $(CFLAGS) -std=c99 -municode -w -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS) -lws2_32 || cmd/tools/cc_compilation_failed_windows.sh
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
./v2.exe -o $(VEXE) $(VFLAGS) cmd/v
$(RM) v1.exe
@ -110,7 +110,7 @@ ifdef LEGACY
rm -rf $(TMPLEGACY)
$(eval override LDFLAGS+=-L$(realpath $(LEGACYLIBS))/lib -lMacportsLegacySupport)
endif
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS) || cmd/tools/cc_compilation_failed_non_windows.sh
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
./v2.exe -nocache -o $(VEXE) $(VFLAGS) cmd/v
rm -rf v1.exe v2.exe

View File

@ -11,7 +11,7 @@ download_vc:
if [ -f vc/v.c ] ; then git -C vc/ pull; else git clone --filter=blob:none https://github.com/vlang/vc vc/; fi
v:
$(CC) $(CFLAGS) -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread $(LDFLAGS)
$(CC) $(CFLAGS) -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread $(LDFLAGS) || cmd/tools/cc_compilation_failed_non_windows.sh
./v1 -no-parallel -o v2 $(VFLAGS) cmd/v
./v2 -o v $(VFLAGS) cmd/v
rm -rf v1 v2

View File

@ -0,0 +1,7 @@
#!/bin/sh
## this script is used by the makefiles in the top level folder
echo
echo 'Compilation of v.c failed.'
echo 'See https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Linux-and-macOS .'
echo
false

View File

@ -0,0 +1,7 @@
#!/bin/sh
## this script is used by the makefiles in the top level folder
echo
echo 'Compilation of v.c failed.'
echo 'See https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Windows .'
echo
false

View File

@ -39,6 +39,8 @@
[[apps]]
path = 'examples/ttf_font/example_ttf.v'
compare.flags = ['-p','-fail 0.008','-failpercent 1.5']
# Reasons for ex- or inclusion:
#
@ -62,7 +64,7 @@
# 'examples/flappylearning/game.v' // Random movement
# 'examples/hot_reload/bounce.v' // Inaccurate captures
# 'examples/hot_reload/graph.v' // Inaccurate captures
# 'examples/ttf_font/example_ttf.v', // OK
# 'examples/ttf_font/example_ttf.v' // OK-ish ... the font rendering seems to be shifted with a few pixels on Ubuntu 24.04, compared to Ubuntu 20.04 . TODO: update it with the newer visuals.
# 'examples/sokol/01_cubes/cube.v', // Can pass with a warning and diff at around 1.2%
# 'examples/sokol/02_cubes_glsl/cube_glsl.v', // Inaccurate captures
# 'examples/sokol/03_march_tracing_glsl/rt_glsl.v', // Inaccurate captures