Closed mateusza closed 7 months ago
I updated the original issue, it seems it's actually not AVX but AVX2
As a workaround I downgraded to 0.80.0
and it works fine
I think this may be a consequence of the new release requiring features found only in newer hardware.
Your CPU was after all released in Q4'11, more than 12 years ago.
I think your best bet, other then upgrading your hardware or running an old release, is to ask the question on the github page or discord server of dosbox staging itself.
SSSE3 is now required that was first available on Intel Core 2 CPUs released in 2006. Not sure whats happening here but you could try compiling it yourself from scratch and see if that helps.
Your best option, is to stick with 0.80. You can roll back to an older version like this:
https://github.com/flatpak/flatpak/issues/3097#issuecomment-530583469
And then you can use flatpak mask
to prevent it from updating
Here are the commands:
$ flatpak install flathub io.github.dosbox-staging
$ sudo flatpak update --commit=2650be3f5701bd0856a96361c4caa9673640c0ca097c8532de99957610a5a07b io.github.dosbox-staging
$ sudo flatpak mask io.github.dosbox-staging
Should we add this to the readme?
I ran into this issue on an AMD Athlon 5350 (has AVX but not AVX2). Using objdump
on the binary, it's not just AVX2 but also other instructions from x86-64-v3 as though -march=x86-64-v3
was specified.
Trying a build of the upstream source with the same config options -Dbuildtype=release -Ddefault_library=shared
, it indicates the built-in zlib-ng is used:
Build Summary
Build type : release
Install prefix : /usr/local
SIMD instruction sets : SSE2, SSSE3
Host page size (bytes): 4096
zlib-ng provider : built-in
zlib provider : built-in (zlib-ng)
and checking build.ninja
, ARGS
includes -march=native
.
Building on an AMD Ryzen 5 2400G (which supports x86-64-v3), the resulting binary does indeed use instructions from that microarchitecture level such as AVX2.
In meson_options
:
# The meson.build either uses zlib-ng if its found as a system library or
# compiles it as a built-in (provided CMake is available and Meson is at
# least version 1.3.0), in that order.
#
# The built-in will use native SIMD instructions by default, however if you're
# targeting a range of hardware then set this to the most conservative set of
# SIMD instructions for your needs. For example, if you want to be sure your
# binary runs on Intel's Core 2 Duo, set: meson setup -Duse_zlib_ng=sse2,ssse3
so adding -Duse_zlib_ng=sse2,ssse3
as suggested restricts the binary to SSSE3.
It appears this bit in meson.build
:
if is_optimized_buildtype and zlib_ng_is_native
extra_flags += '-march=native'
simd_instruction_sets += 'native'
message('Enabling native SIMD optimizations')
endif
results in -march=native
added to the general build flags and affects all files, not just zlib-ng.
Options would be:
-Duse_zlib_ng=sse2,ssse3
: Restrict it to Core 2 and newer-Duse_zlib_ng=sse2
: Any x86-64 processor, including Pentium 4, Athlon 64, and Phenom.@jonathan-teh Thanks for delving into this. I've prepared a test version that hopefully works well on older hardware: https://github.com/flathub/io.github.dosbox-staging/pull/45
@mateusza If you have any time, please let me know if this package works for you:
flatpak install --user https://dl.flathub.org/build-repo/84198/io.github.dosbox-staging.flatpakref
@mateusza If you have any time, please let me know if this package works for you:
flatpak install --user https://dl.flathub.org/build-repo/84198/io.github.dosbox-staging.flatpakref
This one works!
I have updated to following version of Dosbox-staging:
My CPU is:
Dosbox staging fails to start:
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2