Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #389935 > unrolled thread

Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"

Started bySimon McVittie <smcv@collabora.com>
First post2025-04-16 18:50 +0200
Last post2025-08-13 16:30 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.debian.bugs.rc


Contents

  Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture" Simon McVittie <smcv@collabora.com> - 2025-04-16 18:50 +0200
    Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture" Simon McVittie <smcv@collabora.com> - 2025-04-16 21:10 +0200
      Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture" Simon McVittie <smcv@debian.org> - 2025-05-12 13:50 +0200
    Processed: Re: Bug#1103352: dxvk: FTBFS on armhf and other  non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture" "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-04-16 21:10 +0200
    Processed: Re: Bug#1103352: dxvk: FTBFS on armhf and other  non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture" "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-05-12 13:50 +0200
    Bug#1103352: marked as done (dxvk: FTBFS on armhf and other  non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture") "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-08-13 16:30 +0200

#389935 — Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"

FromSimon McVittie <smcv@collabora.com>
Date2025-04-16 18:50 +0200
SubjectBug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
Message-ID<KCe7v-dYPp-1@gated-at.bofh.it>
Source: dxvk
Version: 2.6.1-1
Severity: serious
Tags: upstream ftbfs experimental
Justification: built successfully in the past on armhf

dxvk 2.6.1 with DXVK Native enabled doesn't build successfully on armhf:

> c++ -Isrc/wsi/libwsi.a.p -Isrc/wsi -I../src/wsi -Iinclude -I../include -I../include/vulkan/include -I../include/spirv/include -Iinclude/native -I../include/native -I../include/native/windows -I../include/native/directx -I../subprojects/libdisplay-info/include -I/usr/include/SDL2 -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -Wextra -std=c++17 -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-unused-parameter -Wno-misleading-indentation -Wno-cast-function-type -Wno-unused-const-variable -Wno-missing-braces -DDXVK_WSI_SDL2 -g -O2 -ffile-prefix-map=/build/reproducible-path/dxvk-2.6.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE=1 -D_REENTRANT -MD -MQ src/wsi/libwsi.a.p/wsi_platform.cpp.o -MF src/wsi/libwsi.a.p/wsi_platform.cpp.o.d -o src/wsi/libwsi.a.p/wsi_platform.cpp.o -c ../src/wsi/wsi_platform.cpp
> In file included from ../src/wsi/../util/util_string.h:10,
>                  from ../src/wsi/../util/util_env.h:3,
>                  from ../src/wsi/wsi_platform.cpp:4:
> ../src/wsi/../util/util_bit.h:12:2: error: #error "Unknown CPU Architecture"
— https://buildd.debian.org/status/fetch.php?pkg=dxvk&arch=armhf&ver=2.6.1-1&stamp=1744304328&raw=0

A crude way to mitigate this issue would be to limit compilation of
DXVK Native to amd64, i386 and arm64 only, after which this bug could
be downgraded to wishlist until a porter steps in to help; please let me
know if you would like a MR for this. But of course ideally DXVK Native
would be portable (I don't think there's any fundamental reason why it
can't be compilable on every architecture).

There seem to be two places in the dxvk codebase that #error out if the
CPU architecture is not recognised.

1. src/util/util_bit.h

There is some conditional-compilation of this form (pseudocode):

#if (architecture is x86_64 or i386)
    #define DXVK_ARCH_X86
    #if (architecture is x86_64)
        #define DXVK_ARCH_X86_64
    #endif
#elif (architecture is aarch64)
    #define DXVK_ARCH_ARM64
#else
    #error
#endif

But all the conditional compilation further down the file seems to have a
portable "#else" fallback available, so probably it would be OK to replace
the "#error" with just not defining any of the helper macros on unrecognised
architectures?

2. src/util/sync/sync_spinlock.h

The implementation of dxvk::sync::spin calls _mm_pause() on x86, uses inline
assembly to call "yield" on aarch64, and emits a #error "Pause/Yield not
implemented for this architecture." otherwise. For this to be portable, it
would need a fallback for other architectures.

Looking at https://codesearch.debian.net/search?q=_mm_pause&literal=1
it seems that a reasonable implementation for other architectures would
be to do nothing at all (and porters can contribute an implementation
for their architecture if they want to).

    smcv

[toc] | [next] | [standalone]


#389945

FromSimon McVittie <smcv@collabora.com>
Date2025-04-16 21:10 +0200
Message-ID<KCgiZ-e0mE-5@gated-at.bofh.it>
In reply to#389935
Control: forwarded -1 https://github.com/doitsujin/dxvk/pull/4853

On Wed, 16 Apr 2025 at 17:45:32 +0100, Simon McVittie wrote:
> There seem to be two places in the dxvk codebase that #error out if the
> CPU architecture is not recognised.
> 
> 1. src/util/util_bit.h
> 2. src/util/sync/sync_spinlock.h

https://github.com/doitsujin/dxvk/pull/4853 is an untested implementation
of the "generic CPU" code path that I suggested in the bug report.

After DXVK compiles successfully, it would also become useful to apply
https://salsa.debian.org/aviau/dxvk/-/merge_requests/11, but there's little
point in applying that MR until the build would be expected to succeed.

    smcv

[toc] | [prev] | [next] | [standalone]


#391816

FromSimon McVittie <smcv@debian.org>
Date2025-05-12 13:50 +0200
Message-ID<KLzPr-2A7N-1@gated-at.bofh.it>
In reply to#389945
Control: tags -1 + pending

On Wed, 16 Apr 2025 at 19:50:46 +0100, Simon McVittie wrote:
>https://github.com/doitsujin/dxvk/pull/4853 is an untested implementation
>of the "generic CPU" code path that I suggested in the bug report.

This was applied in the packaging git repo as part of an updated
https://salsa.debian.org/aviau/dxvk/-/merge_requests/11.

     smcv

[toc] | [prev] | [next] | [standalone]


#389946 — Processed: Re: Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-04-16 21:10 +0200
SubjectProcessed: Re: Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
Message-ID<KCgiZ-e0mE-7@gated-at.bofh.it>
In reply to#389935
Processing control commands:

> forwarded -1 https://github.com/doitsujin/dxvk/pull/4853
Bug #1103352 [src:dxvk] dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
Set Bug forwarded-to-address to 'https://github.com/doitsujin/dxvk/pull/4853'.

-- 
1103352: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103352
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#391817 — Processed: Re: Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-05-12 13:50 +0200
SubjectProcessed: Re: Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
Message-ID<KLzPr-2A7N-9@gated-at.bofh.it>
In reply to#389935
Processing control commands:

> tags -1 + pending
Bug #1103352 [src:dxvk] dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
Added tag(s) pending.

-- 
1103352: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103352
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#394434 — Bug#1103352: marked as done (dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture")

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-08-13 16:30 +0200
SubjectBug#1103352: marked as done (dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture")
Message-ID<LjkEh-7hVB-1@gated-at.bofh.it>
In reply to#389935

[Multipart message — attachments visible in raw view] — view raw

Your message dated Wed, 13 Aug 2025 15:19:29 +0100
with message-id <aJye8V2_Kki0K6-C@descent>
and subject line Re: Bug#1103352: dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
has caused the Debian Bug report #1103352,
regarding dxvk: FTBFS on armhf and other non-x86 non-aarch64 architectures: #error "Unknown CPU Architecture"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1103352: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103352
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.rc


csiph-web