Artix Linux => Applications & Software => Topic started by: kenny_w on 04 July 2019, 00:10:37
Title: PCSX2 compile with GCC-8 or -7
Post by: kenny_w on 04 July 2019, 00:10:37
Hey guys, I am trying to figure out how to compile PCSX2 with an older GCC. It doesn't compile with GCC9, it segfaults which is a known issue. currently no fixes on the AUR for it.
I tried to do (I tried CC=/usr/bin/gcc-8 only at first)
-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/gcc-8 -- Check for working C compiler: /usr/bin/gcc-8 -- broken CMake Error at /usr/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler
Run Build Command(s):/usr/bin/make cmTC_f73b0/fast /usr/bin/make -f CMakeFiles/cmTC_f73b0.dir/build.make CMakeFiles/cmTC_f73b0.dir/build make[1]: Entering directory '/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o /usr/bin/gcc-8 -m32 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -o CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o -c /home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_f73b0 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f73b0.dir/link.txt --verbose=1 /usr/bin/gcc-8 -m32 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o -o cmTC_f73b0 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc_s.so.1 when searching for libgcc_s.so.1 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_f73b0.dir/build.make:87: cmTC_f73b0] Error 1 make[1]: Leaving directory '/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC_f73b0/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred! See also "/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeOutput.log". See also "/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeError.log".
and yes I have googled this! I'm not really sure why its failing still though. I know I am doing something wrong, but how is the question. I have tried different variations of CC= CXX= but maybe I haven't come upon the right ones
Title: Re: PCSX2 compile with GCC-8 or -7
Post by: ####### on 04 July 2019, 05:16:24
I had a similar error trying to build bluez-ps3 with gcc-5, it meant the gcc binary was too old compared to the installed version of binutils which supplies the ld command, downgrading binutils might fix it. But the current advice from the PCSX2 devs themselves is to patch gcc 9 : https://github.com/PCSX2/pcsx2/commit/43981f5981b0c5578af2243b3db26f0cdb1a1bbd (https://github.com/PCSX2/pcsx2/commit/43981f5981b0c5578af2243b3db26f0cdb1a1bbd)
Or possibly you could try modifying the PKGBUILD to build with clang / llvm as that is supposedly supported by PCSX2 as well.
Scanning dependencies of target x86emitter [ 18%] Building CXX object common/src/x86emitter/CMakeFiles/x86emitter.dir/bmi.cpp.o [ 19%] Building CXX object common/src/x86emitter/CMakeFiles/x86emitter.dir/cpudetect.cpp.o /home/me/artix/makepkg/pcsx2/test2/src/pcsx2/common/src/x86emitter/cpudetect.cpp:68:5: error: always_inline function '_fxsave' requires target feature 'xsave', but would be inlined into function 'SIMD_EstablishMXCSRmask' that is compiled without support for 'xsave' _fxsave(&targetFXSAVE); ^ 1 error generated. make[2]: *** [common/src/x86emitter/CMakeFiles/x86emitter.dir/build.make:76: common/src/x86emitter/CMakeFiles/x86emitter.dir/cpudetect.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:279: common/src/x86emitter/CMakeFiles/x86emitter.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...
Title: Re: PCSX2 compile with GCC-8 or -7
Post by: nous on 04 July 2019, 20:33:05
Hey guys, I am trying to figure out how to compile PCSX2 with an older GCC. It doesn't compile with GCC9, it segfaults which is a known issue. currently no fixes on the AUR for it.
I tried to do (I tried CC=/usr/bin/gcc-8 only at first)
-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/gcc-8 -- Check for working C compiler: /usr/bin/gcc-8 -- broken CMake Error at /usr/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler
Run Build Command(s):/usr/bin/make cmTC_f73b0/fast /usr/bin/make -f CMakeFiles/cmTC_f73b0.dir/build.make CMakeFiles/cmTC_f73b0.dir/build make[1]: Entering directory '/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o /usr/bin/gcc-8 -m32 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -o CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o -c /home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_f73b0 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f73b0.dir/link.txt --verbose=1 /usr/bin/gcc-8 -m32 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/cmTC_f73b0.dir/testCCompiler.c.o -o cmTC_f73b0 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc_s.so.1 when searching for libgcc_s.so.1 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_f73b0.dir/build.make:87: cmTC_f73b0] Error 1 make[1]: Leaving directory '/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC_f73b0/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred! See also "/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeOutput.log". See also "/home/kz/Compiles/pcsx2-emu-fresh/src/pcsx2/build/CMakeFiles/CMakeError.log".
and yes I have googled this! I'm not really sure why its failing still though. I know I am doing something wrong, but how is the question. I have tried different variations of CC= CXX= but maybe I haven't come upon the right ones
Is gcc8-libs installed?
Title: Re: PCSX2 compile with GCC-8 or -7
Post by: kenny_w on 07 July 2019, 18:30:43
Yes Nous, gcc8-libs is installed... and if clang don't work, then I'm really lost, oh well... How do we patch GCC9? O_o