-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build with gcc6 #1691
Comments
try "using std::exp2;" in that function? |
I feel dumb, yes #include math.h and std:: seem to work. rpcs3/rpcs3/Emu/Cell/SPUOpcodes.h: In constructor ‘spu_decoder<D, T>::spu_decoder() [with D = spu_itype::type; T = unsigned int spu_itype::type::]’: |
Better report the compiler bug, otherwise the only way is to adjust code/narrow down the cause of the crash and rewrite the code so it won't trigger the crash. |
I've reported it to the GCC team, we'll see how that goes. |
It has been accepted as a regression. |
I was given a patch that fixes the GCC segfault, I believe that patch will be part of 6.2 but I'm still hoping for 6.1.2 or so. With that I was able to fix the rest of build issues and create a pull request for it. |
@John-Gee care to post GCC bug report link? |
Here's one: |
And it's fixed in GCC 6.2! |
Hello,
When I build on Linux with gcc6 it errors on this:
In file included from rpcs3-git/src/rpcs3/rpcs3/Emu/CPU/CPUThread.cpp:6:0:
rpcs3-git/src/rpcs3/rpcs3/Emu/Cell/SPUThread.h:379:31: warning: ignoring attributes on template argument ‘__m128 {aka __vector(4) float}’ [-Wignored-attributes]
std::array<__m128, 155 + 174> m_data;
^
rpcs3-git/src/rpcs3/rpcs3/Emu/Cell/SPUThread.h: In constructor ‘spu_imm_table_t::scale_table_t::scale_table_t()’:
rpcs3-git/src/rpcs3/rpcs3/Emu/Cell/SPUThread.h:386:60: error: ‘exp2’ was not declared in this scope
m_data[i + 155] = _mm_set1_ps(static_cast(exp2(i)));
^
rpcs3/CMakeFiles/rpcs3.dir/build.make:2051: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/Emu/CPU/CPUThread.cpp.o' failed
make[2]: *** [rpcs3/CMakeFiles/rpcs3.dir/Emu/CPU/CPUThread.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:607: recipe for target 'rpcs3/CMakeFiles/rpcs3.dir/all' failed
make[1]: *** [rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I am guessing it is related to this change in gcc:
Header <math.h> changes
The C++ library now provides its own <math.h> header that wraps the C library header of the same name. The C++ header defines additional overloads of some functions and ensures that all standard functions are defined as real functions and not as macros. Code which assumes that sin, cos, pow, isfinite etc. are macros may no longer compile.
https://gcc.gnu.org/gcc-6/porting_to.html
Unfortunately I have been unable to find a way to workaround this.
I hope someone else knows better.
The text was updated successfully, but these errors were encountered: