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

Error trying to compile quicer on MacOS Apple Silicon #329

Open
danicuki opened this issue Dec 17, 2024 · 7 comments
Open

Error trying to compile quicer on MacOS Apple Silicon #329

danicuki opened this issue Dec 17, 2024 · 7 comments

Comments

@danicuki
Copy link

Hi, I am trying to use this library for my Elixir project and I get this error when I try to compile. How to solve this?

mix.exs dep: {:quicer, github: "emqx/quic"}

Apple M3 Max - MacOS 15.1.1 (24B91)

mix --version
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Mix 1.17.2 (compiled with Erlang/OTP 26)
 ~/dev/jamixir (networking)₿ mix deps.compile quicer --force
./build.sh 'v2.3.8'
allexport      	off
braceexpand    	on
emacs          	off
errexit        	on
errtrace       	off
functrace      	off
hashall        	on
histexpand     	off
history        	off
ignoreeof      	off
interactive-comments	on
keyword        	off
monitor        	off
noclobber      	off
noexec         	off
noglob         	off
nolog          	off
notify         	off
nounset        	on
onecmd         	off
physical       	off
pipefail       	off
posix          	on
privileged     	off
verbose        	off
vi             	off
xtrace         	off
Patching Msquic 2.3.8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1539  100  1539    0     0   4444      0 --:--:-- --:--:-- --:--:--  4447
2 out of 2 hunks failed while patching 'src/inc/msquic_posix.h'
Skip patching patches/12edf3725475d4a99e5598df3289bace47b8f56e.patch, already applied
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   930  100   930    0     0   3243      0 --:--:-- --:--:-- --:--:--  3251
1 out of 1 hunks failed while patching 'src/core/binding.c'
Skip patching patches/e0201eb4e007e7524aef007be67f2281f949f102.patch, already applied
-- CMAKE Version: 3.28.3
-- Source Dir: /Users/danicuki/dev/jamixir/deps/quicer/msquic
-- Host System name: Darwin
-- Setting policy 0091
-- System name: Darwin
-- System version: 24.1.0
-- Platform version:
-- Build type: RelWithDebInfo
-- QUIC Platform: darwin
-- Version Build ID: 0
-- Version Suffix: -private
-- Enabling OpenSsl configuration tests
-- Enabling CA file tests
-- QUIC_ENABLE_LOGGING is false. Disabling logging
-- Disabling (client) shared port support
-- Configuring for OpenSSL 1.1
-- Setting openssldir to /opt/homebrew/etc/openssl@3
ERRORWTF darwin
-- Configuring OpenSSL: /Users/danicuki/dev/jamixir/deps/quicer/msquic/submodules/openssl/config enable-tls1_3;no-makedepend;no-dgram;no-ssl3;no-psk;no-srp;no-zlib;no-egd;no-idea;no-rc5;no-rc4;no-afalgeng;no-comp;no-cms;no-ct;no-srp;no-srtp;no-ts;no-gost;no-dso;no-ec2m;no-tls1;no-tls1_1;no-tls1_2;no-dtls;no-dtls1;no-dtls1_2;no-ssl;no-ssl3-method;no-tls1-method;no-tls1_1-method;no-tls1_2-method;no-dtls1-method;no-dtls1_2-method;no-siphash;no-whirlpool;no-aria;no-bf;no-blake2;no-sm2;no-sm3;no-sm4;no-camellia;no-cast;no-md4;no-mdc2;no-ocb;no-rc2;no-rmd160;no-scrypt;no-seed;no-weak-ssl-ciphers;no-shared;no-tests;--openssldir="/opt/homebrew/etc/openssl@3";--prefix=/Users/danicuki/dev/jamixir/deps/quicer/c_build/_deps/opensslquic-build/openssl;-isysroot;/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk;-mmacosx-version-min=14.2
-- Configuring for OpenSSL
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/danicuki/dev/jamixir/deps/quicer/c_build
[  2%] Built target OpenSSL_Target
[ 48%] Built target core
[ 66%] Built target platform
[ 67%] Linking C shared library ../../bin/Release/libmsquic.dylib
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libssl.a[47](tls_srp.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[554](e_padlock.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[553](e_capi.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[552](v3err.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[551](v3_utl.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[550](v3_tlsf.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[549](v3_sxnet.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[548](v3_skey.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[547](v3_purp.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[546](v3_prn.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[545](v3_pmaps.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[544](v3_pku.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[543](v3_pcons.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[542](v3_pcia.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[541](v3_pci.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[540](v3_ncons.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[539](v3_lib.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[538](v3_int.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[537](v3_info.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[536](v3_ia5.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[535](v3_genn.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[534](v3_extku.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[533](v3_enum.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[532](v3_crld.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[531](v3_cpols.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[530](v3_conf.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[529](v3_bitst.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[528](v3_bcons.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[527](v3_asid.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[526](v3_alt.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[525](v3_akeya.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[524](v3_akey.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[523](v3_admis.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[522](v3_addr.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[521](pcy_tree.o)': found architecture 'arm64', required architecture 'x86_64'
...
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[367](o_init.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[366](o_fopen.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[365](o_fips.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[364](o_dir.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[363](xts128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[362](wrap128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[361](ofb128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[360](ocb128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[359](ghashv8-armx.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[358](gcm128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[357](cts128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[356](ctr128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[355](cfb128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[354](ccm128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[353](cbc128.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[352](mem_sec.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[351](mem_dbg.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[350](mem.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[349](md5_one.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[348](md5_dgst.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[347](lhash.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[346](lh_stats.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[345](tls1_prf.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[344](scrypt.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[343](kdf_err.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[342](hkdf.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[341](init.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[340](hmac.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[339](hm_pmeth.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[338](hm_ameth.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[337](getenv.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[336](ex_data.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libcrypto.a[335](pmeth_lib.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libssl.a[5](d1_srtp.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libssl.a[4](d1_msg.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libssl.a[3](d1_lib.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../../../_deps/opensslquic-build/openssl/lib/libssl.a[2](bio_ssl.o)': found architecture 'arm64', required architecture 'x86_64'
ld: Undefined symbols:
  _BIO_ctrl, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _BIO_free, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _BIO_new, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _BIO_new_mem_buf, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _BIO_s_mem, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _BIO_write, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _CRYPTO_free, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _ERR_error_string, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _ERR_error_string_n, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _ERR_get_error, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
      ...
  _ERR_get_error_line, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _EVP_CIPHER_CTX_ctrl, referenced from:
      _CxPlatKeyCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatEncrypt in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatDecrypt in libplatform.a[13](crypt_openssl.c.o)
  _EVP_CIPHER_CTX_free, referenced from:
      _CxPlatKeyCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatKeyFree in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpKeyCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpKeyFree in libplatform.a[13](crypt_openssl.c.o)
  _EVP_CIPHER_CTX_new, referenced from:
      _CxPlatKeyCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpKeyCreate in libplatform.a[13](crypt_openssl.c.o)
  _EVP_CipherInit_ex, referenced from:
      _CxPlatKeyCreate in libplatform.a[13](crypt_openssl.c.o)
  _EVP_DecryptFinal_ex, referenced from:
      _CxPlatDecrypt in libplatform.a[13](crypt_openssl.c.o)
  _EVP_DecryptInit_ex, referenced from:
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatDecrypt in libplatform.a[13](crypt_openssl.c.o)
  _EVP_DecryptUpdate, referenced from:
      _CxPlatDecrypt in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatDecrypt in libplatform.a[13](crypt_openssl.c.o)
  _EVP_EncryptFinal_ex, referenced from:
      _CxPlatEncrypt in libplatform.a[13](crypt_openssl.c.o)
  _EVP_EncryptInit_ex, referenced from:
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatEncrypt in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpKeyCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpComputeMask in libplatform.a[13](crypt_openssl.c.o)
  _EVP_EncryptUpdate, referenced from:
      _CxPlatEncrypt in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatEncrypt in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpComputeMask in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHpComputeMask in libplatform.a[13](crypt_openssl.c.o)
  _EVP_PKEY_free, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _EVP_aes_128_ecb, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_aes_128_gcm, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_aes_256_cbc, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_aes_256_ecb, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_aes_256_gcm, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_chacha20, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_chacha20_poly1305, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _EVP_sha256, referenced from:
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
  _EVP_sha384, referenced from:
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
  _EVP_sha512, referenced from:
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
  _HMAC_CTX_free, referenced from:
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHashFree in libplatform.a[13](crypt_openssl.c.o)
  _HMAC_CTX_new, referenced from:
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
  _HMAC_Final, referenced from:
      _CxPlatHashCompute in libplatform.a[13](crypt_openssl.c.o)
  _HMAC_Init_ex, referenced from:
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatHashCreate in libplatform.a[13](crypt_openssl.c.o)
      _CxPlatHashCompute in libplatform.a[13](crypt_openssl.c.o)
  _HMAC_Update, referenced from:
      _CxPlatHashCompute in libplatform.a[13](crypt_openssl.c.o)
  _OPENSSL_init_ssl, referenced from:
      _CxPlatCryptInitialize in libplatform.a[13](crypt_openssl.c.o)
  _OPENSSL_sk_free, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _OPENSSL_sk_num, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _OPENSSL_sk_pop, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _OPENSSL_sk_value, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _PEM_read_bio_SSL_SESSION, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _PEM_write_bio_SSL_SESSION, referenced from:
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
  _PKCS12_free, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _PKCS12_parse, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _PKCS7_add_certificate, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _PKCS7_content_new, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _PKCS7_free, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _PKCS7_new, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _PKCS7_set_type, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _SSL_CIPHER_get_id, referenced from:
      _CxPlatTlsNegotiatedCiphers in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSetEncryptionSecretsCallback in libplatform.a[12](tls_openssl.c.o)
  _SSL_CIPHER_get_protocol_id, referenced from:
      _CxPlatTlsParamGet in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_callback_ctrl, referenced from:
      _CxPlatTlsSecConfigSetTicketKeys in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_check_private_key, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_clear_options, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_ctrl, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_free, referenced from:
      _CxPlatTlsSecConfigDelete in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_load_verify_locations, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_new, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_sess_set_new_cb, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_alpn_select_cb, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_cert_verify_callback, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_ciphersuites, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_client_hello_cb, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_default_passwd_cb_userdata, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_default_verify_paths, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_max_early_data, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_num_tickets, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_options, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_quic_method, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_session_ticket_cb, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_verify, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_set_verify_depth, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_use_PrivateKey, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_use_PrivateKey_file, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_use_certificate, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_CTX_use_certificate_chain_file, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _SSL_SESSION_free, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_SESSION_get0_ticket_appdata, referenced from:
      _CxPlatTlsOnServerSessionTicketDecrypted in libplatform.a[12](tls_openssl.c.o)
  _SSL_SESSION_set1_ticket_appdata, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_client_hello_get0_ext, referenced from:
      _CxPlatTlsClientHelloCallback in libplatform.a[12](tls_openssl.c.o)
  _SSL_ctrl, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_do_handshake, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_free, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsUninitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_get0_alpn_selected, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsParamGet in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_current_cipher, referenced from:
      _CxPlatTlsNegotiatedCiphers in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSetEncryptionSecretsCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsParamGet in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_early_data_status, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_error, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_ex_data, referenced from:
      _CxPlatTlsSetEncryptionSecretsCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsAddHandshakeDataCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsSendAlertCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsClientHelloCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnClientSessionTicketReceived in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnSessionTicketKeyNeeded in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsOnServerSessionTicketGenerated in libplatform.a[12](tls_openssl.c.o)
      ...
  _SSL_get_ex_data_X509_STORE_CTX_idx, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_peer_quic_transport_params, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_session, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_get_version, referenced from:
      _CxPlatTlsParamGet in libplatform.a[12](tls_openssl.c.o)
  _SSL_new, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_new_session_ticket, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_process_quic_post_handshake, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_provide_quic_data, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_session_reused, referenced from:
      _CxPlatTlsProcessData in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_accept_state, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_alpn_protos, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_connect_state, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_ex_data, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_quic_early_data_enabled, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_quic_transport_params, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_quic_use_legacy_codepoint, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _SSL_set_session, referenced from:
      _CxPlatTlsInitialize in libplatform.a[12](tls_openssl.c.o)
  _TLS_method, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _X509_STORE_CTX_get0_cert, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _X509_STORE_CTX_get0_chain, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _X509_STORE_CTX_get_error, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _X509_STORE_CTX_get_ex_data, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _X509_STORE_CTX_set_error, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _X509_free, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _X509_verify_cert, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _d2i_PKCS12_bio, referenced from:
      _CxPlatTlsSecConfigCreate in libplatform.a[12](tls_openssl.c.o)
  _i2d_PKCS7, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
  _i2d_X509, referenced from:
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
      _CxPlatTlsCertificateVerifyCallback in libplatform.a[12](tls_openssl.c.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [msquic/bin/Release/libmsquic.2.3.8.dylib] Error 1
make[2]: *** [msquic/src/bin/CMakeFiles/msquic.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build-nif] Error 2
===> Hook for compile failed!

** (Mix) Could not compile dependency :quicer, "/Users/danicuki/.asdf/installs/elixir/1.17-otp-26/.mix/elixir/1-17/rebar3 bare compile --paths /Users/danicuki/dev/jamixir/_build/x86_64-apple-darwin_dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile quicer --force", update it with "mix deps.update quicer" or clean it with "mix deps.clean quicer"
@qzhuyan
Copy link
Collaborator

qzhuyan commented Dec 17, 2024

macOS 15 is not yet supported.

for some reason, cmake think your OS is x86_64 instead of arm64

../../../_deps/opensslquic-build/openssl/lib/libssl.a[4](d1_msg.o)': found architecture 'arm64', required architecture 'x86_64'

I could not repoduce it on macOS 15.0.1 (M2), I will check if it will work in github CI.

@danicuki
Copy link
Author

I could compile when I added these lines to build.sh:

# Check if a MIX_TARGET is set.
if [ -n "${MIX_TARGET}" ] ; then
    case "$MIX_TARGET" in
        "x86_64-apple-darwin")
            CMAKE_EXTRA_ARGS="-DCMAKE_OSX_ARCHITECTURES=x86_64"
            ;;
       *)
            CMAKE_EXTRA_ARGS=""
           ;;
    esac
fi

and set MIX_TARGET as x86_64-apple-darwin

@danicuki
Copy link
Author

but now that is compiled, I get another incompatibility error:

10:39:39.272 [warning] The on_load function for module quicer_nif returned:
{:error,
 {:load_failed,
  ~c"Failed to load NIF library: 'dlopen(/Users/danicuki/dev/jamixir/_build/x86_64-apple-darwin_test/lib/quicer/priv/libquicer_nif.so, 0x0002): tried: '/Users/danicuki/dev/jamixir/_build/x86_64-apple-darwin_test/lib/quicer/priv/libquicer_nif.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/danicuki/dev/jamixir/_build/x86_64-apple-darwin_test/lib/quicer/priv/libquicer_nif.so' (no such file), '/Users/danicuki/dev/jamixir/_build/x86_64-apple-darwin_test/lib/quicer/priv/libquicer_nif.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/Users/danicuki/dev/jamixir/deps/quicer/priv/libquicer_nif.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/danicuki/dev/jamixir/deps/quicer/priv/libquicer_nif.so' (no such file), '/Users/danicuki/dev/jamixir/deps/quicer/priv/libquicer_nif.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))'"}}

@qzhuyan
Copy link
Collaborator

qzhuyan commented Dec 18, 2024

you are running apple m3 ? then it should be arm64

@danicuki
Copy link
Author

I fixed with this:

#331

@qzhuyan
Copy link
Collaborator

qzhuyan commented Dec 18, 2024

Thanks for the PR!

I tried the macOS 15 of github runner, still cannot reproduce the issue with rebar3.

diff is here:
https://patch-diff.githubusercontent.com/raw/emqx/quic/pull/330.diff

test log:
https://github.com/emqx/quic/actions/runs/12389880489/job/34584062062?pr=330

Do I understand correctly that you DO want the x86_64 for M3 which is arm64 and have some envs set by mix?

if not, I do not understand what set MIX_TARGET to x86_64-apple-darwin for a arm64 build, is it by mix?

@danicuki
Copy link
Author

danicuki commented Dec 18, 2024

in my case, it works with -DCMAKE_OSX_ARCHITECTURES=arm64 - this is what I put as default case - when user does not configure anything (as Apple evolves to arm64, I believe this is the best default). If the user want to configure another architecture, just setup MIX_TARGET=x86_64-apple-darwin and it will change to -DCMAKE_OSX_ARCHITECTURES=x86_64

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

2 participants