rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Regression] Error compiling on Fedora Linux

Open r2rX opened this issue 1 year ago • 12 comments

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

r2rX avatar May 19 '23 19:05 r2rX

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

MastaG avatar May 20 '23 00:05 MastaG

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

r2rX avatar May 20 '23 15:05 r2rX

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

Megamouse avatar May 20 '23 15:05 Megamouse

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?

r2rX avatar May 20 '23 15:05 r2rX

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

Megamouse avatar May 20 '23 15:05 Megamouse

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

RipleyTom avatar May 20 '23 15:05 RipleyTom

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 avatar May 20 '23 16:05 r2rX

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.

r2rX avatar May 20 '23 16:05 r2rX

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".

GitArUs avatar May 23 '23 07:05 GitArUs

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?

r2rX avatar May 23 '23 09:05 r2rX

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.

GitArUs avatar May 23 '23 17:05 GitArUs

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 avatar May 23 '23 17:05 r2rX

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.

r2rX avatar Aug 16 '23 20:08 r2rX

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 ...

MastaG avatar Aug 17 '23 09:08 MastaG