| 8 Oct 2025 |
K900 | At least that's what we found last time someone ran into this | 14:03:27 |
nim65s | workaround wfm in https://github.com/NixOS/nixpkgs/pull/449938 :) | 14:22:04 |
| 9 Oct 2025 |
| @nullcube:matrix.org left the room. | 10:36:39 |
| 10 Oct 2025 |
| Boas Hermansson joined the room. | 09:26:02 |
| 11 Oct 2025 |
| Anders joined the room. | 11:20:40 |
Anders | I am trying to build relibc using nix to be able to cross compile redox os with nix again. But I run into this problem x86_64-linux-gnu-gcc: command not found How do I solve it? I am not trying to cross compile | 11:21:28 |
K900 | There's no general answer for this question | 11:22:00 |
K900 | You need to look at the build system | 11:22:09 |
K900 | And figure out what it's expecting and why | 11:22:13 |
Anders | ifeq ($(TARGET),x86_64-unknown-linux-gnu)
export CC=x86_64-linux-gnu-gcc
export LD=x86_64-linux-gnu-ld
export AR=x86_64-linux-gnu-ar
export NM=x86_64-linux-gnu-nm
export OBJCOPY=objcopy
export CPPFLAGS=
LD_SO_PATH=lib/ld64.so.1
endif
| 11:45:21 |
K900 | Yeah that looks immediately wrong, at least LDSOPATH | 11:51:21 |
K900 | Yeah that looks immediately wrong, at least LD_SO_PATH | 11:51:25 |
Anders | Well it works on other systems apparently. Is there not any simple way to get nix to create an env where these commands are specified? | 12:02:31 |
K900 | Honestly, I'm sorry if it comes off as harsh, but you're clearly out of your depth here | 12:04:28 |
K900 | Maybe try packaging something less weird first | 12:04:39 |
Anders | If you have nothing helpful to say it is better to not say it | 12:05:25 |
K900 | The thing is, you're expecting people to feed you answers | 12:06:16 |
K900 | To questions that generally indicate that you don't understand the build system | 12:06:46 |
K900 | And like, we can't do your homework for you, | 12:06:59 |
K900 | * And like, we can't do your homework for you | 12:07:02 |
Anders | I don't care. If you don't want to help. Just simply don't. No need to be rude. | 12:08:10 |
K900 | I do care, because this is not the kind of behavior we want to encourage in this community | 12:08:32 |
Anders | I got it working now | 12:44:25 |
Artturin | In reply to @anders:sorby.xyz
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
export CC=x86_64-linux-gnu-gcc
export LD=x86_64-linux-gnu-ld
export AR=x86_64-linux-gnu-ar
export NM=x86_64-linux-gnu-nm
export OBJCOPY=objcopy
export CPPFLAGS=
LD_SO_PATH=lib/ld64.so.1
endif
In nixpkgs the compiler for build isn't prefixed, neither during native or cross-compilation
You should remove those lines or substituteInPlace them | 12:55:57 |
Anders | I don't want to break support for other systems. What is the recommended way of doing this in nix? substituteInPlace | 13:01:27 |
Alyssa Ross | are they not overridable on the make command line? | 13:09:37 |
Alyssa Ross | i.e. makeFlags | 13:09:44 |
Alyssa Ross | make variables usually are | 13:10:05 |
Anders | Yes, but I think it is cleanest to use substituteInPlace in this case | 13:18:17 |
Alyssa Ross | I don't agree at all. The Make command line is an actual API designed for doing exactly this. | 13:20:35 |