!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

578 Members
129 Servers

Load older messages


SenderMessageTime
7 Oct 2021
@sternenseemann:systemli.orgsterniplain clangStdenv with ld.bfd is fine more or less since it works fine for C16:34:05
8 Oct 2021
@jcie74:matrix.orgpie_(xposting from main)00:48:22
@jcie74:matrix.orgpie_does anyone uh know how i can tell libstdc++ to compile with more debug symbols? Id like to figure out if it will be easier to figure out what I want to figure out by looking at stuff with gdb or trying to read the source... doing that by itself might not be that hard (if i could find where in the guts of gcc it is...but i wouldnt know how to do to do the stdenv override either00:48:23
@trofi:matrix.orgtrofi libstdc++ is a part of gcc package. as opposed to glibc it does not have separateDebugInfo = true;. Perhaps it should? 06:34:20
@trofi:matrix.orgtrofinote that libstdc++ contains a small bit of support around header-mostly STL. maybe it will be enough to add debugging symbols into it's user? (library or final executable)06:35:43
@jcie74:matrix.orgpie_ trofi: so i should recompile gcc with debug symbols? (or lower optimization?) 16:47:03
@jcie74:matrix.orgpie_specifically my problem is that i want to inspect the internals of a basic_streambuf object in gdb16:47:33
@jcie74:matrix.orgpie_and gdb says <incomplete type>16:47:38
@siraben:matrix.orgsirabenDoes Nix support Canadian cross-compilation?17:00:32
@qyliss:fairydust.spaceAlyssa Rosshow's that different to the normal case?17:20:04
@trofi:matrix.orgtrofi pie_: don't know yet, sorry. But plan to find out for sure in following weeks :) 17:59:00
9 Oct 2021
@jcie74:matrix.orgpie_ gdb's info sharedlibary always screws me up
the star in the read column means NOT read
00:02:23
@jcie74:matrix.orgpie_ https://gcc-help.gcc.gnu.narkive.com/LHU6EUxd/compiling-only-libstdc-v3-with-debugging-symbols lead me to https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html , which suggests adding --enable-libstdcxx-debug to the configureFlags for gcc might get me what i want 00:32:21
@jcie74:matrix.orgpie_

that manual page also gives this suggestion:

Note this make command, executed in the build directory, will do much the same thing, without the configuration difference and without building everything twice: make CXXFLAGS='-g3 -O0 -fno-inline' all

00:32:49
@jcie74:matrix.orgpie_I'm not quite sure that implies what I'm saying; but it would be nice if we could build libstdc++ in a separate derivation. (somehow noting the tight coupling of a c++ stdlib and its compiler00:33:35
@jcie74:matrix.orgpie_ * I'm not quite sure that implies what I'm saying; but it would be nice if we could build libstdc++ in a separate derivation. (somehow noting the tight coupling of a c++ stdlib and its compiler)00:33:37
@sternenseemann:systemli.orgsterni
In reply to @siraben:matrix.org
Does Nix support Canadian cross-compilation?
it's doable, but there's no ready made solution afaik
09:32:38
@sternenseemann:systemli.orgsterni John Ericson talked about this 09:34:08
@jcie74:matrix.orgpie_/nix/store/9lz65rckh7zhg4j76qzmiy0vr9hb0wa1-gcc-10.3.0/lib/debug/libstdc++.so.6 gets created but readelf still shows no debug sections on it...12:29:07
@jcie74:matrix.orgpie_

Anyone see anything wrong with this?

let
  nixpkgs = import (import ./nix/sources.nix).nixpkgs {};
  gcc = nixpkgs.gcc.override (o: { cc = nixpkgs.gcc.cc.overrideAttrs (o: {
      dontStrip = true;
      configureFlags = o.configureFlags ++ [ "--enable-libstdcxx-debug" "--enable-languages=c++" ];
      hardeningDisable = [ "all" ];
      });});
in
with nixpkgs; mkShell {
  buildInputs  = [
    git
    niv
    valgrind
    gcc
    gdb
    cmake
    ];
  LD_LIBRARY_PATH = "${gcc.cc}/lib/debug";
  hardeningDisable = [ "all" ]; # clear extraneous compiler flags, I want to add things manually myself.
  }
12:34:21
@Ericson2314:matrix.orgJohn Ericson siraben if you call stage.nix yourself it should work 16:46:25
@jcie74:matrix.orgpie_Can I disable separated outputs on gcc?21:32:35
@jcie74:matrix.orgpie_

(I think) When I try to add keepTreeHook, I run into:

cycle detected in the references of '/nix/store/bxspqrcrbqw9sbj3ap9rdrk4fpi8150h-gcc-10.3.0-lib' from '/nix/store/xrizkssnx1m7c0z1fji9qxd7kfd333jr-gcc-10.3.0'
error: build of '/nix/store/ck1vxcqvqzn488njy9iwhy8b90jznyd7-gcc-10.3.0.drv', '/nix/store/r6ipjr4ivr1lc61c2yxsk7l6xj9mdygs-gcc-wrapper-10.3.0.drv' failed
21:33:27
11 Oct 2021
@qyliss:fairydust.spaceAlyssa RossWe really need some mechanism to disable optional dependencies on systemd for musl09:53:35
@qyliss:fairydust.spaceAlyssa Rossor I suppose maybe we could try OpenEmbedded's patches10:12:30
@qyliss:fairydust.spaceAlyssa Rossnot a friendly response last time that was tried though D: https://github.com/NixOS/nixpkgs/pull/3771510:17:58
@symphorien:xlumurb.eusymphorienI saw a pr that introduced somthing to replace udev10:42:51
@symphorien:xlumurb.eusymphorienIf we reverted to actually use udev as an input instead of systemd when it makes sens, we could overlay udev with this replacement when on musl10:44:04
@qyliss:fairydust.spaceAlyssa Rossif you could find that PR that would be very interesting to me!10:51:29
@qyliss:fairydust.spaceAlyssa RossI was just packaging libudev-zero, which looks like it'll solve my problem, but there's no PR for that so it can't have been what you saw10:51:59

Show newer messages


Back to Room ListRoom Version: 6