jpd002 / Play-

Play! - PlayStation2 Emulator
http://purei.org
Other
2.16k stars 263 forks source link

Build failed on riscv64. No SIMD instrinsics available for this platform. #1388

Open qyl27 opened 3 months ago

qyl27 commented 3 months ago

Quick summary

When I trying to build and package Play! for linux on riscv64 architecture, I got No SIMD instrinsics available for this platform.

System Details

Issue Details

SIMD checking might should be in runtime, but not compile?

Screenshots/Videos

Logs here:

In file included from /build/libretro-play/src/libretro-play/Source/gs/GSH_OpenGL/GSH_OpenGL_Texture.cpp:9:
/build/libretro-play/src/libretro-play/deps/Framework/build_cmake/FrameworkOpenGl/../../include/SimdDefs.h:23:2: error: #error No SIMD instrinsics available for this platform.
   23 | #error No SIMD instrinsics available for this platform.
      |  ^~~~~
[ 39%] Built target Framework_Http
[ 39%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_CodeGen_Wasm_64.cpp.o
[ 39%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_CodeGen_Wasm_Fpu.cpp.o
[ 40%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_CodeGen_Wasm_Md.cpp.o
[ 40%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_CodeGen.cpp.o
[ 40%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_CodeGenFactory.cpp.o
[ 40%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter.cpp.o
/build/libretro-play/src/libretro-play/deps/CodeGen/src/Jitter_CodeGenFactory.cpp:38:18: warning: #warning Architecture not supported [-Wcpp]
   38 |                 #warning Architecture not supported
      |                  ^~~~~~~
[ 41%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_Optimize.cpp.o
[ 41%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_RegAlloc.cpp.o
[ 41%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_Statement.cpp.o
[ 41%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/Jitter_SymbolTable.cpp.o
[ 42%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/LiteralPool.cpp.o
[ 42%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/MachoObjectFile.cpp.o
[ 42%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/MemoryFunction.cpp.o
[ 42%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/ObjectFile.cpp.o
[ 42%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/WasmModuleBuilder.cpp.o
[ 43%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/X86Assembler.cpp.o
[ 43%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/X86Assembler_Avx.cpp.o
[ 43%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/X86Assembler_Fpu.cpp.o
make[2]: *** [Source/ui_libretro/gs/GSH_OpenGL/CMakeFiles/gsh_opengl.dir/build.make:104: Source/ui_libretro/gs/GSH_OpenGL/CMakeFiles/gsh_opengl.dir/GSH_OpenGL_Texture.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 43%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/X86Assembler_Sse.cpp.o
[ 44%] Building CXX object Source/ui_libretro/Source/CodeGen/CMakeFiles/CodeGen.dir/__/src/X86CpuFeatures.cpp.o
make[1]: *** [CMakeFiles/Makefile2:794: Source/ui_libretro/gs/GSH_OpenGL/CMakeFiles/gsh_opengl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 44%] Linking CXX static library libCodeGen.a
[ 44%] Built target CodeGen
make: *** [Makefile:156: all] Error 2
make: Leaving directory '/build/libretro-play/src/build'
jpd002 commented 3 months ago

As yes, we could probably lower it down to a warning and have fallbacks for code that use the intrinsics (I think GSH_OpenGL is gonna be a problem for example).

Though unfortunately, even if you get it to compile, you won't get much further since we don't have a JIT for RISC-V.

qyl27 commented 3 months ago

Though unfortunately, even if you get it to compile, you won't get much further since we don't have a JIT for RISC-V.

Does that mean Play haven't support RISC-V?

jpd002 commented 3 months ago

Not as of now.