Skip to content

Invalid V version with build for 0.5 release #26407

Description

@lcheylus

I'm trying to package V 0.5 release for Debian/Linux, building it from release sources (not from sources from Git repository).

In this case, the V version output is invalid:

$ ./v version
V 0.5.0 e2f5d6c

=> a short hash for is displayed. Since commit adbc802, that should no longer be the case. The correct V version displayed must be V 0.5.0 (without hash).

Steps to reproduce this issue with release 0.5

  • Download sources for V 0.5 et corresponding vlang/vc (commit vlang/vc@294bff4)
  • Link /usr/lib/x86_64-linux-gnu/libgc.a for thirdparty/tcc/lib/libgc.a
  • Build from sources with make local=1 prod=1 (compiler = Clang on Debian Linux/amd64)
$ wget https://github.com/vlang/v/archive/refs/tags/0.5.tar.gz -O v-0.5.0.tar.gz
$ wget https://github.com/vlang/vc/archive/294bff4ef87427743d0b35c0f7eb1b34a6dd061b.tar.gz -O vc-294bff4ef87427743d0b35c0f7eb1b34a6dd061b.tar.gz
$ tar xzvf v-0.5.0.tar.gz

$ cd v-0.5
$ mv -v ../vc-294bff4ef87427743d0b35c0f7eb1b34a6dd061b ./vc

$ mkdir -p thirdparty/tcc/lib/
$ ln -s /usr/lib/x86_64-linux-gnu/libgc.a thirdparty/tcc/lib/libgc.a

$ make local=1 prod=1
Using local vc
Using local tcc
The executable './thirdparty/tcc/tcc.exe' does not work.
cc  -std=gnu99 -w -o v1 ./vc/v.c -lm -lpthread  || cmd/tools/cc_compilation_failed_non_windows.sh
./v1 -no-parallel -o v2 -prod cmd/v
./v2 -nocache -o ./v -prod cmd/v
rm -rf v1 v2

Note: `tcc` was not used, so unless you install it yourself, your backend
C compiler will be `cc`, which is usually either `clang`, `gcc` or `msvc`.

These C compilers, are several times slower at compiling C source code,
compared to `tcc`. They do produce more optimised executables, but that
is done at the cost of compilation speed.

V has been successfully built
V 0.5.0 e2f5d6c

No issue with V 0.4.12 release: the V version displayed is correct, no short hash in output.

$ ./v version
V 0.4.12

Steps to rebuild V for release 0.4.12

  • Download sources for V 0.4.12 et corresponding vlang/vc (commit vlang/vc@e377b42)
  • Link /usr/lib/x86_64-linux-gnu/libgc.a for thirdparty/tcc/lib/libgc.a
  • Build from sources with make local=1 prod=1 (compiler = Clang on Debian Linux/amd64)
$ wget https://github.com/vlang/v/archive/refs/tags/0.4.12.tar.gz -O v-0.4.12.tar.gz
$ wget https://github.com/vlang/vc/archive/e377b42e26eb9c703ccaf65f37d700a7369ac3db.tar.gz -O vc-e377b42e26eb9c703ccaf65f37d700a7369ac3db.tar.gz
$ tar xzvf v-0.4.12.tar.gz

$ cd v-0.4.12
$ mv -v ../vc-e377b42e26eb9c703ccaf65f37d700a7369ac3db ./vc

$ mkdir -p thirdparty/tcc/lib/
$ ln -s /usr/lib/x86_64-linux-gnu/libgc.a thirdparty/tcc/lib/libgc.a

$ make local=1 prod=1
Using local vc
Using local tcc
The executable './thirdparty/tcc/tcc.exe' does not work.
cc  -std=gnu99 -w -o v1 ./vc/v.c -lm -lpthread  || cmd/tools/cc_compilation_failed_non_windows.sh
./v1 -no-parallel -o v2 -prod cmd/v
./v2 -nocache -o ./v -prod cmd/v
rm -rf v1 v2

Note: `tcc` was not used, so unless you install it yourself, your backend
C compiler will be `cc`, which is usually either `clang`, `gcc` or `msvc`.

These C compilers, are several times slower at compiling C source code,
compared to `tcc`. They do produce more optimised executables, but that
is done at the cost of compilation speed.

V has been successfully built
V 0.4.12

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions