!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

975 Members
For people hacking on the Nix package manager itself206 Servers

Load older messages


SenderMessageTime
9 Aug 2021
@andi:kack.itandi-But those Symbols aren't tracked by the GC? Otherwise we should set an allocator for them.18:55:10
@manveru:matrix.orgmanverui don't know how C++ works unfortunately :(18:55:47
@andi:kack.itandi-They are allocated once and stay there until the process terminates18:56:16
@manveru:matrix.orgmanverumy assumption was that this std::string thing does an allocation that needs to be cleaned up again afterwards18:56:26
@andi:kack.itandi-I has to be cleaned up but that happens then the entire symboltable goes out of scope18:57:01
@andi:kack.itandi- With C++20 (and GCC 11) we could make use of Heterogeneous lookup for unordered containers (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0919r3.html) for the lookup using the std::string_view... so far that isn't possible without huge effort AFAICT. 19:53:17
@nixinator:nixos.devnixinator
In reply to @manveru:matrix.org
i don't know how C++ works unfortunately :(
even c++ programmers don't know how it works ;-)
22:46:36
@pamplemouss_:matrix.orgpamplemousse

I am trying to compile nix a non nixos (ubuntu) using clang.
I am using nix develop .#nix-clang11Stdenv (thanks to https://github.com/NixOS/nix/pull/4996) , but I get plenty of errors when linking src/libutil/libnixutil.so

/nix/store/qvc6cz5d43jhhm4a3r48xkrc82xh1s95-binutils-2.35.1/bin/ld: src/libutil/libnixutil.so.p/archive.cc.o: in function `nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&)':                                   
/src/nix/build/../src/libutil/archive.cc:73: undefined reference to `std::allocator<char>::allocator()'

[... and many more…]

Feels like the flake.nix might be missing stdlib, but I tried adding libcxx without success, and libstdcxx5 fails to build.

23:52:00
10 Aug 2021
@anubhavkini:matrix.organubhavkini left the room.05:51:17
@Las:matrix.orgLasWhat is the point of the GitHub fetcher? I tested the speed difference compared to the Git fetcher and it wasn't so different.12:34:16
@sternenseemann:systemli.orgsterniI think it performs much worse for big repos12:35:20
@Las:matrix.orgLas
In reply to @sternenseemann:systemli.org
I think it performs much worse for big repos
I tested it on Nixpkgs lol
12:39:23
@Las:matrix.orgLasThough perhaps it was because I had already fetched an earlier commit?12:39:43
@niksnut:matrix.orgniksnut The github fetcher is way faster than git. 12:42:25
@niksnut:matrix.orgniksnutOften it's even faster in cases where git can do an incremental fetch.12:43:18
@sternenseemann:systemli.orgsterni
In reply to @pamplemouss_:matrix.org

I am trying to compile nix a non nixos (ubuntu) using clang.
I am using nix develop .#nix-clang11Stdenv (thanks to https://github.com/NixOS/nix/pull/4996) , but I get plenty of errors when linking src/libutil/libnixutil.so

/nix/store/qvc6cz5d43jhhm4a3r48xkrc82xh1s95-binutils-2.35.1/bin/ld: src/libutil/libnixutil.so.p/archive.cc.o: in function `nix::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, nix::Sink&, std::function<bool (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>&)':                                   
/src/nix/build/../src/libutil/archive.cc:73: undefined reference to `std::allocator<char>::allocator()'

[... and many more…]

Feels like the flake.nix might be missing stdlib, but I tried adding libcxx without success, and libstdcxx5 fails to build.

have you tried llvmPackages_11.libcxxStdenv?
12:44:42
@Las:matrix.orgLas
In reply to @niksnut:matrix.org
The github fetcher is way faster than git.
Do you think there are any ways of making the Git fetcher faster?
12:45:15
@sternenseemann:systemli.orgsterni also these usually use binutils' ld.bfd which sometimes causes weird problems linking C++, so pkgsLLVM.stdenv may be worth a try which uses lld 12:46:35
@sternenseemann:systemli.orgsterni * pamplemousse: also these usually use binutils' ld.bfd which sometimes causes weird problems linking C++, so pkgsLLVM.stdenv may be worth a try which uses lld 12:46:45
@niksnut:matrix.orgniksnutQuick test: fetching github:NixOS/nixpkgs => 16.5s, git+https://github.com/NixOS/nixpkgs => 131.5s, doing the latter again => 11.3s12:48:54
@niksnut:matrix.orgniksnutFetching git+https://github.com/NixOS/nixpkgs?shallow=1 => 85.2s12:52:31
@niksnut:matrix.orgniksnutThat's probably the best we can do with git.12:52:54
@Las:matrix.orgLasHmm, thanks13:00:40
@Las:matrix.orgLasThe issue is you can't check commit signatures when using the github fetcher13:01:01
@Las:matrix.orgLas
In reply to @niksnut:matrix.org
Fetching git+https://github.com/NixOS/nixpkgs?shallow=1 => 85.2s
I tried this on my own machine, and it did indeed take ages (so long I interrupted it), but time git clone git://github.com/NixOS/nixpkgs --depth 1 took 10.31 seconds according to time.
13:31:10
@Las:matrix.orgLasAre you sure something isn't broken in the Git integration in Nix? This is an extreme difference.13:31:53
@niksnut:matrix.orgniksnut
In reply to @Las:matrix.org
I tried this on my own machine, and it did indeed take ages (so long I interrupted it), but time git clone git://github.com/NixOS/nixpkgs --depth 1 took 10.31 seconds according to time.
Yes, that's what ?shallow= does.
13:32:06
@niksnut:matrix.orgniksnuthm13:32:18
@Las:matrix.orgLasI wonder why it takes so long then13:32:20
@balsoft:balsoft.rubalsoftBTW I can confirm that Nix' fetcher is way slower than fetching manually13:32:38

Show newer messages


Back to Room ListRoom Version: 6