!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

233 Members
75 Servers

Load older messages


SenderMessageTime
11 Oct 2023
@rhys:memes.nzRhys joined the room.02:25:33
@vcunat:matrix.orgvcunat 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
@artturin:matrix.orgArtturin
In reply to @vcunat:matrix.org
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.
I don't know what they use to detect changes but maybe just try touching both files?
09:03:23
@artturin:matrix.orgArtturin
In reply to @vcunat:matrix.org
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.
* I don't know what they use to detect changes but maybe just try touching both files in postPatch?
09:03:36
@vcunat:matrix.orgvcunatI did try that.09:03:43
@vcunat:matrix.orgvcunat 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
@vcunat:matrix.orgvcunatI 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
@artturin:matrix.orgArtturinah i assumed you already did that09:05:48
@vcunat:matrix.orgvcunatPatches that add .c and .h files are harder than I expected.09:05:58
@vcunat:matrix.orgvcunatUh, it generates huge diffs of unrelated changes. Matching versions of all autotools with upstream is probably hard.09:08:52
@artturin:matrix.orgArtturin try touching aclocal.m4 09:09:09
@artturin:matrix.orgArtturinhttps://stackoverflow.com/questions/33278928/how-to-overcome-aclocal-1-15-is-missing-on-your-system-warning09:09:14
@artturin:matrix.orgArtturin vcunat: 09:10:21
@artturin:matrix.orgArtturinor touching all 309:11:06
@vcunat:matrix.orgvcunatThanks! 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
@vcunat:matrix.orgvcunatUh, I made some mistake. I don't think it succeeded. I probably omitted the patch by mistake.09:54:30
@vcunat:matrix.orgvcunatI 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-4448710:20:33
14 Oct 2023
@p14:matrix.orgp14

I've just discovered (messing around on staging) that a nix shell .#pkgsLLVM.buildPackages.stdenv.cc gives you a x86_64-unknown-linux-clang can't compile things. The linker fails, unable to find libunwind and friends. The reason is that the logic for adding the appropriate -L flags is actually handled by the bintools setuphook. The packages are named as extraPackages in the clang wrapper: https://github.com/NixOS/nixpkgs/blob/176015fc743583e30581c23bfda2bf848dd4d67d/pkgs/development/compilers/llvm/16/default.nix#L247-L252

This results in NIX_LDFLAGS having a -L/path/to/libunwind (and libcxx, etc), if you're in a stdenv, and not otherwise.

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
@p14:matrix.orgp14Seems someone already beat me to it: https://github.com/NixOS/nixpkgs/issues/201591 / https://github.com/NixOS/nixpkgs/pull/22052014:13:40
@trofi:matrix.orgtrofiyeah, i think mingw compilers have a similar problem and don't supply enough libraries to compile hello world without manual fiddling21:00:38
15 Oct 2023
@vcunat:matrix.orgvcunat BTW, I thought the normal way to change C compiler is to use overridden stdenv, here probably llvmPackages.stdenv or clangStdenv. 05:59:49
@vcunat:matrix.orgvcunat Unfortunately I don't know a way of doing that in a shell except writing a shell.nix. 06:00:24
@vcunat:matrix.orgvcunat * Unfortunately I don't know a way of doing that in a nix shell except writing a shell.nix. 06:00:34
@trofi:matrix.orgtrofiYeah, that matches my understanding. AFAIU `nix shell` does not create enough development environment (like running hooks).06:18:21
16 Oct 2023
@p14:matrix.orgp14I 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
@trofi:matrix.orgtrofi 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
@vcunat:matrix.orgvcunatWhat I wrote was mainly about my experience (over many years). I don't recall details.07:45:32
@vcunat:matrix.orgvcunatIt's like, in practice some complex edge cases are difficult.07:47:27
21 Oct 2023
@bb010g:matrix.orgDusk joined the room.04:54:00
23 Oct 2023
@opna2608:matrix.orgPuna joined the room.20:52:50

Show newer messages


Back to Room ListRoom Version: 9