v icon indicating copy to clipboard operation
v copied to clipboard

cc: error: /icc/v/thirdparty/tcc/lib/libgc.a: No such file or directory

Open crat1985 opened this issue 2 years ago • 5 comments

Describe the bug

I got this error when I compile V (with make) in an aarch64 Debian chroot on Termux.

Expected Behavior

V to compile.

Current Behavior

Error while compiling.

riccardo@localhost:/icc/v$ make
make fresh_vc
make[1]: Entering directory '/icc/v'
rm -rf ./vc
git clone --filter=blob:none --quiet https://github.com/vlang/vc ./vc
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), 879.99 KiB | 3.52 MiB/s, done.
Resolving deltas: 100% (1/1), done.
make[1]: Leaving directory '/icc/v'
cd ./vc && git clean -xf && git pull --quiet
make fresh_tcc
make[1]: Entering directory '/icc/v'
rm -rf ./thirdparty/tcc
Pre-built TCC not available for thirdparty-android-aarch64 at https://github.com/vlang/tccbin, will use the system compiler: cc
git clone --filter=blob:none --quiet --branch thirdparty-unknown-unknown https://github.com/vlang/tccbin ./thirdparty/tcc
remote: Enumerating objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 1
Receiving objects: 100% (1/1), 149 bytes | 24.00 KiB/s, done.
make[2]: Entering directory '/icc/v'
The executable './thirdparty/tcc/tcc.exe' does not work.
make[2]: Leaving directory '/icc/v'
make[1]: Leaving directory '/icc/v'
cd ./thirdparty/tcc && git clean -xf && git pull --quiet
The executable './thirdparty/tcc/tcc.exe' does not work.
cc  -std=gnu99 -w -o v1.exe ./vc/v.c -lm -lpthread 
./vc/v.c: In function ‘v__ast__Table_fn_signature’:
./vc/v.c:52688:8: note: parameter passing for argument of type ‘v__ast__FnSignatureOpts’ changed in GCC 9.1
52688 | string v__ast__Table_fn_signature(v__ast__Table* t, v__ast__Fn* func, v__ast__FnSignatureOpts opts) {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
./vc/v.c: In function ‘v__ast__Table_fn_signature_using_aliases’:
./vc/v.c:52694:8: note: parameter passing for argument of type ‘v__ast__FnSignatureOpts’ changed in GCC 9.1
52694 | string v__ast__Table_fn_signature_using_aliases(v__ast__Table* t, v__ast__Fn* func, Map_string_string import_aliases, v__ast__FnSignatureOpts opts) {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./v1.exe -no-parallel -o v2.exe  cmd/v
./v2.exe -nocache -o ./v  cmd/v
rm -rf v1.exe v2.exe
==================
cc: error: /icc/v/thirdparty/tcc/lib/libgc.a: No such file or directory
...
==================
(Use `v -cg` to print the entire error message)

builder error: 
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

make: *** [GNUmakefile:117: all] Error 1

Reproduction Steps

I've installed Debian with proot-distro in Termux (in an aarch64 phone) and installed dependencies with

sudo apt install build-essential

then I've run the following commands :

git clone https://github.com/vlang/v
cd v
make

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.3.3 ee4150f

Environment details (OS name and version, etc.)

I successfully got the following data by compiling V in a path that doesn't contains icc :

sh: 1: cannot open /proc/1/mountinfo: No such file
OS: linux, Linux version 5.4.0-faked (termux@androidos) (gcc version 4.9.x (Faked /proc/version by Proot-Distro) ) #1 SMP PREEMPT Fri Jul 10 00:00:00 UTC 2020 (chroot)
Processor: 8 cpus, 64bit, little endian, Qualcomm Technologies, Inc TRINKET
CC version: cc (Debian 10.2.1-6) 10.2.1 20210110

getwd: /root/v
vmodules: /home/riccardo/.vmodules
vroot: /root/v
vexe: /root/v/v
vexe mtime: 2023-03-10 11:42:53
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.3 09c9cbc.ee4150f

Git version: git version 2.30.2
Git vroot status: weekly.2023.10-27-gee4150f2
.git/config present: true
thirdparty/tcc status: thirdparty-linux-aarch64 dd547903

crat1985 avatar Mar 10 '23 16:03 crat1985

Same except i use archlinux proot distro

elenakrittik avatar Mar 14 '23 23:03 elenakrittik

libgc-dev libgc-devel libgc-static

xiaojin20 avatar Mar 27 '23 04:03 xiaojin20

termux 👍 pkg install clang libexecinfo libgc libgc-static make git

xiaojin20 avatar Mar 27 '23 04:03 xiaojin20

termux 👍 pkg install clang libexecinfo libgc libgc-static make git

Thanks, that worked!

@RIC217 it appears that you need to install listed dependencies both in Termux environment itself and your proot-ed distro, only then it'll work.

elenakrittik avatar Mar 30 '23 13:03 elenakrittik

Ok thanks :)

crat1985 avatar Apr 15 '23 10:04 crat1985