!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

76 Members
Nix C API https://github.com/NixOS/nix/blob/master/doc/manual/src/c-api.md, language-specific bindings, and their use cases (currently broken link: https://nixos.org/manual/nix/unstable/c-api)22 Servers

Load older messages


SenderMessageTime
29 May 2025
@o-santi:matrix.orgLeonardo SantiagoI looked up your nixops4 setup and it seemed pretty similar (almost exactly the same) as mine so I don't know what I'm doing wrongly14:16:13
@roberthensing:matrix.orgRobert Hensing (roberth)

clang?

Not on linux

14:16:18
@o-santi:matrix.orgLeonardo Santiago oh, so it's on gcc? that may be it, you have some gcc measures that I'm not using 14:16:45
@roberthensing:matrix.orgRobert Hensing (roberth)I do use clang on linux in my dev shell when hacking on the thing14:17:38
@o-santi:matrix.orgLeonardo SantiagoI'm not a super c++ guy but the only instance I found someone commenting this was because of a gcc13 -> 14 version mismatch and so I think that'd be the issue here too14:18:03
@roberthensing:matrix.orgRobert Hensing (roberth) May be possible to build it that way with pkgsLLVM 14:18:07
@o-santi:matrix.orgLeonardo Santiagoespecially given that it is a nixpkgs upgrade14:18:08
@o-santi:matrix.orgLeonardo Santiagowdym?14:18:20
@roberthensing:matrix.orgRobert Hensing (roberth) Something like nix build nixpkgs#pkgsLLVM.nixVersions.git 14:19:03
@roberthensing:matrix.orgRobert Hensing (roberth)It's not the most reliably buildable package set, but if it works...14:19:30
@o-santi:matrix.orgLeonardo Santiago oh, it was building fine with gcc before, I'll try to add your gcc countermeasures and see if that fixes it 14:19:45
@roberthensing:matrix.orgRobert Hensing (roberth)ok14:20:09
@o-santi:matrix.orgLeonardo Santiagoyep, apparently it worked14:30:58
@o-santi:matrix.orgLeonardo Santiagonope, false positive, tested on old nix version14:35:18
@o-santi:matrix.orgLeonardo Santiago just to confirm, indeed the bump made the jump from gcc13 to gcc14 and it seems to be inline with this gentoo forum error report: https://forums.gentoo.org/viewtopic-t-1172390-start-0.html 15:23:17
@o-santi:matrix.orgLeonardo Santiago * just to confirm, indeed the nixpkgs bump made the jump from gcc13 to gcc14 and it seems to be inline with this gentoo forum error report: https://forums.gentoo.org/viewtopic-t-1172390-start-0.html 15:23:52
@o-santi:matrix.orgLeonardo Santiago though I'm not entirely sure where this mismatch comes from. maybe the libclang I'm using in bindgen is equivalent to gcc13? I tried updating nixpkgs to latest but nothing worked 15:25:09
@o-santi:matrix.orgLeonardo Santiagohttps://github.com/llvm/llvm-project/issues/9661015:54:41
@o-santi:matrix.orgLeonardo Santiago this means that you're using bindgen with gcc, is that correct? 15:55:12
@o-santi:matrix.orgLeonardo Santiagoor, at least, linking it15:55:24
@roberthensing:matrix.orgRobert Hensing (roberth)correct - an unmodified bindgen, which uses clang as a library internally for code generation, whereas Nix is built with gcc16:23:39
@o-santi:matrix.orgLeonardo Santiagoand how do you make it link with gcc correctly? 16:25:45
@o-santi:matrix.orgLeonardo Santiago I've taken a look at your nci.nix and I thought it might be either the postConfigure script or the NIX_CC_UNWRAPPED part but none of these had any effect 16:26:26
@o-santi:matrix.orgLeonardo Santiago oh, I see the issue, the script seems to be correctly adding gcc into the include path, but it's gcc13, not the one used by nix 16:54:42
@o-santi:matrix.orgLeonardo Santiago and this is because I'm on nixos-24.11 not nixos-unstable! 16:57:00
@o-santi:matrix.orgLeonardo Santiago * and this is because I'm on nixos-24.11 not nixos-unstable, so updating it did not fast forward it enough 16:57:09
@o-santi:matrix.orgLeonardo Santiago finally 16:57:19
@o-santi:matrix.orgLeonardo Santiago * finally it works 16:57:22
@o-santi:matrix.orgLeonardo Santiago now I'm having trouble with libflake-c 19:52:30
@o-santi:matrix.orgLeonardo Santiago for instance, I cannot seem to simply call nix_flake_reference_and_fragment_from_string 19:53:58

Show newer messages


Back to Room ListRoom Version: 10