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
openssl-sys can't find openssl@3 only when run remotely crosscompiling x86_64 on arm64 #2229
Comments
Homebrew does not install a version of OpenSSL built for iOS. |
I am not familiar enough with how the x86_64 iOS emulator target works to know if it shouldn't be working at all, but I am totally unsurprised that it wouldn't work. We probably shouldn't even be looking for homebrew when not targeting macOS tbh. |
It seems like there's been a major miscommunication between another engineer and I as we've been working on this. Will need to straighten things out with them first, will report back here if there's still an issue. Thanks for your response! |
Ok, I've cleared up that it's not OpenSSL, I've removed brew-installed OpenSSLs and get the same error. The issue is specifically with cross-compiling for x86_64 on an ARM machine in a remote scripted setting. My guess there is some dependency missing from the PATH in the Ansible environment that is preventing this from running correctly there, since the cross-compilation works fine when I build manually. What could be missing here? |
I just tried to run this on an x86_64 Mac - ie no longer cross-compiling - and have encountered the same exact error:
|
Where is the OpenSSL it's using coming from? |
this is the only openssl installed on the x86_64 system:
and on arm64:
|
You're going to need a version of OpenSSL built for your target. This can be done for you by enabling the |
I'll try adding the vendored flag and see if I make any progress. Can you think of any reasons why it would work when run as a human user, but not via Ansible/python wrapper? I didn't see any obvious env var differences. |
The only differences would be in the overall environment (env vars, things that are installed, etc). |
Thanks. I'm not able to reproduce the error when running manually when setting Path variables to be the same, and dependencies that I'm aware of seem to be available in both environments. I'm back to thinking this is an Ansible issue, so I'll do some more digging and will report back if needed. |
Staring at the error message you're getting, it looks like you have a valid version of OpenSSL, but it can't find the "_opendir$INODE64" or "_readdir$INODE64" which I'd expect to find in libc (libSystem? I don't know macOS). I suspect you're missing something libc related, although I'd expect those symbols to be dynamically linked so I'm not entirely sure what's up. |
Reporting back - seems like the issue is something is setting |
I'm cross-compiling iOS x86_64 on Mac M1 with OpenSSL@3.
The command works as expected when executed manually, but if I try to execute the build remotely via Ansible, I get a linking error.
How can I further troubleshoot this issue?
Using:
The text was updated successfully, but these errors were encountered: