Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Partial builds on CI cross targets #96

Open
koivunej opened this issue Mar 12, 2020 · 5 comments
Open

Partial builds on CI cross targets #96

koivunej opened this issue Mar 12, 2020 · 5 comments

Comments

@koivunej
Copy link
Collaborator

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
Copy link

ifkb99 commented Mar 19, 2020

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
Copy link
Contributor

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
Copy link

ifkb99 commented Mar 19, 2020

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
Copy link
Collaborator Author

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
Copy link
Contributor

aphelionz commented Mar 22, 2020

You could also try /usr/bin/env openssl

Edit: or $(which openssl)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants