RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.3k stars 1.9k forks source link

[Regression] Error compiling on Fedora Linux #13893

Open r2rX opened 1 year ago

r2rX commented 1 year ago

Quick summary

Greetings,

I typically update & self-compile rpcs3 and I'd attempted to compile the latest build but it seems to fail at the 100% marker.

The last build that successfully compiled, prior to the attempt today, was v0.0.27-14986-db7f84f9.

Details

[100%] Linking CXX executable ../bin/rpcs3
/usr/bin/ld: cannot find -ljack: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [rpcs3/CMakeFiles/rpcs3.dir/build.make:476: bin/rpcs3] Error 1
make[1]: *** [CMakeFiles/Makefile2:10636: rpcs3/CMakeFiles/rpcs3.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Attached is the full 'make' log.

rpcs3_log.txt

Build with regression

After v0.0.27-14986-db7f84f9

Attach two log files

See detail attachment

Attach capture files for visual issues

No response

System configuration

Fedora 38 KDE AMD Ryzen 9 5900HX AMD Ryzen RX 6800M 32GB RAM Mesa 23.2.0-git

Other details

No response

MastaG commented 1 year ago

You need to install the required dependencies. Something like: dnf install jack-devel

r2rX commented 1 year ago

You need to install the required dependencies. Something like: dnf install jack-devel

Thanks for the feedback. The equivalent package for Fedora is pipewire-jack-audio-connection-kit-devel, which is currently installed, and has been installed for all the builds prior that compiled successfully.

This is the list of dependencies installed for rpcs3 (present on my system for a long while now): sudo dnf install alsa-lib-devel cmake glew glew-devel libatomic libevdev-devel libudev-devel openal-devel qt5-qtbase-devel qt5-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt5-qtmultimedia-devel qt5-qtsvg-devel

Attached is a full update & compilation log (in case it helps): rpcs3_log2.txt

Megamouse commented 1 year ago

you could try to go back to the last FAudio version or using system Faudio. I suspect this causes your compatibility issue.

r2rX commented 1 year ago

you could try to go back to the last FAudio version or using system Faudio. I suspect this causes your compatibility issue.

What's the best way to do this?

Megamouse commented 1 year ago

Setting -DUSE_SYSTEM_FAUDIO=ON or disabling it alltogether with -DUSE_FAUDIO=OFF probably

RipleyTom commented 1 year ago

I think it's most likely because of rtmidi submodule.

r2rX commented 1 year ago

Setting -DUSE_SYSTEM_FAUDIO=ON or disabling it alltogether with -DUSE_FAUDIO=OFF probably

Unfortunately, disabling FAudio or referring to the system version results in the same error.

r2rX commented 1 year ago

I think it's most likely because of rtmidi submodule.

If there's anything I can test for this, I'm happy and willing to.

GitArUs commented 1 year ago

On Fedora 38 original jack libraries were replaced by pipewire equivalents, but cmake cannot find them. Probably packager fault. You need to add -DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib64/pipewire-0.3/jack".

r2rX commented 1 year ago

On Fedora 38 original jack libraries were replaced by pipewire equivalents, but cmake cannot find them. Probably packager fault. You need to add -DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib64/pipewire-0.3/jack".

Nice find! That worked! So is this something that should be reported to the Fedora packager for the pipewire-jack-connection-kit & devel package?

GitArUs commented 1 year ago

I'm not sure. pkgconfig file (jack.pc) looks ok for me. When I look at verbose cmake output (with --trace-expand), it shows that proper options from pkgconfig file are found (-L/usr/lib64/pipewire-0.3/jack -ljack). I don't know why those are missing from final linker command.

r2rX commented 1 year ago

I'm not sure. pkgconfig file (jack.pc) looks ok for me. When I look at verbose cmake output (with --trace-expand), it shows that proper options from pkgconfig file are found (-L/usr/lib64/pipewire-0.3/jack -ljack). I don't know why those are missing from final linker command.

If compiling depends on GCC, it is likely due to the upgrade of GCC in Fedora 38. There are a few other projects that seem to be affected with linker issues due to the upgrade.

Edit: At the same time, the last build I compiled, prior to this issue, was on Fedora 38 w/ GCC 13. However, there was a 13.x updated not too long ago so perhaps it started there.

Edit 2: Compiling with gcc 12.2.0 works without any errors.

r2rX commented 1 year ago

Quick update:

At this point in time, I have to compile with -DCMAKE_EXE_LINKER_FLAGS="-L/usr/lib64/pipewire-0.3/jack" irrespective of the GCC compiler version used. More importantly, compiling with GCC 13 and above results in no sound produced. Compiling with GCC 12 produces sound.

MastaG commented 1 year ago

Ah so the solution is to compile with GCC12. I was already wondering why many games didn't have working audio.. or just partially.

EDIT: Building with clang instead of gcc13 fixes audio! CC=clang CXX=clang++ cmake ...