21 Oct 2024 |
aleksana (force me to bed after 18:00 UTC) | Redacted or Malformed Event | 14:58:16 |
Alyssa Ross | What went wrong when you tried? Build failure on runtime? | 14:58:39 |
aleksana (force me to bed after 18:00 UTC) | In reply to @aleksana:mozilla.org https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#staging https://github.com/NixOS/nixpkgs/pull/350258 | 14:58:42 |
Tethys Svensson | From the gas README:
`--enable-targets=...'
This causes one or more specified configurations to be added to those for
which BFD support is compiled. Currently gas cannot use any format other
than its compiled-in default, so this option is not very useful.
| 14:59:29 |
Alyssa Ross | Aha, okay. | 15:00:09 |
Alyssa Ross | So is gas the only thing we'd need multiple packages for? | 15:01:47 |
Alyssa Ross | Not the rest of binutils? | 15:01:57 |
Tethys Svensson | Possibly yes. Pwntools uses other tools like objcopy and objdump. I don't remember if those specific tools works with multiple architectures or not | 15:02:29 |
Tethys Svensson | I think they only hacked in multi-architecture support for what they considered most important, but I'm not sure | 15:02:43 |
Alyssa Ross | Would you mind checking which parts we actually need? This might be easier if we don't need whole binutils packages for all of these. | 15:03:11 |
Alyssa Ross | but I will continue cleaning up binutils in the meantime in case we end up doing full binutils :) | 15:03:45 |
Tethys Svensson | I think it might be possible to use a unified objdump and objcopy, but it would require patches to pwntools. I'll research how feasible it would be in practice | 15:04:19 |
Alyssa Ross | Thanks! | 15:04:25 |
Tethys Svensson | The tools pwntools requires where they try do to multi-architecture stuff are: as, cpp, ld, objcopy, objdump, readelf, strip. So we would definitely not need to compile more than those | 15:09:10 |
Alyssa Ross | I'm already liking that gold isn't in there | 15:10:11 |
emily | (nothing makes me feel older than thinking of gold as the shiny new linker when it's now apparently dead) | 15:11:06 |
Tethys Svensson | Ah, the cpp only requires a target-specific version when running on windows. So that one is easy | 15:20:53 |
| bew joined the room. | 15:24:52 |
Tethys Svensson | So it requires:
as from the gas sub-directory
objcopy , objdump , readelf and strip from the binutils sub-directory
ld from the ld sub-directory
It appears that everything from the binutils and ld subdirectories are actually multi-arch aware. Whether they work correctly and whether pwntools can be fixed to use the multi-arch versions when available is another questions.
| 15:25:10 |
bew | Hello o/ I'm trying to add a pkg in nixpkgs, I added the file pkgs/by-name/pi/pik/package.nix that outputs a derivation, but nix build .#pik says the attr doesn't exist, what am I missing? 🤔 | 15:26:27 |
| * Alyssa Ross In reply to @luckytethys:matrix.org
So it requires:
as from the gas sub-directory
objcopy , objdump , readelf and strip from the binutils sub-directory
ld from the ld sub-directory
It appears that everything from the binutils and ld subdirectories are actually multi-arch aware. Whether they work correctly and whether pwntools can be fixed to use the multi-arch versions when available is another questions.
nods | 15:28:07 |
emily | multi-arch ld should work (IIRC that's what Xen wants) | 15:29:43 |
bew | In reply to @bew:matrix.org Hello o/ I'm trying to add a pkg in nixpkgs, I added the file pkgs/by-name/pi/pik/package.nix that outputs a derivation, but nix build .#pik says the attr doesn't exist, what am I missing? 🤔 nevermind, forgot to git add -N .... | 15:30:50 |
nevivurn | In reply to @bew:matrix.org Hello o/ I'm trying to add a pkg in nixpkgs, I added the file pkgs/by-name/pi/pik/package.nix that outputs a derivation, but nix build .#pik says the attr doesn't exist, what am I missing? 🤔 Did you git add the new package.nix? Or you can do nix-build -A pik . at the git root, to avoid copying nixpkgs into your store every time. | 15:31:01 |
夜坂雅 | In reply to @bew:matrix.org nevermind, forgot to git add -N .... -N 🤔 | 15:31:10 |
emily | Alyssa Ross: was the review request of Ericson2314 and lovesegfault after the approvals on the VC4 PR intentional or just GitHub stuff? | 15:31:56 |
emily | (don't want to merge prematurely if it was intended) | 15:32:01 |
Tethys Svensson | Alyssa Ross: If you want I can try to see if I can add support for using those multi-arch-aware versions in upstream pwntools -- but honestly the code is already pretty convoluted and I am having a bit of a hard time making heads or tails in it.
I don't know exactly what flags I would need to add to e.g. get the multi-arch-aware objcopy to work with pwntools, and whether those options also be compatible with the non-multi-arch version.
| 15:32:17 |
bew | In reply to @shadowrz:nixos.dev -N 🤔 it's for --intend-to-add , to add the file to be git-tracked, but do not stage anything yet | 15:32:49 |
jh-devv 🏳️⚧️ | What is the simplest way to make an derivation that just
fetches an git repo
runs an patch script in the repo
copies all of the files to output
| 15:32:49 |