cmyr / cargo-instruments

A cargo plugin to generate Xcode Instruments trace files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install on Apple M1

hungkhoaitay opened this issue · comments

When I try $ brew install cargo-instruments

==> Downloading https://ghcr.io/v2/homebrew/core/cargo-instruments/manifests/0.4
Already downloaded: /Users/hungkhoaitay/Library/Caches/Homebrew/downloads/8717425197d784f85cb583ed0257a6db5d1ab31d884d078be2245d01dcd72e49--cargo-instruments-0.4.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/cargo-instruments/blobs/sha256:
Already downloaded: /Users/hungkhoaitay/Library/Caches/Homebrew/downloads/39d3e1a46c7bd00f9504e33747a1d43acf4c1932d3c44af58e85965b71b02637--cargo-instruments--0.4.2.arm64_big_sur.bottle.tar.gz
==> Pouring cargo-instruments--0.4.2.arm64_big_sur.bottle.tar.gz
🍺  /opt/homebrew/Cellar/cargo-instruments/0.4.2: 7 files, 9.1MB

Then $ cargo instruments -t Allocations, I have the error

cannot parse version: `11.5.1
`, because of unexpected character '\n' after patch version number

Also when I try $ cargo install cargo-instruments

ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
          Undefined symbols for architecture x86_64:
            "_EVP_cast5_cbc", referenced from:
                _libssh2_crypt_method_cast128_cbc in liblibssh2_sys-5d3d3fe8a549babf.rlib(crypt.o)

Please help me :)

The first issue is a bug here, and I'll push a new release shortly to fix that.

The second issue... I'm not sure? For some reason your homebrew is trying to build for x86 (intel) instead of arm64 (M1). This might be something you configured at some point, when homebrew support for M1 was less stable? But I do not believe it is a problem with this project.

okay I've published a new release. I'm not sure when it will get updated on homebrew, but it should install via cargo now, although you'll have to figure out your second issue. I'd consider uninstalling openssl in homebrew?

While cargo install cargo-instruments, I still face the same problem.
I tried to uninstall openssh and libssh on brew but still facing this.
Thank you for your help!

= note: ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
          ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
          Undefined symbols for architecture x86_64:
            "_EVP_cast5_cbc", referenced from:
                _libssh2_crypt_method_cast128_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_aes_128_cbc", referenced from:
                _libssh2_crypt_method_aes128_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_aes_192_cbc", referenced from:
                _libssh2_crypt_method_aes192_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_aes_256_cbc", referenced from:
                _libssh2_crypt_method_aes256_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
                _libssh2_crypt_method_rijndael_cbc_lysator_liu_se in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_CIPHER_CTX_free", referenced from:
                _crypt_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_ripemd160", referenced from:
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_EVP_md5", referenced from:
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_EVP_rc4", referenced from:
                _libssh2_crypt_method_arcfour128 in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
                _libssh2_crypt_method_arcfour in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_HMAC_CTX_new", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_EVP_aes_128_ctr", referenced from:
                _libssh2_crypt_method_aes128_ctr in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_HMAC_Update", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_HMAC_Final", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_HMAC_CTX_free", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_BN_set_word", referenced from:
                _kex_method_diffie_hellman_group16_sha512_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _kex_method_diffie_hellman_group18_sha512_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _kex_method_diffie_hellman_group14_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _kex_method_diffie_hellman_group1_sha1_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
            "_RAND_bytes", referenced from:
                __libssh2_kex_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                __libssh2_transport_send in liblibssh2_sys-4774e58dbc16c6aa.rlib(transport.o)
            "_EC_KEY_set_private_key", referenced from:
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_set1_EC_KEY", referenced from:
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_set1_DSA", referenced from:
                _gen_publickey_from_dsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_sub", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_get1_EC_KEY", referenced from:
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_new", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_dsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_mod_exp", referenced from:
                __libssh2_dh_key_pair in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dh_secret in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_set1_RSA", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ENGINE_register_all_complete", referenced from:
                __libssh2_openssl_crypto_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_clear_free", referenced from:
                __libssh2_dh_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_curve25519_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _ecdh_sha2_nistp in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _kex_method_diffie_hellman_group_exchange_sha256_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _diffie_hellman_sha_algo in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _kex_method_diffie_hellman_group16_sha512_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_RSA_free", referenced from:
                _hostkey_method_ssh_rsa_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_initPEM in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_initPEMFromMemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _gen_publickey_from_rsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_get1_RSA", referenced from:
                _gen_publickey_from_rsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_RSA_get0_key", referenced from:
                _gen_publickey_from_rsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_rand", referenced from:
                __libssh2_dh_key_pair in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_DigestVerifyInit", referenced from:
                __libssh2_ed25519_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_sha1", referenced from:
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_EVP_DigestVerify", referenced from:
                __libssh2_ed25519_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_CTX_new", referenced from:
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_derive", referenced from:
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_GROUP_get_degree", referenced from:
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_derive_set_peer", referenced from:
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_KEY_generate_key", referenced from:
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_RSA_set0_factors", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_KEY_get0_public_key", referenced from:
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_CTX_free", referenced from:
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _diffie_hellman_sha_algo in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
            "_EC_POINT_point2oct", referenced from:
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_POINT_free", referenced from:
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ECDSA_do_sign", referenced from:
                __libssh2_ecdsa_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_CTX_new", referenced from:
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _diffie_hellman_sha_algo in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
            "_ECDSA_SIG_get0", referenced from:
                __libssh2_ecdsa_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_POINT_oct2point", referenced from:
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_do_sign", referenced from:
                __libssh2_dsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_bn2bin", referenced from:
                __libssh2_dsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_curve25519_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _ecdh_sha2_nistp in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _diffie_hellman_sha_algo in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_EVP_aes_256_ctr", referenced from:
                _libssh2_crypt_method_aes256_ctr in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_PEM_read_bio_PrivateKey", referenced from:
                __libssh2_ed25519_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfile in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfilememory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_RSA_sign", referenced from:
                __libssh2_rsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_CTX_new_id", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_get0_pqg", referenced from:
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_new_raw_public_key", referenced from:
                __libssh2_ed25519_new_public in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_KEY_free", referenced from:
                _hostkey_method_ssh_ecdsa_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ecdsa_initPEM in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ecdsa_initPEMFromMemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ecdsa_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_ecdh_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_EVP_PKEY_new_raw_private_key", referenced from:
                _gen_publickey_from_ed25519_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_keygen", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_get0_key", referenced from:
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_new", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dh_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_EVP_PKEY_get_raw_private_key", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_get_raw_public_key", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ed_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_DigestInit", referenced from:
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha1_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha256_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha384_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha512_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_EVP_PKEY_CTX_free", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_des_ede3_cbc", referenced from:
                _libssh2_crypt_method_3des_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_RSA_verify", referenced from:
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_PEM_read_bio_ECPrivateKey", referenced from:
                __libssh2_ecdsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_set0_pqg", referenced from:
                __libssh2_dsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BIO_new_file", referenced from:
                __libssh2_rsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfile in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BIO_new_mem_buf", referenced from:
                __libssh2_rsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ed25519_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfilememory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_PEM_read_bio_RSAPrivateKey", referenced from:
                __libssh2_rsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_rsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_DigestSign", referenced from:
                __libssh2_ed25519_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_RSA_set0_key", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_MD_CTX_free", referenced from:
                _hostkey_method_ssh_ecdsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha1_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_EVP_Cipher", referenced from:
                __libssh2_cipher_crypt in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_num_bits", referenced from:
                __libssh2_dsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_curve25519_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _ecdh_sha2_nistp in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                _diffie_hellman_sha_algo in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_EVP_CIPHER_CTX_new", referenced from:
                __libssh2_cipher_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_DigestSignInit", referenced from:
                __libssh2_ed25519_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_CipherInit", referenced from:
                __libssh2_cipher_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ECDSA_SIG_new", referenced from:
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BIO_free", referenced from:
                __libssh2_rsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_rsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ed25519_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_ECDSA_do_verify", referenced from:
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_GROUP_get_curve_name", referenced from:
                __libssh2_ecdsa_get_curve_type in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ENGINE_load_builtin_engines", referenced from:
                __libssh2_openssl_crypto_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_KEY_new_by_curve_name", referenced from:
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_aes_192_ctr", referenced from:
                _libssh2_crypt_method_aes192_ctr in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_ECDH_compute_key", referenced from:
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_sha256", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_EVP_PKEY_keygen_init", referenced from:
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_SIG_new", referenced from:
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_OPENSSL_init_ssl", referenced from:
                std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::h6fc9fd80532f832f (.llvm.16762589108262059712) in libopenssl_sys-4f3f94cfe80e2457.rlib(openssl_sys-4f3f94cfe80e2457.openssl_sys.b4ec399a-cgu.1.rcgu.o)
                core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hda05948aa52795d5 (.llvm.16762589108262059712) in libopenssl_sys-4f3f94cfe80e2457.rlib(openssl_sys-4f3f94cfe80e2457.openssl_sys.b4ec399a-cgu.1.rcgu.o)
            "_RSA_set0_crt_params", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_SIG_set0", referenced from:
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BIO_ctrl", referenced from:
                __libssh2_pub_priv_keyfile in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfilememory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_PEM_read_bio_DSAPrivateKey", referenced from:
                __libssh2_dsa_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_free", referenced from:
                _hostkey_method_ssh_ed25519_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ed25519_initPEM in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ed25519_initPEMFromMemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_ed25519_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                __libssh2_curve25519_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ed25519_new_private in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ed25519_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_EC_KEY_get0_group", referenced from:
                __libssh2_ecdsa_get_curve_type in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_create_key in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ec_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_HMAC_Init_ex", referenced from:
                _mac_method_hmac_sha2_256_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_sha1_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_md5_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
                _mac_method_hmac_ripemd160_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_DSA_do_verify", referenced from:
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_derive_init", referenced from:
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_PKEY_get1_DSA", referenced from:
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_MD_CTX_new", referenced from:
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha1_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha256_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha384_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha512_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_RSA_new", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_div", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_value_one", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EC_POINT_new", referenced from:
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_BN_bin2bn", referenced from:
                __libssh2_rsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdh_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_curve25519_gen_k in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_EVP_PKEY_id", referenced from:
                __libssh2_ed25519_new_private_frommemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfile in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_pub_priv_keyfilememory in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_SIG_get0", referenced from:
                __libssh2_dsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ECDSA_SIG_free", referenced from:
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_RSA_size", referenced from:
                __libssh2_rsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_DigestUpdate", referenced from:
                _hostkey_method_ssh_ecdsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_curve25519_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_EVP_sha512", referenced from:
                _mac_method_hmac_sha2_512_hash in liblibssh2_sys-4774e58dbc16c6aa.rlib(mac.o)
            "_RSA_get0_factors", referenced from:
                _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_ECDSA_SIG_set0", referenced from:
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_set0_key", referenced from:
                __libssh2_dsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_get_digestbyname", referenced from:
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha1_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha256_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha384_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_sha512_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                ...
            "_DSA_new", referenced from:
                __libssh2_dsa_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_free", referenced from:
                _hostkey_method_ssh_dss_init in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_initPEM in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_initPEMFromMemory in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_dtor in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _gen_publickey_from_dsa_evp in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_dsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_DSA_SIG_free", referenced from:
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_sign in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
            "_EVP_bf_cbc", referenced from:
                _libssh2_crypt_method_blowfish_cbc in liblibssh2_sys-4774e58dbc16c6aa.rlib(crypt.o)
            "_EVP_DigestFinal", referenced from:
                _hostkey_method_ssh_ecdsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_rsa_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                _hostkey_method_ssh_dss_signv in liblibssh2_sys-4774e58dbc16c6aa.rlib(hostkey.o)
                __libssh2_rsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_dsa_sha1_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                __libssh2_ecdsa_verify in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _kex_method_curve25519_key_exchange in liblibssh2_sys-4774e58dbc16c6aa.rlib(kex.o)
                ...
            "_EC_KEY_set_public_key", referenced from:
                __libssh2_ecdsa_curve_name_with_octal_new in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
                _gen_publickey_from_ecdsa_openssh_priv_data in liblibssh2_sys-4774e58dbc16c6aa.rlib(openssl.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: failed to compile `cargo-instruments v0.4.3`, intermediate artifacts can be found at `/var/folders/x3/544s3w8s1ss34f9ly10m9c7m0000gn/T/cargo-installs6zXOW`

Caused by:
  could not compile `cargo-instruments` due to previous error

Hi, I have installed the openssl x86 version, and now when I run cargo install cargo-instruments the error is different. Hope that you can help me with this, thank you so much.

error: failed to run custom build command for `openssl-sys v0.9.66`

Caused by:
  process didn't exit successfully: `/var/folders/x3/544s3w8s1ss34f9ly10m9c7m0000gn/T/cargo-install0GI3I9/release/build/openssl-sys-fe96feda70d7880a/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_LIB_DIR
  X86_64_APPLE_DARWIN_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR
  X86_64_APPLE_DARWIN_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_APPLE_DARWIN_OPENSSL_DIR
  X86_64_APPLE_DARWIN_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

  --- stderr
  thread 'main' panicked at '

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-apple-darwin
  $TARGET = x86_64-apple-darwin
  openssl-sys = 0.9.66

  ', /Users/hungkhoaitay/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.66/build/find_normal.rs:174:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-instruments v0.4.3`, intermediate artifacts can be found at `/var/folders/x3/544s3w8s1ss34f9ly10m9c7m0000gn/T/cargo-install0GI3I9`

Caused by:
  build failed
  $HOST = x86_64-apple-darwin
  $TARGET = x86_64-apple-darwin

Cargo is trying to build for x86, but you're on an M1?

I might uninstall cargo/rustc and reinstall via http://rustup.rs.
It's also possible that your homebrew is built for x86, and is being used via rosetta, apple's translation layer?

if you do brew config does it say 'Rosetta 2: true' at the bottom?

My main guess of the problem is that cargo is trying to build for x86, and I'm not sure why that would be.

Thank you @cmyr I tried to install cargo instruments again using brew version x86 (with Rosetta 2) and it works 💯
Thank you so much again