Closed Bellavene closed 2 years ago
Hi @Bellavene - I don't see this problem on my M1 macOS.
Could you share the entire build output on terminal, perhaps attach as a txt file, or at least the output from cmake?
On my M1 homebrew installs (arm64) packages under /opt/homebrew/opt, so when cmake runs it detects openssl there:
-- Found OpenSSL: /opt/homebrew/opt/openssl/lib/libcrypto.dylib (found version "3.0.2")
-- Found OpenSSL: /opt/homebrew/opt/openssl/include /opt/homebrew/opt/openssl/lib/libssl.dylib;/opt/homebrew/opt/openssl/lib/libcrypto.dylib
But it looks like it detects it wrongly on your system.
Btw, are you using brew
, and have installed openssl
using it?
Hi @Bellavene - I don't see this problem on my M1 macOS.
Could you share the entire build output on terminal, perhaps attach as a txt file, or at least the output from cmake?
On my M1 homebrew installs (arm64) packages under /opt/homebrew/opt, so when cmake runs it detects openssl there:
-- Found OpenSSL: /opt/homebrew/opt/openssl/lib/libcrypto.dylib (found version "3.0.2") -- Found OpenSSL: /opt/homebrew/opt/openssl/include /opt/homebrew/opt/openssl/lib/libssl.dylib;/opt/homebrew/opt/openssl/lib/libcrypto.dylib
But it looks like it detects it wrongly on your system.
Btw, are you using
brew
, and have installedopenssl
using it?
Hello @d99kris I am a bit busy last days, will come back with that. Honestly I don't remember, but most likely yes, installed through brew. Will check that. Maybe there is some leftover from intel brew, because I have migrated the user data last time. Thank You.
Looks like I was too slow, the above link shows: "This link has expired"
Anyway, I believe Github issues allow attaching files directly. It should be possible to just drag and drop onto this web page form.
Thank you, did not knew that.
Thanks! Yeah, the Github issues UI could perhaps be improved with a paperclip button to make it more obvious it's supported.
So from the log you shared I see this:
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.dylib (found version "1.1.1k")
-- Found OpenSSL: /usr/local/opt/openssl/include /usr/local/opt/openssl/lib/libssl.dylib;/usr/local/opt/openssl/lib/libcrypto.dylib
which indicates openssl was found in /usr/local/opt/openssl
, which is the default location for x86_64
installation.
The default location for arm64
is /opt/homebrew/opt/openssl
. Could you check if you have that dir, and perhaps also that the installed openssl there is arm64
? One can use the following command:
file /opt/homebrew/opt/openssl/bin/openssl
/opt/homebrew/opt/openssl/bin/openssl: Mach-O 64-bit executable arm64
Assuming your system does have openssl
arm64
installed, perhaps you could try to edit the nchat
source file lib/tgchat/CMakeLists.txt
and remove the following line:
list(APPEND OPENSSL_ROOT_DIR /usr/local/opt/openssl)
If this works, I will try prepare a proper fix in nchat. Thanks!
Thank you! That worked flawlessly
Thanks for the feedback! In the above commit I've implemented a proper fix to support M1 systems which have both arm64
and x86_64
installations of openssl
, by prioritizing the native (arm64
) openssl search path.