!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

224 Members
74 Servers

Load older messages


SenderMessageTime
20 Apr 2025
@reckenrode:matrix.orgRandy EckenrodeIt’s like DXVK but for Metal.18:06:37
@reckenrode:matrix.orgRandy Eckenrode* Yes. One of the things it builds is a DLL that exposes Metal to the Windows side.18:06:52
@reckenrode:matrix.orgRandy Eckenrode(DXVK can rely on Wine’s Vulkan implementation, but there’s nothing equivalent out of the box for Metal.)18:09:36
@cldrpr:matrix.orgcldrpr

Hi! Stdenv noob here.

Re: #295038, I have been working on understanding the next-gen GCC split-up efforts (John Ericson Philip Taron (UTC-8) ). I wanted to bounce some issues around to see if anyone may have any insight/perspective.

I've brought in changes from master (from a few weeks ago) into my working branch here. Per John Ericson's guidance, my focus is on getting cross-compilation functional. For testing, I am using the following build command from an x86 machine: nix-build --arg 'crossSystem' '{ config = "aarch64-unknown-linux-gnu"; useGccNg = true; }' -A <pkg>.

For additional background, the main gccNg top-level package is located here. The surface-level issue that I am currently finding is that building gccNgPackages.libssp fails with the following error:

       > ../sysdeps/aarch64/nptl/tls.h:86:21: error: implicit declaration of function '__builtin_thread_pointer'; did you mean '__builtin_extend_pointer'? []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/nptl/libc_start_call_main.h: In function '__libc_start_call_main':
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/libc_start_call_main.h:48:30: note: in expansion of macro 'THREAD_SELF'
       >    48 |       struct pthread *self = THREAD_SELF;

libssp uses gccWithLibc. This appears to be the point of failure. gccWithLibc wraps gcc-unwrapped with default bintools and the preceding libgcc. The preceding (and last successful build) libgcc stage uses gccWithLibgcc, which has bintoolsNoLibc in the CC wrapper.

I have made the assumption that the error is arch-related. Testing this assumption, I found the gccWithLibc stage in the build uses targetPackages.bintools. To test further, I passed buildPackages.bintools to gccWithLibc - and the build succeeds, though this causes subsequent issues in the following stage. Does this suggest an issue in recursion somewhere in the toolchain?

Does anyone have any thoughts?

18:47:16
@cldrpr:matrix.orgcldrpr *

Hi! Stdenv noob here.

Re: #295038, I have been working on understanding the next-gen GCC split-up efforts (John Ericson Philip Taron (UTC-8) ). I wanted to bounce some issues around to see if anyone may have any insight/perspective.

I've brought in changes from master (from a few weeks ago) into my working branch here. Per John Ericson's guidance, my focus is on getting cross-compilation functional. For testing, I am using the following build command from an x86 machine: nix-build --arg 'crossSystem' '{ config = "aarch64-unknown-linux-gnu"; useGccNg = true; }' -A <pkg>.

For additional background, the main gccNg top-level package is located here. The surface-level issue that I am currently finding is that building gccNgPackages.libssp fails with the following error:

       > ../sysdeps/aarch64/nptl/tls.h:86:21: error: implicit declaration of function '__builtin_thread_pointer'; did you mean '__builtin_extend_pointer'? []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/nptl/libc_start_call_main.h: In function '__libc_start_call_main':
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/libc_start_call_main.h:48:30: note: in expansion of macro 'THREAD_SELF'
       >    48 |       struct pthread *self = THREAD_SELF;

libssp uses gccWithLibc. This appears to be the point of failure. gccWithLibc wraps gcc-unwrapped with default bintools and the preceding libgcc. The preceding (and last successful build) libgcc stage uses gccWithLibgcc, which has bintoolsNoLibc in the CC wrapper.

I have made the assumption that the error is arch-related. Testing this assumption, I found the gccWithLibc stage in the build uses targetPackages.bintools. To test further, I passed buildPackages.bintools to gccWithLibc - and the build succeeds, though this causes subsequent issues in the following stage. Does this suggest an issue in recursion somewhere in the toolchain or perhaps with configure flags?

Does anyone have any thoughts?

18:49:37
@cldrpr:matrix.orgcldrpr *

Hi! Stdenv noob here.

Re: #295038, I have been working on understanding the next-gen GCC split-up efforts (John Ericson Philip Taron (UTC-8) ). I wanted to bounce some issues around to see if anyone may have any insight/perspective.

I've brought in changes from master (from a few weeks ago) into my working branch here. Per John Ericson's guidance, my focus is on getting cross-compilation functional. For testing, I am using the following build command from an x86 machine: nix-build --arg 'crossSystem' '{ config = "aarch64-unknown-linux-gnu"; useGccNg = true; }' -A <pkg>.

For additional background, the main gccNg top-level package is located here. The surface-level issue that I am currently finding is that building gccNgPackages.libssp fails with the following error:

       > ../sysdeps/aarch64/nptl/tls.h:86:21: error: implicit declaration of function '__builtin_thread_pointer'; did you mean '__builtin_extend_pointer'? []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/pthreadP.h:266:26: note: in expansion of macro 'THREAD_SELF'
       >   266 |   struct pthread *self = THREAD_SELF;
       >       |                          ^~~~~~~~~~~
       > ../sysdeps/nptl/libc_start_call_main.h: In function '__libc_start_call_main':
       > ../sysdeps/aarch64/nptl/tls.h:86:3: error: cast to pointer from integer of different size []
       >    86 |  ((struct pthread *)__builtin_thread_pointer () - 1)
       >       |   ^
       > ../sysdeps/nptl/libc_start_call_main.h:48:30: note: in expansion of macro 'THREAD_SELF'
       >    48 |       struct pthread *self = THREAD_SELF;

libssp uses gccWithLibc. This appears to be the point of failure. gccWithLibc wraps gcc-unwrapped with default bintools and the preceding libgcc. The preceding (and last successful build) libgcc stage uses gccWithLibgcc, which has bintoolsNoLibc in the CC wrapper.

I have made one assumption that the error is possibly arch-related. Testing this assumption, I found the gccWithLibc stage in the build uses targetPackages.bintools. To test further, I passed buildPackages.bintools to gccWithLibc - and the build succeeds, though this causes subsequent issues in the following stage. Does this suggest an issue in recursion somewhere in the toolchain or perhaps with configure flags?

Does anyone have any thoughts?

19:19:51
@rosscomputerguy:matrix.orgTristan Ross @cldrpr lemme give it a try on my aarch64 hardware to see if cross is borked, though that doesn't look like cross for what you're doing. That looks like emulated compiling. 19:52:55
@rosscomputerguy:matrix.orgTristan Ross
In reply to @reckenrode:matrix.org
I’m not sure how to structure DXMT. It’s a mix of native and Windows stuff. Ideally, cross from aarch64-darwin should build x86_64-darwin and x86_64-windows stuff.
I think it's doable but we'll have to explore our options when we're closer to that stage
19:53:19
@trofi:matrix.orgtrofi I would expect libssp not to be needed on aarch64. MOst targets should provide __stack_chk_fail and friends from libc. 19:54:59
@rosscomputerguy:matrix.orgTristan Ross @aleksana:mozilla.org So the coreutils PR got merged, that'll cause a rebuild of stdenv anyway. I think that other stdenv PR should be good. 19:55:21
@rosscomputerguy:matrix.orgTristan Ross
In reply to @trofi:matrix.org
I would expect libssp not to be needed on aarch64. MOst targets should provide __stack_chk_fail and friends from libc.
Yes, I'll check things out on my system. Should be easy for me to try things out.
19:55:47
@rosscomputerguy:matrix.orgTristan RossI wonder if the GCC refactoring could fix https://github.com/NixOS/nixpkgs/pull/399656#issuecomment-2814602431 lol19:58:58
@trofi:matrix.orgtrofi my bet is on the mix of libgcc.a from non-matching compiler versions. 20:03:47
21 Apr 2025
@r_i_s:matrix.orgris_https://github.com/NixOS/nixpkgs/pull/40040810:24:43
@reckenrode:matrix.orgRandy Eckenrode
In reply to @rosscomputerguy:matrix.org
I wonder if the GCC refactoring could fix https://github.com/NixOS/nixpkgs/pull/399656#issuecomment-2814602431 lol
Is the goal to enable LTO for everything? That seems risky for packages not written with LTO in mind (e.g., ld64 is prone to crashing when built LTO enabled).
14:33:56
@reckenrode:matrix.orgRandy Eckenrode
In reply to @rosscomputerguy:matrix.org
I wonder if the GCC refactoring could fix https://github.com/NixOS/nixpkgs/pull/399656#issuecomment-2814602431 lol
*
14:34:13
@rosscomputerguy:matrix.orgTristan Ross
In reply to @reckenrode:matrix.org
Is the goal to enable LTO for everything? That seems risky for packages not written with LTO in mind (e.g., ld64 is prone to crashing when built LTO enabled).
Pretty much
14:34:57
@rosscomputerguy:matrix.orgTristan RossWe'll have to come up with something which can override the platform attributes in the stdenv to change the platform to disable LTO.14:35:45
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) https://github.com/NixOS/nixpkgs/pull/394610
some preparations for pkg-config -> pkgconf, with discussion about how to add a hook that should probably be default. Feedback would be appreciated.
14:38:03
@rosscomputerguy:matrix.orgTristan Ross I just realized that I could change the CC wrapper and add an optional thing to enable or disable LTO 14:42:56
@emilazy:matrix.orgemilyit looks good in principle but it shouldn't land before 25.1114:46:59
@emilazy:matrix.orgemilyso haven't put effort into reviewing as I'm focused on 25.05 prep14:47:08
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)ah fair fair14:47:18
@emilazy:matrix.orgemilythe Darwin bootstrap stuff is awkward14:47:32
@emilazy:matrix.orgemilyarguably this should just be in the bootstrap tools, although having ported it to Python makes that kind of impossible14:47:51
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) its python-minimal, specifically to not do string manipulation in C. I understand python-minimal is available early enough? 14:48:44
@reckenrode:matrix.orgRandy EckenrodeDarwin bootstrap gets a fully functional Python in stage 1.14:52:34
@reckenrode:matrix.orgRandy EckenrodeRedacted or Malformed Event14:54:36
@reckenrode:matrix.orgRandy Eckenrode* Though having Python pulled into the stdenv is going to add it to the stdenv closure size. Darwin is already huge, so what’s another however many tens or hundreds of MiB. I don’t know about Linux.14:54:42
@reckenrode:matrix.orgRandy EckenrodeNot sure why this should be in the bootstrap tools. Can’t it be built in stage 1?14:57:12

Show newer messages


Back to Room ListRoom Version: 9