It should work fine now.
The instructions are the same:
git clone https://github.com/vlang/v ~/code/v
cd ~/code/v/compiler
make
Thanks, good job, it works on ArchLinux :-)
It can't work on Centos7.1 with gcc version 4.8.5 yet as below:
cc -std=gnu11 -w -o vc v.c
v.c:359:3: error: expected specifier-qualifier-list before ‘_Atomic’
_Atomic int fn_cnt;
^
v.c: In function ‘Fn_str’:
v.c:13790:21: error: unknown field ‘fn_cnt’ specified in initializer
.fn_cnt = 0,
^
v.c:13791:21: error: unknown field ‘obfuscate’ specified in initializer
.obfuscate = 0};
^
v.c: In function ‘new_table’:
v.c:13809:3: error: unknown field ‘obfuscate’ specified in initializer
Table t = ALLOC_INIT(Table, {
^
v.c:13809:3: error: unknown field ‘fn_cnt’ specified in initializer
v.c: In function ‘Table_cgen_name’:
v.c:14654:12: error: ‘Table’ has no member named ‘obfuscate’
if (table->obfuscate && string_ne(f->name, tos2("main")) &&
^
v.c:14674:12: error: ‘Table’ has no member named ‘fn_cnt’
table->fn_cnt++;
^
v.c:14675:24: error: ‘Table’ has no member named ‘fn_cnt’
int tmp68 = table->fn_cnt;
^
v.c:14679:18: error: ‘Table’ has no member named ‘fn_cnt’
idx = table->fn_cnt;
^
make: ** [vc] Error 1
Thanks for letting me know, @mrhdias !
@zhengshuxin, GCC 4.8.5 is 4 years old. Please consider upgrading it.
In the future I'll make sure V can be compiled with older C compilers, but I can't do that right now, sorry.
Thank you very much and wish V will be more powerful.
next goal should be to stop the limitation of the sources to be in ~/code/v!
@medvednikov when do you think this will be fixed :slightly_smiling_face:
@Hamzantal today, there was a discussion about this here.
@medvednikov @Hamzantal
actually, I implemented it experimentally.
https://github.com/vlang/v/issues/457#issuecomment-505009320
You can try it. I would like to get your feedback.
https://github.com/musou1500/v/tree/impl-exp-custom-location
Thanks for letting me know, @mrhdias !
@zhengshuxin, GCC 4.8.5 is 4 years old. Please consider upgrading it.
In the future I'll make sure V can be compiled with older C compilers, but I can't do that right now, sorry.
I've compiled V compilter successfuly on Centos7.x with gcc9.1.0 after I upgraded the gcc.
It should also build on musl distros now.
Works here, elementary OS Juno, clang v6.0 GCC 7.4 :tada :clap: :
Just FYI: works fine with GCC 6.3 (released December 21, 2016).
Verified compiled on VoidLinux with musl
Most helpful comment
@Hamzantal today, there was a discussion about this here.