!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

332 Members
102 Servers

Load older messages


SenderMessageTime
3 Sep 2023
@kity:kity.wtfash (it/its) 🏳️‍⚧️ i'm going to see if patching out the -fno-integrated-as from the build system works, because the reason it's there in the first place is a four year old bug so maybe it's fixed now? 23:49:44
4 Sep 2023
@artemis:arty.chatartemis
In reply to @raitobezarius:matrix.org
nix-build -A something --argstr crossSystem "a system config"
does this translate to flakes in any way? or otherwise how would i do this inside nix rather than running a command. see https://artemis.sh/2023/06/06/cross-compile-nixos-for-great-good.html#humility for an example where i define a flake for a program that exports both a native build output and a cross-build output
00:10:46
@artemis:arty.chatartemisi then import that flake in another repo (see https://artemis.sh/assets/posts/2023-06-06-cross-compile-nixos-for-great-good/flake-with-humility.nix for how i do that) to include it in the systemPackages for a cross-built disk image00:11:30
@artemis:arty.chatartemis* i then import that flake in another repo (see https://artemis.sh/assets/posts/2023-06-06-cross-compile-nixos-for-great-good/flake-with-humility.nix for how i do that) to include the cross-build variant in the systemPackages for a cross-built disk image00:11:48
@kity:kity.wtfash (it/its) 🏳️‍⚧️
In reply to@kity:kity.wtf
i'm going to see if patching out the -fno-integrated-as from the build system works, because the reason it's there in the first place is a four year old bug so maybe it's fixed now?
it doesn't
00:28:47
@kity:kity.wtfash (it/its) 🏳️‍⚧️ maybe i can add llvmPackagesBuildBuild.binutils-unwrapped for (unprefixed, as expected) as 00:29:19
@kity:kity.wtfash (it/its) 🏳️‍⚧️
In reply to@kity:kity.wtf
maybe i can add llvmPackagesBuildBuild.binutils-unwrapped for (unprefixed, as expected) as
/nix/store/y2bfh2sg9zaw2b6ngbajvjlpnffnj4al-powerpc64le-unknown-linux-musl-clang-wrapper-16.0.6/bin/powerpc64le-unknown-linux-musl-clang -std=gnu99 -o xptcinv>
xpcom/reflect/xptcall/md/unix/xptcstubs_asm_ppc64_linux.o
clang-16: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
Assembler messages:
Fatal error: invalid listing option `6'
clang-16: error: assembler command failed with exit code 1 (use -v to see invocation)
00:44:21
@kity:kity.wtfash (it/its) 🏳️‍⚧️dammit00:44:23
@kity:kity.wtfash (it/its) 🏳️‍⚧️ https://github.com/chimera-linux/cports/blob/master/contrib/firefox/patches/clang-ias.patch 01:10:59
@rhelmot:matrix.orgrhelmot

okay I need help. for context I'm on freebsd, not cross compiled just normal, but I am not sure if that matters here

I tried building gcc: nix-shell -p gcc. The build succeeds, but the cycle checker fails: error: cycle detected in build of '/nix/store/lxbw8ccms1bd9qb4imgnsla5889zvhwp-gcc-12.3.0.drv' in the references of output 'lib' from output 'out'

To the best of my knowledge, the cycle is as follows: gcc-lib/lib/*.so has rpaths for gcc-out/lib, and gcc-out/nix-support/propagated-build-inputs lists gcc-lib. I had my friend build the same setup on linux and the propagated-build-inputs link was still there but the rpath was not. The directory that the rpath points to does not contain any shared objects, so this is probably the link that needs to be broken.

The thing that gets me is that I think the rpath is being set by nixpkgs/pkgs/stdenv/generic/setup.sh: there's an unconditional call to _addRpathPrefix "$out". Assuming I'm understanding correctly, setup.sh is called by the builder used by stdenv.mkDerivation? so this is adding $out/lib to the rpath of everything that gets linked ever. which as I understand is supposed to be okay! like making other outputs which are just symlinks into *-out/lib is supposed to be totally kosher! so then why does the gcc-out derivation explicitly mark a link to gcc-lib? presumably it's to say "okay so if you're trying to depend on me the thing you actually want is over there" but then why does that count for the sake of the cycle checker? idk the whole thing is very confusing.

02:24:03
@rhelmot:matrix.orgrhelmotany advice appreciated02:24:07
@trofi:matrix.orgtrofiI think gcc.lib is normally not expected to refer to gcc.out06:44:27
@trofi:matrix.orgtrofi
$ nix path-info -r  $(nix-build -A gcc.cc.lib) |& unnix
/<<NIX>>/libunistring-1.1
/<<NIX>>/libidn2-2.3.4
/<<NIX>>/xgcc-12.3.0-libgcc
/<<NIX>>/glibc-2.37-8
/<<NIX>>/gcc-12.3.0-libgcc
/<<NIX>>/gcc-12.3.0-lib
06:45:21
@trofi:matrix.orgtrofi gcc uses pkgs/development/compilers/gcc/default.nix: NIX_NO_SELF_RPATH = true; to avoid self-rpaths. 06:46:19
@hive:the-apothecary.club👉@crystallinefire:chat.solarpunk.moe changed their display name from hive ⬡ to hive <gf edition>.14:42:30
@hive:the-apothecary.club👉@crystallinefire:chat.solarpunk.moe changed their display name from hive <gf edition> to hive hive ⬡.14:44:46
@kity:kity.wtfash (it/its) 🏳️‍⚧️how is nixpkgs bootstrapped?18:49:31
@kity:kity.wtfash (it/its) 🏳️‍⚧️i'm trying to explore the possibility of having a system whose "native" architecture is wasm64-wasi but always cross-compiles packages to the host architecture. that way, everything is cross compiled using a "standard" wasm64-wasi toolchain and you could, for example, have heterogenous machines that both specify wasm64-wasi in boot.binfmt.emulatedSystems and are then able to share packages19:06:24
@kity:kity.wtfash (it/its) 🏳️‍⚧️ unfortunately if i try to do for instance, NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build . -A stdenv --argstr system "wasm64-wasi" it exits because ENOENT when calling /bin/bash. i don't know if bash in this case is actually nonexistent or if it's a different issue (like bad linker path) but i don't actually understand how nixpkgs bootstraps itself or how to generate a bootstrap tarball or anything like that. it may not even be feasible at this point to generate a wasm stdenv! but i'd like to try and document it. 19:12:40
@rhelmot:matrix.orgrhelmotthe nixpkgs bootstrap routine is in pkgs/stdenv19:21:21
@rhelmot:matrix.orgrhelmotyou can in fact bootstrap without a bootstrap tarball if you're willing to temporarily copy some files off the host19:21:46
@rhelmot:matrix.orgrhelmotthe way it works is that there's a bootstrap routine for each host platform and it incrementally builds more and more packages out of nothing until it can instantiate all-packages in some meaningful way, then you can do whatever you want from there to achieve self-sufficiency19:22:44
@kity:kity.wtfash (it/its) 🏳️‍⚧️where is the bootstrap routine located?19:25:55
@kity:kity.wtfash (it/its) 🏳️‍⚧️presumably there's one for x86_64-linux but not wasm64-wasi?19:26:12
@rhelmot:matrix.orgrhelmotfor which host platform?19:26:12
@rhelmot:matrix.orgrhelmotthere's one for linux in general, it's in pkgs/stdenv/linux19:26:26
@rhelmot:matrix.orgrhelmotI truthfully don't know a lot about how the particular stdenv gets selected, when I was messing with it I just blindly grepped through and added cases until it worked19:27:26
@kity:kity.wtfash (it/its) 🏳️‍⚧️interesting19:30:58
@kity:kity.wtfash (it/its) 🏳️‍⚧️so i suppose for this it would mean creating a bootstrap for wasi19:32:34
@rhelmot:matrix.orgrhelmotokay okay hang on I can think about this more critically - creating a stdenv for wasi would imply that you had already compiled nix itself for wasi and you wanted to boot nixpkgs under that environment19:33:29

Show newer messages


Back to Room ListRoom Version: 6