error: manifest path `/github/workspace/Cargo.toml` is a virtual manifest, but this command requires running against an actual package in this workspace
I do have a Workspace-based project and indeed there is no [package] at the top level, making it a virtual manifest, but I think this error is nonsensical, because from the command line cargo build (along with run, test, etc.) works just fine.
I'm using the latest release of Rust.
I think there may be another problem anyway: The list of supported targets
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.
Using ubuntu for the worker, it's unable to find OpenSSL artifacts even though it installs them. Error:
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.
I run this before cargo build:
- name: Install Build Dependencies
run: sudo apt-get update && sudo apt-get install pkg-config libssl-dev gcc && openssl version -d && ls /usr/include/openssl && ls /usr/lib/ssl
The install output even shows the SSL dir set properly:
0 upgraded, 0 newly installed, 0 to remove and 65 not upgraded.
OPENSSLDIR: "/usr/lib/ssl"
this only installed the library for the host, you need them for the target archtecture. you can enable the vendored feature of the openssl crate, which should build libssl from source.
Can you explain a bit more? Installing for the build host is what I was trying to do - the build needs the lib. Yes, the target needs it to for running - and it's there (on the EC2 VMs).
I can build & run the app on the EC2 VM now and it works fine.
So I don't see why vendored is necessary or would even help. The build needs the header files.
you not only need it for running, ut also need the library for linking.
building from the vendored source code is the simplest way to make it work.
if you don't want that, you can try to install the package for the correct archtecture, I believe the ubuntu distro does provide arm64 packages, but you'll have to check the manual to learn how to install them on an x86-64 host, I only know very basic apt commands.