Skip to content
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

Where does cargo put shared libraries? #3660

Closed
matthiasbeyer opened this issue Feb 7, 2017 · 7 comments
Closed

Where does cargo put shared libraries? #3660

matthiasbeyer opened this issue Feb 7, 2017 · 7 comments

Comments

@matthiasbeyer
Copy link
Contributor

matthiasbeyer commented Feb 7, 2017

So we had kind of a situation over at imag.

What happened

We had this PR https://github.com/matthiasbeyer/imag/pull/871 for introducing Ruby bindings for imag (using the awesome ruru crate), which are build with the thermite Ruby gem helper, which packs .sos into a gem. As you can see, the PR 871 succeeded on travis, so I merged it.

Master was broken instantly, because thermite couldn't find the liblibimagruby.so anymore (which it could find on PR 871).

So I opened https://github.com/matthiasbeyer/imag/pull/894 to revert the whole thing and merged it as soon as travis succeeded.

Then I opened https://github.com/matthiasbeyer/imag/pull/895, cherry-picked each commit from the initial https://github.com/matthiasbeyer/imag/pull/871 and pushed it. Travis failed again.

What I can see

We build against Rust 1.13, Beta and Stable. All have to succeed to get a CI-OK.

The table below shows the rustc/cargo versions for the specific builds. The failing builds (stable) use the same cargo and rustc as the succeeding build from the PR 871.

PR travsi-jobset build rustc cargo status
871 198740111 1.13 rustc 1.13.0 (2c6933acc 2016-11-07) cargo 0.13.0-nightly (eca9e15 2016-11-01) succeeded
871 198740111 Beta rustc 1.16.0-beta.1 (5276ba72e 2017-01-31) cargo-0.17.0-nightly (dfc0f95 2017-02-01) succeeded
871 198740111 Stable rustc 1.15.0 (10893a9a3 2017-01-19) cargo 0.16.0-nightly (6e0c18c 2017-01-27) succeeded
master 198837920 1.13 rustc 1.13.0 (2c6933acc 2016-11-07) cargo 0.13.0-nightly (eca9e15 2016-11-01) succeeded
master 198837920 Beta rustc 1.16.0-beta.1 (5276ba72e 2017-01-31) cargo-0.17.0-nightly (dfc0f95 2017-02-01) succeeded
master 198837920 Stable rustc 1.15.0 (10893a9a3 2017-01-19) cargo 0.16.0-nightly (6e0c18c 2017-01-27) failed
895 198869296 1.13 rustc 1.13.0 (2c6933acc 2016-11-07) cargo 0.13.0-nightly (eca9e15 2016-11-01) succeeded
895 198869296 Beta rustc 1.16.0-beta.1 (5276ba72e 2017-01-31) cargo-0.17.0-nightly (dfc0f95 2017-02-01) succeeded
895 198869296 Stable rustc 1.15.0 (10893a9a3 2017-01-19) cargo 0.16.0-nightly (6e0c18c 2017-01-27) failed

The failed PRs fail because thermite cannot find the liblibimagruby.so.

As you can see, it seems to have failed out of nowhere. There were no other PRs merged during these merges.

I reproduced the error on a VM using

cargo 0.17.0
rustc 1.16.0-nightly

The liblibimagruby.so lives in /target/debug/deps/liblibimagruby.so, but is expected to be in /target/debug/liblibimagruby.so.

Can someone help me investigate?
(Notice: Workspaces involved!)

How to reproduce

I'm not sure. I guess it would be enough to call bundle install --path vendor/bundle in /libimagruby and then make lib-imag-ruby-test in the root directory of the project. (We use make to automate cargo calls and also because we have to call bundle exec rake thermite:tarball in between).


(I do not test this on my local machine because I use distro-package rustc/cargo and I'm still on 1.14, where everything works fine as far as I can see)

@alexcrichton
Copy link
Member

I think this may have been a bug in Cargo fixed in #3478, which may be why beta's working but stable isn't?

@matthiasbeyer
Copy link
Contributor Author

@alexcrichton but why did it work on the initial PR then?

@alexcrichton
Copy link
Member

Beats me!

@matthiasbeyer
Copy link
Contributor Author

matthiasbeyer commented Feb 8, 2017

I just reproduced locally with

rustc 1.15.0
cargo 0.16.0

shipped by my distro.

CC @malept

@alexcrichton
Copy link
Member

Yes the bug is in rustc 1.15, but rustc 1.16+ should come with a Cargo that has this fixed

@matthiasbeyer
Copy link
Contributor Author

😞 bugs in cargo. Anyways, 👍 for looking into it, thanks a lot!

So I guess I have to wait until 1.16 with releasing the next version.

@alexcrichton
Copy link
Member

Ok, thanks for checking! In that case I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants