<div dir="ltr">Hi all, <div><br></div><div>on sunday during "port update outdated" rust was going to be installed as a dependency in order to update youtube-dl. </div><div><br></div><div>I'm running macOS 11.2.3 on an Apple M1 Chip with macports 2.6.4 installed and all updates/upgrades installed. The package that got fetched for building rust is:</div><div>rust-1.51.0_1.darwin_20.arm64.tbz2</div><div><br></div><div>This package builds just fine but breaks during the staging into destroot process.</div><div><br></div><div>I did a sudo port clean rust (and a port clean rust), tried to install only rust, but the error remains. It occurs in the rls module but its origin seems to be during "compiling openssl-sys v0.9.58" . This compiling starts to fail when the following message occurs:<br><br></div><div>:info:destroot   = note: Undefined symbols for architecture arm64: </div><div><br></div><div>The whole message leading to the error is as follows:</div><div>:info:destroot   = note: Undefined symbols for architecture arm64:<br>:info:destroot             "_RSA_get0_factors", referenced from:<br>:info:destroot                 _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_MD_CTX_new", referenced from:<br>:info:destroot                 __libssh2_rsa_sha1_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_dsa_sha1_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_ecdsa_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_sha1_init in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_sha256_init in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_sha384_init in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_sha512_init in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 ...<br>:info:destroot             "_DSA_get0_key", referenced from:<br>:info:destroot                 _gen_publickey_from_dsa_evp in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_PKEY_get_raw_public_key", referenced from:<br>:info:destroot                 _gen_publickey_from_ed_evp in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_PKEY_new_raw_private_key", referenced from:<br>:info:destroot                 __libssh2_curve25519_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 _gen_publickey_from_ed25519_openssh_priv_data in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_curve25519_gen_k in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_DigestSign", referenced from:<br>:info:destroot                 __libssh2_ed25519_sign in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_HMAC_CTX_new", referenced from:<br>:info:destroot                 _mac_method_hmac_sha2_256_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_sha2_512_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_sha1_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_md5_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_ripemd160_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot             "_DSA_get0_pqg", referenced from:<br>:info:destroot                 _gen_publickey_from_dsa_evp in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_PKEY_new_raw_public_key", referenced from:<br>:info:destroot                 __libssh2_ed25519_new_public in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_curve25519_gen_k in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_ASN1_STRING_get0_data", referenced from:<br>:info:destroot                 __libssh2_curve25519_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_DSA_SIG_set0", referenced from:<br>:info:destroot                 __libssh2_dsa_sha1_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_ECDSA_SIG_set0", referenced from:<br>:info:destroot                 __libssh2_ecdsa_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_DSA_set0_key", referenced from:<br>:info:destroot                 __libssh2_dsa_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_RSA_get0_key", referenced from:<br>:info:destroot                 _gen_publickey_from_rsa_evp in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_DSA_SIG_get0", referenced from:<br>:info:destroot                 __libssh2_dsa_sha1_sign in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_RSA_set0_factors", referenced from:<br>:info:destroot                 __libssh2_rsa_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_DSA_set0_pqg", referenced from:<br>:info:destroot                 __libssh2_dsa_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_RSA_set0_key", referenced from:<br>:info:destroot                 __libssh2_rsa_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_EVP_MD_CTX_free", referenced from:<br>:info:destroot                 _hostkey_method_ssh_ecdsa_signv in liblibssh2_sys-d8bd449a6de14817.rlib(hostkey.o)<br>:info:destroot                 _hostkey_method_ssh_rsa_signv in liblibssh2_sys-d8bd449a6de14817.rlib(hostkey.o)<br>:info:destroot                 _hostkey_method_ssh_dss_signv in liblibssh2_sys-d8bd449a6de14817.rlib(hostkey.o)<br>:info:destroot                 __libssh2_rsa_sha1_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_dsa_sha1_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_ecdsa_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 __libssh2_sha1_init in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 ...<br>:info:destroot             "_EVP_DigestVerify", referenced from:<br>:info:destroot                 __libssh2_ed25519_verify in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_RSA_set0_crt_params", referenced from:<br>:info:destroot                 __libssh2_rsa_new in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot                 _gen_publickey_from_rsa_openssh_priv_data in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_HMAC_CTX_free", referenced from:<br>:info:destroot                 _mac_method_hmac_sha2_256_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_sha2_512_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_sha1_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_md5_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot                 _mac_method_hmac_ripemd160_hash in liblibssh2_sys-d8bd449a6de14817.rlib(mac.o)<br>:info:destroot             "_ECDSA_SIG_get0", referenced from:<br>:info:destroot                 __libssh2_ecdsa_sign in liblibssh2_sys-d8bd449a6de14817.rlib(openssl.o)<br>:info:destroot             "_OPENSSL_init_ssl", referenced from:<br>:info:destroot                 std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::he3a9a3cc564b3e3b (.llvm.12220356317319455937) in libopenssl_sys-eed96dc20e14aca3.rlib(openssl_sys-eed96dc20e14aca3.openssl_sys.dk3paske-cgu.0.rcgu.o)<br>:info:destroot                 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h474227a3917c4328 (.llvm.12220356317319455937) in libopenssl_sys-eed96dc20e14aca3.rlib(openssl_sys-eed96dc20e14aca3.openssl_sys.dk3paske-cgu.0.rcgu.o)<br>:info:destroot           ld: symbol(s) not found for architecture arm64<br>:info:destroot           clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>:info:destroot           <br>:info:destroot error: aborting due to previous error<br>:info:destroot Did not run successfully: exit code: 1<br></div><div><br></div><div>While the final error in rls is:</div><div>:info:destroot -------------<br>:info:destroot error: could not compile `rls`<br>:info:destroot To learn more, run the command again with --verbose.<br>:info:destroot command did not execute successfully: "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/build/stage0-aarch64/bin/cargo" "build" "--target" "aarch64-apple-darwin" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--frozen" "--manifest-path" "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/src/tools/rls/Cargo.toml" "--features" "clippy" "--message-format" "json-render-diagnostics"<br>:info:destroot expected success, got: exit code: 101<br>:info:destroot       < ToolBuild { compiler: Compiler { stage: 2, host: TargetSelection { triple: "aarch64-apple-darwin", file: None } }, target: TargetSelection { triple: "aarch64-apple-darwin", file: None }, tool: "rls", path: "src/tools/rls", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: ["clippy"] }<br>:info:destroot     < Rls { compiler: Compiler { stage: 2, host: TargetSelection { triple: "aarch64-apple-darwin", file: None } }, target: TargetSelection { triple: "aarch64-apple-darwin", file: None }, extra_features: [] }<br>:info:destroot thread 'main' panicked at 'Unable to build RLS', src/bootstrap/dist.rs:44:9<br>:info:destroot note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace<br>:info:destroot Traceback (most recent call last):<br>:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1140, in <module><br>:info:destroot     main()<br>:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1123, in main<br>:info:destroot     bootstrap(help_triggered)<br>:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1109, in bootstrap<br>:info:destroot     run(args, env=env, verbose=build.verbose)<br>:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 153, in run<br>:info:destroot     raise RuntimeError(err)<br>:info:destroot RuntimeError: failed to run: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src/build/bootstrap/debug/bootstrap install -v<br>:info:destroot make: *** [install] Error 1<br>:info:destroot make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src'<br>:info:destroot Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.51.0-src" && /usr/bin/make -w install VERBOSE=1 DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/destroot <br>:info:destroot Exit code: 2<br>:error:destroot Failed to destroot rust: command execution failed<br>:debug:destroot Error code: CHILDSTATUS 84222 2<br>:debug:destroot Backtrace: command execution failed<br>:debug:destroot     while executing<br>:debug:destroot "system {*}$notty {*}$nice $fullcmdstring"<br>:debug:destroot     invoked from within<br>:debug:destroot "command_exec destroot"<br>:debug:destroot     (procedure "portdestroot::destroot_main" line 2)<br>:debug:destroot     invoked from within<br>:debug:destroot "$procedure $targetname"<br></div><div><br></div><div>Could it be that openssl-sys (<a href="https://github.com/sfackler/rust-openssl/tree/master/openssl-sys">https://github.com/sfackler/rust-openssl/tree/master/openssl-sys</a>) doesn't compile on arm64 yet or not in the context of building rust 1.51.0 on arm64?</div><div><br></div><div>I found this issue <a href="https://trac.macports.org/ticket/62252">https://trac.macports.org/ticket/62252</a> but I'm not quite sure if my problem is related to it and if I should reopen it or file a new one. </div><div><br></div><div><div>rust 1.50.x_x. too failed the first time but a sudo clean rust helped in that case. </div><div></div></div><div><br></div><div>It seems as more and more of my outdated ports rely on rust, so I hope that this gets fixed soon. </div><div><br></div><div>At the moment I try a clean build of rust and see what happens. I will save the main.log. If needed I can provide a man.log from the above failed build.</div><div><br></div><div>Kind regards, </div><div>Eric Hoch</div><div><br></div><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Eric Hoch<br>mailto: <a href="mailto:eric.hoch2@gmail.com" target="_blank">eric.hoch2@gmail.com</a></div></div></div>