Open Linskun opened 3 years ago
std::lerp
, I was worried that might not compile on Linux. Luckily cmath
seems to contain lerp for Linux. This commit should fix the other problems too,
https://github.com/shiiion/Ishiiruka/commit/81b9fcf39b515c6aa2b55f91d78fba44c9bc4a03
Tried but i have the same
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/FpsControls.cpp:631:18: error: ‘lerp’ is not a member of ‘std’
631 | pitch = std::lerp(start_pitch, 0.f, delta / 15.f);
| ^~~~
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3059: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/FpsControls.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
You may need to compile with a later version of C++. std::lerp was only added in C++20. I'll look into this more later, there may be a built in function for it in Dolphin like there is for Qt.
Tried with clang++ but it stop immediately with error
[user@Arch Build]$ make
Scanning dependencies of target bdisasm
[ 0%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/dis_decode.cc.o
[ 0%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/dis_groups.cc.o
[ 1%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/resolve.cc.o
[ 1%] Building CXX object Externals/Bochs_disasm/CMakeFiles/bdisasm.dir/syntax.cc.o
[ 1%] Linking CXX static library libbdisasm.a
[ 1%] Built target bdisasm
Scanning dependencies of target glslang
[ 1%] Building CXX object Externals/glslang/CMakeFiles/glslang.dir/glslang/GenericCodeGen/CodeGen.cpp.o
In file included from /home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/CodeGen.cpp:35:
In file included from /home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/Common.h:95:
/home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/PoolAlloc.h:315:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
void setAllocator(TPoolAllocator* a) { allocator = *a; }
~~~~~~~~~ ^ ~~
/home/user/Games/primehack-ishiiruka/Externals/glslang/glslang/GenericCodeGen/../Include/PoolAlloc.h:244:21: note: declared private here
TPoolAllocator& operator=(const TPoolAllocator&); // don't allow assignment operator
^
1 error generated.
make[2]: *** [Externals/glslang/CMakeFiles/glslang.dir/build.make:82: Externals/glslang/CMakeFiles/glslang.dir/glslang/GenericCodeGen/CodeGen.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:742: Externals/glslang/CMakeFiles/glslang.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
I found this issue on Dolphin-emu bugtracker : Emulator Issues #12032
Trouble is, this is the PrimeHack-Ishiiruka repository, Ishiiruka is a fork of dolphin which is pretty old by a few years. You'd have to talk to the maintainers for Ishiiruka about stuff not relevant to PrimeHack.
Have you ensured you're compiling with C++20?
This should resolve the problem: https://github.com/shiiion/Ishiiruka/commit/2a67e9e58606c57ee23b5c409464c6130cd090fc
Happy new Year !
I'm using the latest version of GCC & CLANG I've checked on CMakeLists.txt and found that it check for CXX17 and pass -std=c++17. For C++20 shouldn't it check the CXX20 support and pass -std=c++20 parameter ?
Ok now i don't have anymore problem on FPSControl.cpp.o but it give me another error :
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_1’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3_STANDALONE’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2_GCN’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MAX_VAL’ not handled in switch [-Wswitch]
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp: In member function ‘std::optional<std::__cxx11::basic_string<char> > prime::ElfModLoader::parse_elfpath(const string&, const string&)’:
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:191:42: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<wchar_t>’ requested
191 | std::wstring tmp = search_name.native();
| ~~~~~~~~~~~~~~~~~~^~
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3124: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/ElfModLoader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
Another info that i forgot to report : i use GCC 10.2 that is the latest version on Linux. The G++20 std::lerp was introduced with GCC9 so i'm full compliant with it (see the changelog here ) So i think that the CMakeFile don't pass the correct flag for C++20 when compiler different that MSVC is found
Happy new Year !
I'm using the latest version of GCC & CLANG I've checked on CMakeLists.txt and found that it check for CXX17 and pass -std=c++17. For C++20 shouldn't it check the CXX20 support and pass -std=c++20 parameter ?
Ok now i don't have anymore problem on FPSControl.cpp.o but it give me another error :
/home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_1’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MENU_PRIME_2’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_1’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_3_STANDALONE’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘PRIME_2_GCN’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:89:10: warning: enumeration value ‘MAX_VAL’ not handled in switch [-Wswitch] /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp: In member function ‘std::optional<std::__cxx11::basic_string<char> > prime::ElfModLoader::parse_elfpath(const string&, const string&)’: /home/user/Games/primehack-ishiiruka/Source/Core/Core/PrimeHack/Mods/ElfModLoader.cpp:191:42: error: conversion from ‘basic_string<char>’ to non-scalar type ‘basic_string<wchar_t>’ requested 191 | std::wstring tmp = search_name.native(); | ~~~~~~~~~~~~~~~~~~^~ make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:3124: Source/Core/Core/CMakeFiles/core.dir/PrimeHack/Mods/ElfModLoader.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1148: Source/Core/Core/CMakeFiles/core.dir/all] Error 2 make: *** [Makefile:171: all] Error 2
im getting the same error here on manjaro linux
New compile error with the new commit ad3d542
Here the last log :
primehack-ishiiruka_compile_error_2.log
Software information OS: Arch Linux x86_64 Resolution: 1920x1080 Dm/Wm: GNOME gcc (GCC) 10.2.0
System information