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

vpm install error (for any module) with env has CLFAGS set, mbedtls error #121

Open
scriptmaster opened this issue Dec 14, 2023 · 0 comments

Comments

@scriptmaster
Copy link

scriptmaster commented Dec 14, 2023

Describe the bug

i resolved the v install vui error, it was having issue with my CFLAGS in my env, like some mentioned. So, I had to add $VSRC/third_party/mbedtls/include to -I in CFLAGS

Don't you want to add this -I include shipped third_party/mbedtls/include/ or an include/ with symlinks of all third_parties? when installing a vpm module ?? this is a vpm issue/bug

Expected Behavior

i was expecting vpm to take care of resolving / including mbedtls if it had to use the one included with, or switch to openssl if none was found automatically. from a v install MODULE ux (perspective) in any environment.

Current Behavior

v/cmd/tools/vpm`:
failed thirdparty object build cmd:
'cc' -std=c99 -D_DEFAULT_SOURCE -I /opt/homebrew/include   -fPIC -I "

v/thirdparty/mbedtls/library/aes.c:561:10: error: no member named 'rk' in 'struct mbedtls_aes_context'
    ctx->rk = RK = ctx->buf;
    ~~~  ^

Reproduction Steps

In a new shell do these 2 steps:

export CFLAGS="-I /opt/homebrew/include"
vpm install ui

Possible Solution

export CFLAGS="-I $(v doctor | grep vroot: | tr " " "\n" | grep "^/")/thirdparty/mbedtls/include /opt/homebrew/include"
vpm to take care of resolving / including mbedtls if it had to use the one included with, or switch to openssl if none was found automatically. from a v install MODULE ux (perspective) in any environment.

Additional Information/Context

No response

V version

V 0.4.3 936790e.4d55f41

Environment details (OS name and version, etc.)

V full version: V 0.4.3 936790e.4d55f41
OS: macos, macOS, 13.X
Processor: 8 cpus, 64bit, Apple M2

getwd: /opt/v
vexe: /opt/v/v
vexe mtime: 2023-12-12 16:05:14

vroot: OK, value: /opt/v
VMODULES: OK, value: ~/.vmodules
VTMP: OK, value: /tmp/v_501

Git version: git version 2.41.0
Git vroot status: 4d55f412
.git/config present: true

CC version: Apple clang version 14.0.3 (clang-1403.0.22.14.1)
thirdparty/tcc status: thirdparty-macos-arm64 a668e5a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant