There's an error while compilating tdlib program related to the openssl call.
/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64/link: running cc failed: exit status 1
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The openssl was already installed with brew:
which openssl
/opt/homebrew/bin/openssl
==> openssl@3: stable 3.1.2 (bottled)
Cryptography and SSL/TLS Toolkit
https://openssl.org/
/opt/homebrew/Cellar/openssl@3/3.1.2 (6,495 files, 28.4MB) *
Poured from bottle using the formulae.brew.sh API on 2023-09-21 at 14:06:03
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/o/[email protected]
License: Apache-2.0
I'm tried to use pkg-config and exporing next envs to solve this issue, but nothing helps.
export CGO_CFLAGS=$(pkg-config --cflags openssl)
export CGO_LDFLAGS=$(pkg-config --libs openssl)
Can u chech with these flags too (.~/bashrc or ~/.zshrc):
or u can use pkg-config: