Nix Hackers | 899 Members | |
| For people hacking on the Nix package manager itself | 188 Servers |
| Sender | Message | Time |
|---|---|---|
| 22 Jun 2021 | ||
| And some things are pretty mysterious...
I don't understand how the | 23:58:22 | |
| 23 Jun 2021 | ||
In reply to @pamplemouss_:matrix.orgnot familiar with building nix, but it looks it's fairly abstracted :) the individual local.mk files scattered through the source get iteratively processed at https://github.com/NixOS/nix/blob/master/mk/lib.mk#L96 and then instantiated a few lines later | 03:13:13 | |
| not certain if that answers the question | 03:13:28 | |
| Yeah, I more or less figured that. What I am confused about is that as per mk/libraries.mk, it seems that the libraries libnix*.so are built in their respective src/lib*/, and only moved to outputs/out/ (or whatever is in --prefix) when make install (mk/lib.mk using "functions" declared in mk/install.mk).I don't get how the final binary is linked agains't it before they are installed π | 03:19:19 | |
pamplemousse as far as I understand, the link logic is actually duplicated: make will build everything in place (and src/nix/nix will use the libs built in-tree), while make install will directly link things at their final location, and set the rpath to this location (here) | 05:17:47 | |
So running make and make install will actually result in two different builds of the .so files | 05:19:09 | |
| 06:52:53 | ||
| Any chance of getting https://github.com/NixOS/nix/pull/4873 in? | 15:38:50 | |
I didn't think about the rpathπ€¦ββοΈ | 16:01:53 | |
In reply to @theophane:hufschmitt.netDo you mean that the .so will be compiled twice? | 16:03:00 | |
In reply to @pamplemouss_:matrix.orgI think so, yes | 16:53:59 | |
(I mean, if you just run make install then the in-tree so wonβt be compiled, but if you run both, then they will be compiled twice) | 16:54:33 | |
| π€ ... I thought they were only compiled on make, and mved on make install.Rest is rpath doing its job at run-time, and being set to the proper destination on make install... | 16:55:24 | |
| I guess --trace would disambiguate, if it's digestible | 18:39:02 | |
--just-print | 18:41:49 | |
| does not even run the commands :) | 18:42:11 | |
| 19:13:32 | ||
| 24 Jun 2021 | ||
There is basically no reason anymore to run make, just use make install. This is because the tests require an installed package. | 11:02:22 | |
| Should this be reflected in https://hydra.nixos.org/build/144378897/download/2/manual/contributing/hacking.html ? | 15:31:28 | |
| And also:
| 15:40:26 | |
| * And also:
I wonder if my use case is not one such reason... | 15:40:34 | |
In reply to @pamplemouss_:matrix.orgIβd rather make a fully different build with different configure flags for that. That would make things more robust | 18:25:45 | |
| 25 Jun 2021 | ||
| 13:59:29 | ||
| niksnut: is there anything else tbd for https://github.com/NixOS/nix/pull/4770 ? %) | 21:32:42 | |
| 22:06:01 | ||
| 26 Jun 2021 | ||
| 01:26:17 | ||
| 01:26:17 | ||
| 01:26:27 | ||
| 27 Jun 2021 | ||
| 05:02:55 | ||
| 30 Jun 2021 | ||
| 10:54:08 | ||