cgen error when compiling with -d use_libbacktrace #15
Describe the bug
Running ./v -g -o vdbg cmd/v && ./vdbg -d use_libbacktrace 'foo.v' && 'foo' on foo.v produced a compiler error.
Reproduction Steps
./v -g -o vdbg cmd/v && ./vdbg -d use_libbacktrace 'foo.v' && 'foo'
fn main() {
panic('aaaa')
}
Expected Behavior
No C error
Current Behavior
> Failed build_thirdparty_obj_file cmd
> mod: builtin
> path: /home/ge/.vlang/thirdparty/libbacktrace/backtrace.o
> source_file: /home/ge/.vlang/thirdparty/libbacktrace/backtrace.c
> wd before cmd: /tmp
> getwd for cmd: /home/ge/.vlang
> cmd: '/home/ge/.vlang/thirdparty/tcc/tcc.exe' -std=c99 -D_DEFAULT_SOURCE -fwrapv -fPIC -D GC_THREADS=1 -D GC_BUILTIN_ATOMIC=1 -I"/home/ge/.vlang/thirdparty/libgc/include" -I"/home/ge/.vlang/thirdparty/libbacktrace" -o "/home/ge/.vmodules/.cache/73/73ee7692c076217496f1eb3a6d2f44ef.module.builtin.o" -c "/home/ge/.vlang/thirdparty/libbacktrace/backtrace.c"
builder error: In file included from /home/ge/.vlang/thirdparty/libbacktrace/backtrace.c:145:
In file included from /home/ge/.vlang/thirdparty/libbacktrace/linux.c:11:
In file included from /usr/include/link.h:35:
/usr/include/bits/link.h:99: error: ';' expected (got "__int128_t")
Possible Solution
No response
Additional Information/Context
Generated by v bug from foo.v.
V version
V 0.5.1 3690f88
Environment details (OS name and version, etc.)
|V full version |V 0.5.1 2f3c0f1f397c08bfc5ef73e7ff62794471b2b811.3690f88
|:-------------------|:-------------------
|OS |linux, Linux version 7.0.11-arch1-1 (linux@archlinux) (gcc (GCC) 16.1.1 20260430, GNU ld (GNU Binutils) 2.46.0) #1 SMP PREEMPT_DYNAMIC Tue, 02 Jun 2026 18:26:58 +0000
|Processor |16 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i5-1240P
|Memory |4.82GB/15.34GB
| |
|V executable |/home/ge/.vlang/v
|V last modified time|2026-06-10 13:35:52
| |
|V home dir |OK, value: /home/ge/.vlang
|VMODULES |OK, value: /home/ge/.vmodules
|VTMP |OK, value: /tmp/v_1000
|Current working dir |OK, value: /tmp
| |
|Git version |git version 2.54.0
|V git status |weekly.2026.03-2253-g3690f882
|.git/config present |true
| |
|cc version |cc (GCC) 16.1.1 20260430
|gcc version |gcc (GCC) 16.1.1 20260430
|clang version |clang version 22.1.6
|tcc version |tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
|tcc git status |thirdparty-linux-amd64 696c1d84
|emcc version |N/A
|glibc version |ldd (GNU libc) 2.43
[!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.