Nixpkgs Stdenv | 230 Members | |
| 75 Servers |
| Sender | Message | Time |
|---|---|---|
| 11 Oct 2023 | ||
| 02:25:33 | ||
Hello, any hint how to avoid autotools dependencies when I need to patch ./configure? I created patch for configure along with the one for configure.ac. Configure phase is OK, but when build phase starts, it wants aclocal and I can't see why. | 08:33:40 | |
In reply to @vcunat:matrix.orgI don't know what they use to detect changes but maybe just try touching both files? | 09:03:23 | |
In reply to @vcunat:matrix.org* I don't know what they use to detect changes but maybe just try touching both files in postPatch? | 09:03:36 | |
| I did try that. | 09:03:43 | |
But in the meantime I found that more of Makefile.in patching is needed than I was doing. (I just applied the same as Makefile.am but that does not suffice.) | 09:04:27 | |
| I suppose I'll just try doing autoreconf locally and hardcode the whole diff into nixpkgs patch :-( Hopefully that ugly thing will work. | 09:05:13 | |
| ah i assumed you already did that | 09:05:48 | |
| Patches that add .c and .h files are harder than I expected. | 09:05:58 | |
| Uh, it generates huge diffs of unrelated changes. Matching versions of all autotools with upstream is probably hard. | 09:08:52 | |
try touching aclocal.m4 | 09:09:09 | |
| https://stackoverflow.com/questions/33278928/how-to-overcome-aclocal-1-15-is-missing-on-your-system-warning | 09:09:14 | |
| vcunat: | 09:10:21 | |
| or touching all 3 | 09:11:06 | |
| Thanks! Touching that file does resolve this issue. I'll most likely use it - I hope I'll manage to finish the whole hacky patching. | 09:19:51 | |
| Uh, I made some mistake. I don't think it succeeded. I probably omitted the patch by mistake. | 09:54:30 | |
| I don't know, I'll probably give it up for the current staging-next-23.05. In case someone wants to experiment, you can get prototype patch for nghttp2 (version without touching generated stuff): https://github.com/vcunat/nghttp2/pull/new/p/backport-cve-2023-44487 | 10:20:33 | |
| 14 Oct 2023 | ||
| I've just discovered (messing around on staging) that a This results in NIX_LDFLAGS having a My conclusion is that the compiler only works if you're in a stdenv, but I feel that it should work standalone. Is that reasonable? I think this could be fixed by baking it into the cc-cflags as is done for compiler-rt here. https://github.com/NixOS/nixpkgs/blob/176015fc743583e30581c23bfda2bf848dd4d67d/pkgs/development/compilers/llvm/16/default.nix#L257 | 13:54:38 | |
| Seems someone already beat me to it: https://github.com/NixOS/nixpkgs/issues/201591 / https://github.com/NixOS/nixpkgs/pull/220520 | 14:13:40 | |
| yeah, i think mingw compilers have a similar problem and don't supply enough libraries to compile hello world without manual fiddling | 21:00:38 | |
| 15 Oct 2023 | ||
BTW, I thought the normal way to change C compiler is to use overridden stdenv, here probably llvmPackages.stdenv or clangStdenv. | 05:59:49 | |
Unfortunately I don't know a way of doing that in a shell except writing a shell.nix. | 06:00:24 | |
* Unfortunately I don't know a way of doing that in a nix shell except writing a shell.nix. | 06:00:34 | |
| Yeah, that matches my understanding. AFAIU `nix shell` does not create enough development environment (like running hooks). | 06:18:21 | |
| 16 Oct 2023 | ||
| I don't see why it couldn't work though, right, I mean, we're building a compiler wrapper, that compiler wrapper should have enough within it to (trivially) function. Even if you have to make a stdenv in order to have any more interesting dependencies. | 16:49:36 | |
It could work in theory. I would even argue that cc should work without any wrappers and fancy variables like NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1. | 21:00:14 | |
| 17 Oct 2023 | ||
| What I wrote was mainly about my experience (over many years). I don't recall details. | 07:45:32 | |
| It's like, in practice some complex edge cases are difficult. | 07:47:27 | |
| 21 Oct 2023 | ||
| 04:54:00 | ||
| 23 Oct 2023 | ||
| 20:52:50 | ||