Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v broken again on freebsd when using clang, the default compiler #21656

Closed
bakul opened this issue Jun 7, 2024 · 1 comment
Closed

v broken again on freebsd when using clang, the default compiler #21656

bakul opened this issue Jun 7, 2024 · 1 comment
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@bakul
Copy link
Contributor

bakul commented Jun 7, 2024

Describe the bug

Compile of simple programs fails with clang. With tcc it succeeds but a) /usr/include/sys/cdefs.h needs to be patched and b) many more tests fail with tcc and c) tcc shouldn't be required.

Reproduction Steps

echo "println('Hello, World!')" > hello.v
v run hello.v # this will work if tcc is the default
v -cc clang run hello.v  # this will fail

Expected Behavior

not break

Current Behavior

compiling produces the following (70 line output truncated):

failed thirdparty object build cmd:
'clang' -std=c99 -D_DEFAULT_SOURCE    -fPIC -D GC_BUILTIN_ATOMIC=1 -D BUS_PAGE_FAULT=T_PAGEFLT -D USE_MMAP -D GC_THREADS=1 -I "/usr/remotes/github/vlang/v/thirdparty/libgc/include" -o '/home/bakul/.vmodules/cache/c7/c7d3a369f02ed78f1f27f2b997e2aa65.module.builtin.o' -c '/usr/remotes/github/vlang/v/thirdparty/libgc/gc.c'
builder error: /usr/remotes/github/vlang/v/thirdparty/libgc/gc.c:14208:27: error: incompatible pointer to integer conversion passing 'const void *' to parameter of type 'GC_word' (aka 'unsigned long') [-Wint-conversion]
 14208 |     REACHABLE_AFTER_DIRTY(q);
       |                           ^

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.6 0d52a7d

Environment details (OS name and version, etc.)

V full version: V 0.4.6 0d52a7d
OS: freebsd, 14.1-STABLE, FreeBSD 14.1-STABLE stable/14-n267877-04a191c251e5 GENERIC
Processor: 16 cpus, 64bit, little endian

getwd: /usr/remotes/github/vlang/v
vexe: /usr/remotes/github/vlang/v/v
vexe mtime: 2024-06-07 21:07:02

vroot: OK, value: /usr/remotes/github/vlang/v
VMODULES: OK, value: /home/bakul/.vmodules
VTMP: OK, value: /tmp/v_1001

Git version: git version 2.45.1
Git vroot status: weekly.2024.23-4-g0d52a7d9
.git/config present: true

CC version: FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)
thirdparty/tcc status: thirdparty-freebsd-amd64 5a541410

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.

@bakul bakul added the Bug This tag is applied to issues which reports bugs. label Jun 7, 2024
@bakul bakul changed the title v brokem again on freebsd when using clang, the default compulier v broken again on freebsd when using clang, the default compulier Jun 7, 2024
@bakul bakul changed the title v broken again on freebsd when using clang, the default compulier v broken again on freebsd when using clang, the default compiler Jun 7, 2024
@medvednikov
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

2 participants