Open ttytm opened 3 months ago
Yes, it is a known problem. tcc does not yet support ARM asm blocks on macos.
The current workarounds are to either:
a) -cc clang
for such programs, which is slower, but should work without other changes.
or
b) if you do not need mbedtls, but just net.http
and net.ssl
, pass -d use_openssl
, which should work with tcc too (after installing openssl with brew).
Here is an example of compiling examples/fetch.v
, which does use net.http
:
0[07:19:44]@m1: (master) /opt/v $ ./v -showcc -d use_openssl -cc tcc -no-retry-compilation -d dynamic_boehm examples/fetch.v
> C compiler cmd: '/opt/v/thirdparty/tcc/tcc.exe' '@/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c.rsp'
> C compiler response file "/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c.rsp":
-fwrapv -o "/opt/v/examples/fetch" -D GC_THREADS=1 -I "/opt/homebrew/Cellar/bdw-gc/8.2.4/include" -L "/opt/homebrew/Cellar/bdw-gc/8.2.4/lib" -I "/opt/v/thirdparty/legacy/include/LegacySupport" -I "/opt/v/thirdparty/stdatomic/nix" -I "/opt/homebrew/Cellar/openssl@3/3.3.0/include" -L "/opt/homebrew/Cellar/openssl@3/3.3.0/lib" "/tmp/v_501/fetch.01HZV160EXN887J1X6A9R7T7HZ.tmp.c" -std=c99 -D_DEFAULT_SOURCE -bt25 -lgc -lpthread -lssl -lcrypto
0[07:19:52]@m1: (master) /opt/v $
0[07:19:53]@m1: (master) /opt/v $
The -d dynamic_boehm
is needed to get V to use the brew version of the precompiled Boehm collector, since tcc can not link to our libgc.a
too.
Describe the bug
It's not possible to use modules that import the current version of mbedtls on macos arm
Reproduction Steps
Expected Behavior
Compiles.
Current Behavior
Possible Solution
Update tcc bins to allow updating mbedtls version. It would also allow to progress on pull/20726 and pull/20753
Additional Information/Context
No response
V version
-
Environment details (OS name and version, etc.)