Skip to content

V 0.5.1 compilation fails on macOS 26.4.1 (25E253) #27031

@mortax

Description

@mortax

Describe the bug

V 0.5.1 produced a linker error when compiling anything (in the link phase).

Reproduction Steps

Here is a simple example.

[macro]$ cat hello.v 
//usr/bin/env v run $0 "$@"; exit

fn main() {
    println('Hello world!')
}
[macro]$ v version
V 0.5.1 
[macro]$ v -prod hello.v -g
ld: warning: search path '/opt/homebrew/Cellar/vlang/0.5.1/libexec/thirdparty/tcc/lib' not found
ld: library 'gc' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
builder error: 
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
{1} [macro]$ 

Expected Behavior

This should compile and run.

Current Behavior

V 0.5 yields:

[univac]$ cat hello.v      
//usr/bin/env v run $0 "$@"; exit

fn main() {
    println('Hello world!')
}
[univac]$ v version        
V 0.5.0 e2f5d6c
[univac]$ v -prod hello.v -g
[univac]$ ./hello
Hello world!
[univac]$ 

Possible Solution

No response

Additional Information/Context

No response

V version

0.5.1

Environment details (OS name and version, etc.)

ProductName:		macOS
ProductVersion:		26.4.1
BuildVersion:		25E253

Memory: 128G

brand_string: Apple M4 Max
core_count: 16
cores_per_package: 16
logical_per_package: 16
thread_count: 16

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

    BugThis tag is applied to issues which reports bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions