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

Project build Error #14270

Open Lathanao opened 2 years ago

Lathanao commented 2 years ago

V doctor:

OS: linux, Ubuntu 21.04
Processor: 12 cpus, 64bit, little endian, Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
CC version: cc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

getwd: /var/www/vproject
vmodules: /home/tanguy/.vmodules
vroot: /var/www/vproject/v
vexe: /var/www/vproject/v/v
vexe mtime: 2022-02-25 16:09:13
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 f8b8950.d80f516

Git version: git version 2.30.2
Git vroot status: weekly.2022.07-87-gd80f5165
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 3654d6a8-dirty

What did you do? v up

failed    cmd: '/var/www/vproject/v/v' -skip-unused  -g '/var/www/vproject/v/cmd/tools/vup.v'
failed   code: 1
vlib/builtin/int.v:11:6: error: cannot register alias `byte`, another type with this name exists
    9 | 
   10 | // type u8 = byte
   11 | type byte = u8
      |      ~~~~
   12 | type i32 = int
   13 |

Then make

cd ./vc && git clean -xf && git pull --quiet
cd ./thirdparty/tcc && git clean -xf && git pull --quiet
error: Your local changes to the following files would be overwritten by merge:
    lib/gc.o
Please commit your changes or stash them before you merge.
Aborting
make: *** [GNUmakefile:123: latest_tcc] Error 1

What did you expect to see? An update without error

What did you see instead?

The error is similar to 14198 I have no way to solve that by CLI.

image

Lathanao commented 2 years ago

Finally, I fixed it with:

cd thirdparty/tcc
git reset --hard HEAD
cd ../..
make
v up