• Re: Bug#1105110: python3.14 FTBFS on m68k: Assertion `!PyStackRef_IsTag

    From John Paul Adrian Glaubitz@21:1/5 to John Klos on Mon May 12 19:10:01 2025
    Hi,

    On Mon, 2025-05-12 at 16:58 +0000, John Klos wrote:
    They don't care about this patch. I will switch the default alignment to
    4 bytes in the following months since it makes absolutely no sense to
    use an alignment which contradicts the official SysV ABI documentation.

    Why couldn't the alignment be changed along with the ABI change for 64 bit time?

    https://wiki.debian.org/ReleaseGoals/64bit-time

    Because lots of people were fighting it and I am therefore still collecting data points to justify the alignment change. That's why I created the WIP
    wiki page.

    I will add more information to this page. One important data point is that there was an unintentional ABI breakage on s390x at some point where they
    still went aheadwith.

    FWIW, NetBSD uses 4 bytes alignment on m68k which means they don't have to rely
    on constantly having to patch projects to build with 2 byte alignment.

    Even the sun2 port, which is for the m68010 (an actual machine which might benefit from a 2 byte alignment) uses 4 byte alignment in NetBSD.

    Well, the official SysV ELF ABI by AT&T uses 4 byte alignment, so I would expect
    any *nix flavor which adheres to the official specification to use 4 byte alignment.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Klos@21:1/5 to All on Mon May 12 19:50:01 2025
    Hello,

    They don't care about this patch. I will switch the default alignment to
    4 bytes in the following months since it makes absolutely no sense to
    use an alignment which contradicts the official SysV ABI documentation.

    Why couldn't the alignment be changed along with the ABI change for 64 bit time?

    https://wiki.debian.org/ReleaseGoals/64bit-time

    FWIW, NetBSD uses 4 bytes alignment on m68k which means they don't have to rely
    on constantly having to patch projects to build with 2 byte alignment.

    Even the sun2 port, which is for the m68010 (an actual machine which might benefit from a 2 byte alignment) uses 4 byte alignment in NetBSD.

    John Klos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Finn Thain@21:1/5 to John Klos on Tue May 13 03:30:01 2025
    On Mon, 12 May 2025, John Klos wrote:


    Even the sun2 port, which is for the m68010 (an actual machine which
    might benefit from a 2 byte alignment) uses 4 byte alignment in NetBSD.


    The price that NetBSD pays for 4-byte alignment is a drop in data
    locality, plus the memory cost of larger structs. Note that the data cache
    on a 68030 is only 256 bytes.

    Those who run Debian/m68k on qemu-system-m68k -M virt won't notice that
    cost. But neither would they notice the cost of simply switching their
    emulated VMs to a different Debian architecture with an ABI more to their taste, like powerpc.

    IOW, if the Linux/m68k ABI doesn't suit Debian porters, that's okay. The
    other side of the coin is that the Debian package archive no longer fits
    m68k hardware (which is why porters rely on emulation).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geert Uytterhoeven@21:1/5 to glaubitz@physik.fu-berlin.de on Tue May 13 10:00:01 2025
    Hi Adrian,

    On Mon, 12 May 2025 at 19:01, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
    Well, the official SysV ELF ABI by AT&T uses 4 byte alignment, so I would expect
    any *nix flavor which adheres to the official specification to use 4 byte alignment.

    Just wondering, does Amiga Unix SVR4 ("AMIX") follow this?

    Gr{oetje,eeting}s,

    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Geert Uytterhoeven on Tue May 13 10:30:02 2025
    Hi Geert,

    On Tue, 2025-05-13 at 09:55 +0200, Geert Uytterhoeven wrote:
    On Mon, 12 May 2025 at 19:01, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
    Well, the official SysV ELF ABI by AT&T uses 4 byte alignment, so I would expect
    any *nix flavor which adheres to the official specification to use 4 byte alignment.

    Just wondering, does Amiga Unix SVR4 ("AMIX") follow this?

    I can try to ask the Amiga community if they can run the test program on AMIX.

    Does AMIX use ELF or a.out?

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geert Uytterhoeven@21:1/5 to glaubitz@physik.fu-berlin.de on Tue May 13 10:40:01 2025
    Hi Adrian,

    On Tue, 13 May 2025 at 10:21, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
    On Tue, 2025-05-13 at 09:55 +0200, Geert Uytterhoeven wrote:
    On Mon, 12 May 2025 at 19:01, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
    Well, the official SysV ELF ABI by AT&T uses 4 byte alignment, so I would expect
    any *nix flavor which adheres to the official specification to use 4 byte alignment.

    Just wondering, does Amiga Unix SVR4 ("AMIX") follow this?

    I can try to ask the Amiga community if they can run the test program on AMIX.

    Does AMIX use ELF or a.out?

    Dunno, probably ELF, as ELF originated on SVR4.

    Gr{oetje,eeting}s,

    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Geert Uytterhoeven on Tue May 13 22:20:01 2025
    Hi Geert,

    On Tue, 2025-05-13 at 10:35 +0200, Geert Uytterhoeven wrote:
    Well, the official SysV ELF ABI by AT&T uses 4 byte alignment, so I would expect
    any *nix flavor which adheres to the official specification to use 4 byte alignment.

    Just wondering, does Amiga Unix SVR4 ("AMIX") follow this?

    I can try to ask the Amiga community if they can run the test program on AMIX.

    Does AMIX use ELF or a.out?

    Dunno, probably ELF, as ELF originated on SVR4.

    There is a guide available which explains how to install AMIX on WinUAE:

    https://www.amigaunix.com/doku.php/installation

    https://oldosplayground.blogspot.com/2018/01/amiga-unix-amix-21-installation.html

    I will try that later this week. I'm really curios to learn whether they're using ELF with 4 bytes alignment.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Wed May 14 09:00:02 2025
    Hi Geert,

    On Tue, 2025-05-13 at 22:08 +0200, John Paul Adrian Glaubitz wrote:
    There is a guide available which explains how to install AMIX on WinUAE:

    https://www.amigaunix.com/doku.php/installation

    https://oldosplayground.blogspot.com/2018/01/amiga-unix-amix-21-installation.html

    I will try that later this week. I'm really curios to learn whether they're using ELF with 4 bytes alignment.

    I have kicked off the installation of AMIX 2.1 on WinUAE now.

    It actually looks very streamlined and user-friendly ;-).

    Let's see if I can get to compile the sample program and see what the alignment says.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Wed May 14 09:50:01 2025
    Hi Geert,

    On Wed, 2025-05-14 at 08:55 +0200, John Paul Adrian Glaubitz wrote:
    On Tue, 2025-05-13 at 22:08 +0200, John Paul Adrian Glaubitz wrote:
    There is a guide available which explains how to install AMIX on WinUAE:

    https://www.amigaunix.com/doku.php/installation

    https://oldosplayground.blogspot.com/2018/01/amiga-unix-amix-21-installation.html

    I will try that later this week. I'm really curios to learn whether they're using ELF with 4 bytes alignment.

    I have kicked off the installation of AMIX 2.1 on WinUAE now.

    It actually looks very streamlined and user-friendly ;-).

    Let's see if I can get to compile the sample program and see what the alignment says.

    So, it turns out that AMIX 2.1 uses ELF binaries and indeed 4 bytes alignment.

    See the screenshot here: https://people.debian.org/~glaubitz/amix-alignment.jpeg

    Please excuse the messed up formatting, I couldn't type backslashes.

    Thanks for suggesting to test AMIX, that information is very valuable.

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Laurent Vivier on Wed May 14 10:50:01 2025
    Hi Laurent,

    On Wed, 2025-05-14 at 10:10 +0200, Laurent Vivier wrote:
    You can use __alignof__() to have the data type alignment:

    int main(void)
    {
    printf("alignof(short) %ld\n", __alignof__(short));
    printf("alignof(int) %ld\n", __alignof__(int));
    printf("alignof(long) %ld\n", __alignof__(long));
    printf("alignof(long long) %ld\n", __alignof__(long long));
    }

    On x86_64, it gives:

    alignof(short) 2
    alignof(int) 4
    alignof(long) 8
    alignof(long long) 8

    Is alignof() supported in ancient versions of GCC and the Sun compiler?

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Laurent Vivier on Wed May 14 11:20:02 2025
    Hi,

    On Wed, 2025-05-14 at 11:00 +0200, Laurent Vivier wrote:
    Since GCC 2.x (1992)

    https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC89

    It's a gcc extension.

    For other compilers, we need to use _Alignof() from C11.

    Okay, so it wouldn't work with Amiga Unix 2.1 then since it ships GCC 1.40.5. ;-)

    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)