V: hot reload not working on macOS

Created on 8 Feb 2020  路  2Comments  路  Source: vlang/v

V version:
V 0.1.25 c2f22a4
OS:
macOS Catalina
What did you do?

Performed v -cg -live message.v under examples/hot_reload.

What did you expect to see?

Compiles without errors.

  • I remember compiling the sample worked on Mac last year, around December.
  • Compiling the sample on Ubuntu Linux env still works without any errors/warnings.

What did you see instead?

v -cg -live message.v
C compiler=cc
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/time/time.v:218:16: you are calling an unsafe function outside of an unsafe block
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/os/os.v:126:18: you are calling an unsafe function outside of an unsafe block
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/os/os.v:711:23: you are calling an unsafe function outside of an unsafe block
C compiler=cc
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/time/time.v:218:16: you are calling an unsafe function outside of an unsafe block
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/os/os.v:126:18: you are calling an unsafe function outside of an unsafe block
warning: /Users/hachi8833/deve/vlang/v_mac/vlib/os/os.v:711:23: you are calling an unsafe function outside of an unsafe block
Undefined symbols for architecture x86_64:
  "__STR", referenced from:
      _array_insert in message-d3bdc4.o
      _v_array_delete in message-d3bdc4.o
      _array_get in message-d3bdc4.o
      _array_slice in message-d3bdc4.o
      _array_slice_clone in message-d3bdc4.o
      _array_set in message-d3bdc4.o
      _v_malloc in message-d3bdc4.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
V error: C error. This should never happen.
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
Bug Mac

All 2 comments

not only on osx, the same error (_STR function ) occurs on windows too for some examples

Fixed.

Was this page helpful?
0 / 5 - 0 ratings