kata-irc-bot | <wmoschet> Hi people! looking for one more review on https://github.com/kata-containers/tests/pull/3133 | 03:04 |
---|---|---|
kata-irc-bot | <wmoschet> @fidencio on src/agent/Cargo.toml you can change the rustc edition and on versions.yml the language IIUC | 03:06 |
*** jodh has joined #kata-dev | 07:38 | |
*** dklyle has quit IRC | 07:51 | |
*** fgiudici has joined #kata-dev | 08:03 | |
*** amorenoz has joined #kata-dev | 08:03 | |
*** amorenoz_ has joined #kata-dev | 08:22 | |
*** amorenoz has quit IRC | 08:24 | |
*** sameo has joined #kata-dev | 08:35 | |
*** sgarzare has joined #kata-dev | 08:58 | |
kata-irc-bot | <fidencio> @jakob.naucke, about checking the dependencies ... :thread: | 10:06 |
kata-irc-bot | <fidencio> I'd be interested in the output (and it'll be long) when you pass `-vv` to cargo build | 10:07 |
kata-irc-bot | <jakob.naucke> Okay, I already posted the last line of that, but I can give you the whole thing | 10:07 |
kata-irc-bot | <fidencio> Also, doing `cargo vendor` , and then looking for what from the deps would have a `#[link(name = "c")]` line (or similar) is what made us get to prctl being the root cause of the issue | 10:08 |
kata-irc-bot | <fidencio> Interestingly enough it doesn't fail, right? | 10:09 |
kata-irc-bot | <jakob.naucke> No, it doesn't. It's just that it still has those four objects. Yeah, I don't understand why the previous combination of static and dynamic failed but this (apparent) mix and match doesn't. | 10:11 |
kata-irc-bot | <fidencio> Does it change something if you pass `-Z build-std` to `cargo build` ? `-Z ...` is only supported when using nightly, AFAIU. | 10:16 |
kata-irc-bot | <jakob.naucke> Here's the verbose output of a standard build with your patches. (Note: The repository overrides are to pull in my fix here) | 10:23 |
kata-irc-bot | <jakob.naucke> I'm not getting any sort of `link` output from `cargo vendor` (even with very verbose). Do I need some extra flag? | 10:26 |
*** pmores has joined #kata-dev | 10:29 | |
kata-irc-bot | <jakob.naucke> unfortunately, Rust Nightly (and Beta) binaries are broken on s390x, see my issue here. And you do need Nightly for `-Z`. Let me check if I can use `-Z` with a self-compiled build (those still work) | 10:29 |
kata-irc-bot | <fidencio> Ouch! | 10:30 |
kata-irc-bot | <jakob.naucke> ikr | 10:31 |
kata-irc-bot | <fidencio> I'd suggest passing `-Z print-link-args` to `cargo build` ... but now I know ... | 10:31 |
kata-irc-bot | <jakob.naucke> • After failed experiments with a self-built Rust and a download of the CI output, I found rustup can use outdated nightlies, so I'm now on Nightly as of 2020-10-08 (1.49) • That one is, unfortunately, not aware of `-Z print-link-args`. If you think that it would make things a lot clearer, I can try getting that to work. • Build with `-Z build-std` is running • Side note to the output above: Some deps are compiled with `-C | 11:03 |
kata-irc-bot | prefer-dynamic` which may or may not have something to do with the dynamically linked result | 11:03 |
kata-irc-bot | <jakob.naucke> Oh. I believe `-Z print-link-args` is a `rustc` flag, not a `cargo` flag. Wait. | 11:08 |
kata-irc-bot | <jakob.naucke> In the meantime, here's the output with `build-std`. `ldd` output was unchanged. | 11:14 |
kata-irc-bot | <fidencio> > Oh. I believe `-Z print-link-args` is a `rustc` flag, not a `cargo` flag. Wait. Yep, it's a rustc argument. | 11:29 |
kata-irc-bot | <jakob.naucke> Ah. I had misunderstood you that there should be `#link(name = "c"` output from `cargo vendor`. Of course there wasn't, but there is vendored code that has that, and it's here in rust-lang/libc (incidentally (or maybe not incidentally) I recently had a PR there (see above)). However, from glancing over it, I can't see what would be specific to s390x there. | 11:31 |
kata-irc-bot | <jakob.naucke> Here's the output with `print-link-args`. Interestingly, `-lutil` is marked `-Bdynamic`. | 11:35 |
kata-irc-bot | <jakob.naucke> however, this is on sparc/sparc64/aarch64/s390x/powerpc64/mips64 but not on x86 that might be it | 11:41 |
kata-irc-bot | <fidencio> Yep, that looks like it, indeed! | 11:43 |
kata-irc-bot | <fidencio> Thanks to the whole effort debugging with Eduard-Mihai Yesterday it's now more straightforward to figure out where the non-static is coming from. | 11:45 |
kata-irc-bot | <jakob.naucke> Most of those came in here. Let me check how crucial they are. | 11:47 |
*** fuentess has joined #kata-dev | 13:53 | |
kata-irc-bot | <jakob.naucke> Alright. - When removing that line from libc, I get a statically linked executable. Hooray! - As for whether it is a good idea to remove this in libc, I would love to know when exactly a use leads to dynamically linked executables to be able to show an MWE in discussion. A program that simply uses e.g. `libc::getcontext` gives me a statically linked binary when compiling with the appropriate flags on s390x. FWIW the tests are still | 14:24 |
kata-irc-bot | passing with that line removed. - I've been playing with the statically linked agent a bit because I was suspecting libc mismatches to be the root cause of #675. It fixes some scenarios (so I wasn't entirely wrong?) but breaks scenarios that work with a dynamically linked agent. I hope to resolve this, but whatever the case may be: @fidencio How about leaving the option to get a dynamically linked agent? (in the same way that musl is the default, | 14:24 |
kata-irc-bot | but you can go GNU if you want to) | 14:24 |
kata-irc-bot | <fidencio> @jakob.naucke, that works for me. Another option would be to enforce *non* static linkage for all the arches apart from the ones we actually can ensure statically linking against glibc works. | 14:27 |
kata-irc-bot | <fidencio> Then, whenever all the arches support static + glibc we could add an option so people could choose. But till we reach this point, maybe it'll be better to enforce static on x86_64 and dynamic on the others | 14:28 |
kata-irc-bot | <fidencio> WDYT? | 14:28 |
kata-irc-bot | <jakob.naucke> Sounds reasonable – the other architectures would have to be tested still, even though I'd assume similar issues as on s390x. Do you have an idea how I could track down the exact call that leads to this? | 14:31 |
kata-irc-bot | <fidencio> No, my whole experience with rust comes from the moment I opened that issue and replied to you till now. So, for sure I'm not the best person to ask. I'd suggest opening an issue for s390x, specifically, to track the work (and the issues) down and we can try to drag more experienced rust developers there. | 14:36 |
kata-irc-bot | <jakob.naucke> Do you mean in Kata or in libc? | 14:37 |
kata-irc-bot | <fidencio> Well, both. :slightly_smiling_face: Kata in order to track down why we only use `-C target-feature=+crt-static` for x86_64, and one in libc so we can point people to, as I don't think you'll be the only one hitting that. Does this sound reasonable? | 14:43 |
kata-irc-bot | <jakob.naucke> Sure! | 14:51 |
*** Yarboa has quit IRC | 15:01 | |
*** Yarboa has joined #kata-dev | 15:01 | |
*** pcaruana has quit IRC | 15:13 | |
*** pcaruana has joined #kata-dev | 15:13 | |
*** dklyle has joined #kata-dev | 15:49 | |
kata-irc-bot | <eric.ernst> happy friday kata-folk! | 16:04 |
*** fuentess has quit IRC | 16:19 | |
*** fuentess has joined #kata-dev | 16:19 | |
*** sgarzare has quit IRC | 17:41 | |
*** jodh has quit IRC | 18:03 | |
*** fgiudici has quit IRC | 18:21 | |
*** fuentess has quit IRC | 18:59 | |
*** Yarboa has quit IRC | 19:10 | |
*** Yarboa has joined #kata-dev | 19:12 | |
*** Yarboa has quit IRC | 19:30 | |
*** Yarboa has joined #kata-dev | 19:32 | |
*** pmores has quit IRC | 19:38 | |
*** Yarboa has quit IRC | 20:00 | |
*** Yarboa has joined #kata-dev | 20:12 | |
*** Yarboa has quit IRC | 20:30 | |
*** Yarboa has joined #kata-dev | 20:31 | |
*** Yarboa has quit IRC | 23:20 | |
*** sameo has quit IRC | 23:30 | |
*** Yarboa has joined #kata-dev | 23:32 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!