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

Trouble building on Mac #1921

Open
maoudia-via opened this issue Sep 12, 2024 · 2 comments
Open

Trouble building on Mac #1921

maoudia-via opened this issue Sep 12, 2024 · 2 comments

Comments

@maoudia-via
Copy link

Following the steps documented in the README, I tried to build on Mac

Darwin xxxxxx 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 x86_64

I am seeing build errors such as :

: && /Library/Developer/CommandLineTools/usr/bin/cc -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  tests/CMakeFiles/example_kem.dir/example_kem.c.o -o tests/example_kem  lib/liboqs.a  lib/liboqs-internal.a  -lm  /opt/homebrew/opt/openssl@3/lib/libcrypto.dylib && :
ld: warning: ignoring file '/opt/homebrew/Cellar/openssl@3/3.3.2/lib/libcrypto.3.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
  "_ERR_print_errors_fp", referenced from:
      _SHA2_sha256_inc_init in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha256_inc_ctx_clone in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha256_inc in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha256_inc_blocks in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha256_inc_finalize in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha384_inc_init in liboqs.a[1605](sha2_ossl.c.o)
      _SHA2_sha384_inc_ctx_clone in liboqs.a[1605](sha2_ossl.c.o)

OPENSSL_ROOT_DIR is set to /opt/homebrew/opt/[email protected]

Is there anything I am missing for a successful build ?

Thanks !

@SWilson4
Copy link
Member

I'm not a Mac expert, but it looks to me like your version of OpenSSL targets arm64 and you're running an x86_64 machine (or possibly vice versa).

@dstebila
Copy link
Member

Yes, if I'm not mistaken on arm64 Mac's Homebrew is installed in /opt/homebrew, whereas on x86_64 Mac's it's in /usr/local, so this seems to indicate your building on arm64. Did you use some specific command line arguments mentioning x86_64?

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

No branches or pull requests

3 participants