rs-ipfs / rust-ipfs

The InterPlanetary File System (IPFS), implemented in Rust.
Apache License 2.0
1.27k stars 165 forks source link

Partial builds on CI cross targets #96

Open koivunej opened 4 years ago

koivunej commented 4 years ago

During #95 I excluded building rust-http-ipfs on cross targets (incl. android). Fixing this probably isn't anything else than to find/add the prebuilt openssl-sys friendly packages for the cross targets. Could also be that the env variable just needed to be set, as mentioned by openssl-sys build script.

See https://github.com/ipfs-rust/rust-ipfs/runs/503319261 where the android builds failed and macos cross builds were not actually run because I fumbled --target xyz away from the build command by mistake.

The logs are not loading as of writing this so hopefully they'll work later on.

ifkb99 commented 4 years ago

From what I can see, the issue seems to lie in these lines of the android build log:

204 OPENSSL_DIR unset
205 run pkg_config fail: "Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override

I am a bit of a noob when it comes to config, so I will need a bit of guidance. Would I simply be setting environment variables to the openssl binary and setting the cross-compilation flag to true, or is it a bit more complicated than that?

aphelionz commented 4 years ago

Welcome @ifkb99! Great to see you. I'd suggest trying out your instincts here and seeing how far that gets you. They sound correct, as that would be the first thing I'd try.

ifkb99 commented 4 years ago

Thanks for the warm welcome!

I am looking to add the line OPENSSL_DIR: /usr/bin/openssl to ci.yml, but when looking at your other filepaths I see that most files are stored in /usr/local/. Is there some way I can explore the host machine to see where files are stored?

koivunej commented 4 years ago

Welcome from me as well!

Is there some way I can explore the host machine to see where files are stored?

I don't think any kind of exploration access is available. The system doing the cross compilation should be quite the usual boring ubuntu though. Could be that the issue is nothing more than the env variable you mentioned to 1.

You should be able to try this if you just fork the repo, add the env variable and create a pull request. If you don't want to do a work in progress PR you can adjust the first section of .github/workflows/ci.yml to run on all pushed branches to get a CI run on your forked repo.

aphelionz commented 4 years ago

You could also try /usr/bin/env openssl

Edit: or $(which openssl)