15 Sep 2025 |
Tristan Ross | Which seems to somewhat be possible but isn't exactly tested | 19:31:27 |
Tristan Ross | I've been wanting to do an LLVM bootstrap but there's been blockers, like cleaning up the versions. | 19:32:34 |
Tristan Ross | And redoing the default.nix to not split tools and libraries is something that's better as well. | 19:33:16 |
matthewcroughan | Tristan Ross: Is this misconfigured? Because it's still producing errors
nixpkgs.buildPlatform = "aarch64-unknown-linux-gnu";
nixpkgs.hostPlatform = lib.recursiveUpdate (lib.systems.elaborate "aarch64-linux") {
useLLVM = true;
linker = "lld";
linux-kernel.target = "vmlinuz.efi";
linux-kernel.installTarget = "zinstall";
config = "aarch64-unknown-linux-musl";
};
| 19:39:49 |
matthewcroughan | I will get you the diff shortly | 19:40:13 |
Tristan Ross | That should be fine | 19:40:18 |
Tristan Ross | The diff would help | 19:40:23 |
Tristan Ross | And whatever errors you get | 19:40:31 |
matthewcroughan | Ah okay, no sorry, different build failure now | 19:41:16 |
matthewcroughan | error: builder for '/nix/store/hgl5bcxdmp4qlma4b48njyxa02qyj8kz-glibc-nolibgcc-aarch64-unknown-linux-musl-2.40-66.drv' failed with exit code 2;
last 25 log lines:
> ../sysdeps/unix/sysv/linux/gettimeofday.c:56:1: note: in expansion of macro 'weak_alias'
> 56 | weak_alias (__gettimeofday, gettimeofday)
> | ^~~~~~~~~~
> ../sysdeps/unix/sysv/linux/gettimeofday.c:42:13: note: aliased declaration here
> 42 | libc_ifunc (__gettimeofday,
> | ^~~~~~~~~~~~~~
> ./../include/libc-symbols.h:672:25: note: in definition of macro '__ifunc_resolver'
> 672 | __typeof (type_name) *name##_ifunc (__VA_ARGS__) \
> | ^~~~
> ./../include/libc-symbols.h:710:3: note: in expansion of macro '__ifunc_args'
> 710 | __ifunc_args (type_name, name, expr, init, arg)
> | ^~~~~~~~~~~~
> ./../include/libc-symbols.h:794:32: note: in expansion of macro '__ifunc'
> 794 | #define libc_ifunc(name, expr) __ifunc (name, name, expr, void, INIT_ARCH)
> | ^~~~~~~
> ../sysdeps/unix/sysv/linux/gettimeofday.c:42:1: note: in expansion of macro 'libc_ifunc'
> 42 | libc_ifunc (__gettimeofday,
> | ^~~~~~~~~~
> cc1: all warnings being treated as errors
> make[2]: *** [/build/build/sysd-rules:25: /build/build/time/gettimeofday.os] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory '/build/glibc-2.40/time'
> make[1]: *** [Makefile:484: time/subdir_lib] Error 2
> make[1]: Leaving directory '/build/glibc-2.40'
> make: *** [Makefile:9: all] Error 2
For full logs, run 'nix log /nix/store/hgl5bcxdmp4qlma4b48njyxa02qyj8kz-glibc-nolibgcc-aarch64-unknown-linux-musl-2.40-66.drv'
| 19:41:26 |
matthewcroughan | ah the actual error is here:
glibc-nolibgcc-aarch64-unknown-linux-musl> ../sysdeps/unix/sysv/linux/gettimeofday.c:56:29: error: 'gettimeofday' alias between functions of incompatible types 'int(struct timeval *, void *)' and 'int (*(void))(struct timeval *, void *)' [8;;https://gcc.gnu.org/onlinedocs/gcc-14.3.0/gcc/Warning-Options.html#index-Wattribute-alias-Werror=attribute-alias=8;;]
glibc-nolibgcc-aarch64-unknown-linux-musl> 56 | weak_alias (__gettimeofday, gettimeofday)
| 19:43:01 |
matthewcroughan | Trying staging | 19:43:33 |
matthewcroughan | Same there, is it another wno-error that needs to go atop pkgs/development/libraries/glibc/default.nix ? | 19:46:33 |
matthewcroughan | pkgs/development/libraries/glibc/default.nix
79: (lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
| 19:55:12 |
matthewcroughan | actually looks like it already should be | 19:55:17 |
matthewcroughan | so is something wrong with my hostPlatform Tristan Ross ? | 19:55:24 |
Tristan Ross | I'm not sure | 19:56:43 |
matthewcroughan | I guess (lib.systems.elaborate "aarch64-linux") is somehow making the isMusl set to false | 19:57:25 |
matthewcroughan | In which case, reverting to the legacy method seems better | 19:57:56 |
matthewcroughan |
| 19:57:57 |
matthewcroughan | * nixpkgs.localSystem = {
system = "aarch64-unknown-linux-gnu";
};
nixpkgs.crossSystem = {
config = "aarch64-unknown-linux-musl";
useLLVM = true;
linker = "lld";
};
``
| 19:58:00 |
matthewcroughan | * nixpkgs.localSystem = {
system = "aarch64-unknown-linux-gnu";
};
nixpkgs.crossSystem = {
config = "aarch64-unknown-linux-musl";
useLLVM = true;
linker = "lld";
};
| 19:58:05 |
matthewcroughan | And in that setup, I get the relocation issue | 19:58:21 |
matthewcroughan | Tristan Ross: in pkgsLLVM.pkgsMusl.buildPlatform the linker is linker = "bfd"; | 20:07:15 |
matthewcroughan | pkgsLLVM.buildPlatform 's linker is also bfd | 20:07:36 |
Tristan Ross | Yes, that's right | 20:07:43 |
Tristan Ross | That's the default on GNU | 20:07:50 |
matthewcroughan | nix-repl> pkgsLLVM.pkgsMusl.hostPlatform.linker
"bfd"
| 20:07:58 |
Tristan Ross | nix-repl> legacyPackages.aarch64-linux.hostPlatform.linker
"bfd"
| 20:08:02 |
matthewcroughan | and is that also correct? | 20:08:02 |