vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.7k stars 2.16k forks source link

examples compilation on macos ventura throw error libarclite_macosx.a missing #18432

Closed GrosserKaese closed 1 year ago

GrosserKaese commented 1 year ago

Describe the bug

When compiling the examples in the examples directory (regarding to the ones that use some kind of graphics), V throws a C error:

==================
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected Behavior

A window with a clock should appear.

Current Behavior

It throws the error message.

Reproduction Steps

cd into the v directory examples/clock v run clock.v

Possible Solution

I googled, and some people using SDL have the same problem, because Apple (tadaaa...) updated its XCode again.

Additional Information/Context

XCode is version 14.3.1 (recently updated)

V version

V 0.3.4 2850006

Environment details (OS name and version, etc.)

V full version: V 0.3.4 2850006 OS: macos, macOS, 13.4, 22F66 Processor: 12 cpus, 64bit, little endian, Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz

getwd: /Users/user_name/v/examples/clock vexe: /Users/user_name/v/v vexe mtime: 2023-06-13 06:49:20

vroot: OK, value: /Users/user_name/v VMODULES: OK, value: /Users/user_name/.vmodules VTMP: OK, value: /tmp/v_501

Git version: git version 2.39.2 (Apple Git-143) Git vroot status: weekly.2023.23-40-g28500069 .git/config present: true

CC version: Apple clang version 14.0.3 (clang-1403.0.22.14.1) thirdparty/tcc status: thirdparty-macos-amd64 46662e20

prantlf commented 1 year ago

You can unpack the missing library on your machine as a workaround. Either by creating the missing /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc. or symlinking it to a directory with the libraries. See:

GrosserKaese commented 1 year ago

You can unpack the missing library on your machine as a workaround. Either by creating the missing /Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc. or symlinking it to a directory with the libraries. See:

That did it! Thanks!