Package Details: pcsx2-git 2.3.119.r1.g9e21ee1bc4-1

Git Clone URL: https://aur.archlinux.org/pcsx2-git.git (read-only, click to copy)
Package Base: pcsx2-git
Description: A Sony PlayStation 2 emulator
Upstream URL: https://github.com/PCSX2/pcsx2
Licenses: GPL-3.0+
Conflicts: pcsx2
Provides: pcsx2
Submitter: alucryd
Maintainer: weirdbeard (xiota)
Last Packager: weirdbeard
Votes: 130
Popularity: 0.106238
First Submitted: 2014-03-26 14:17 (UTC)
Last Updated: 2025-01-19 15:42 (UTC)

Pinned Comments

weirdbeard commented on 2024-08-17 03:40 (UTC)

https://github.com/PCSX2/pcsx2/pull/11632

This package now enables Cmake Package mode proper. PCSX2 will here on, be installed in the package standard folders /usr/bin, /usr/share, /usr/lib. Following the XDG standard pcsx2's config files remain in .config/PCSX2

In order to ensure a proper and clean upgrade. Uninstall this package COMPLETELY and clear cache before reinstalling.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 67 Next › Last »

xmusjackson commented on 2024-06-07 01:03 (UTC) (edited on 2024-06-07 01:10 (UTC) by xmusjackson)

@xiota If you build from https://github.com/xmusjackson/pcsx2-git, do you have the same result? Note, that package doesn't require shaderc-non-semantic-debug. A linux binary should always check LD_LIBRARY_PATH then DT_RUNPATH inside the binary. I'm sure you cleared shader cache too, but patlefort is correct that there are also shaders inside .config/PCSX2/cache/.

weirdbeard commented on 2024-06-06 20:53 (UTC)

So, I just took full ownership of this package and I do fully intend to maintain it now and in the future. However, I'm also looking for a co-maintainer or two to help out if anyone would be interested or willing.

xmusjackson commented on 2024-06-06 20:23 (UTC) (edited on 2024-06-06 22:15 (UTC) by xmusjackson)

@patlefort What I'm saying is that within the comments prior to your comment, you'll see that I'm already saying that exactly. Also, I wouldn't have even said anything but you posted a huge patch to a PKGBUILD in the comments, which is generally frowned upon. You're probably right though that CMAKE_BUILD_RPATH is the correct option, it's more concise than CMAKE_INSTALL_RPATH and CMAKE_BUILD_WITH_INSTALL_RPATH since we're not actually invoking cmake install. Though when the AppImage is created, all libs and binaries have their rpath set to '$ORIGIN/../lib' upon packing using patchelf, so it may just be most straightforward to follow that method and skip the rpath during build as the package does currently. I think xiota said they weren't able to get the rpath to set properly by setting it from cmake, but by setting LDFLAGS. Either way, please try not to push back useful messages with a large patch, They become outdated quickly and take up a lot of space.

patlefort commented on 2024-06-06 20:04 (UTC)

What is there to discuss? The problem is resolved by setting DCMAKE_BUILD_RPATH.

xmusjackson commented on 2024-06-06 19:56 (UTC) (edited on 2024-06-06 20:00 (UTC) by xmusjackson)

@xiota patchelf is the method used by linuxdeploy, maybe there's a good reason. @weirdbeard, If you choose to make these changes, you could have the package print a message at the end of the install saying the mesa cache should be cleared if issues occur.

@patlefort This is what we've been discussing in the prior comments. Please read https://wiki.archlinux.org/title/Arch_User_Repository#Feedback, specifically the tip in section 4.1; Essentially don't paste PKGBUILDS or patches to them in the comment section. There are better ways to share changes you request.

patlefort commented on 2024-06-06 19:51 (UTC)

The cache that pcsx2 use is in ~/.config/PCSX2/cache/vulkan_*. If present, it might try to use what's cached and not use shaderc at all.

Using DCMAKE_BUILD_RPATH should work. (not DCMAKE_INSTALL_RPATH).

patlefort commented on 2024-06-06 18:03 (UTC)

I managed to fix the issue.

diff --git a/PKGBUILD b/PKGBUILD
index 10b6037..6dd527c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -86,14 +86,14 @@ prepare() {
         git submodule set-url "${submodule#*::}" "$srcdir"/"${submodule%::*}"
         git -c protocol.file.allow=always submodule update "${submodule#*::}"
     done
-
+
     cd 3rdparty/rapidyaml/rapidyaml
     for submodule in ext/c4core; do
         git submodule init ${submodule}
         git submodule set-url ${submodule} "${srcdir}/${submodule##*/}"
         git -c protocol.file.allow=always submodule update ${submodule}
     done
-
+
     cd ext/c4core
     for submodule in cmake src/c4/ext/{debugbreak,fast_float}; do
         git submodule init ${submodule}
@@ -117,16 +117,16 @@ build() {
     -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
     -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
     -DSHADERC_INCLUDE_DIR=/usr/lib/shaderc-non-semantic-debug/include \
-    -DSHADERC_LIBRARY=/usr/lib/shaderc-non-semantic-debug \
+    -DSHADERC_LIBRARY=/usr/lib/shaderc-non-semantic-debug/libshaderc_shared.so.1 \
     -DUSE_VULKAN=ON \
     -DENABLE_SETCAP=OFF \
-    -DCMAKE_SKIP_RPATH=ON \
     -DX11_API=ON \
     -DWAYLAND_API=ON \
     -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-    -DDISABLE_ADVANCE_SIMD=ON
+    -DDISABLE_ADVANCE_SIMD=ON \
+    -DCMAKE_BUILD_RPATH="/opt/${pkgname%-git}"
     ninja -C build
-
+
     cd pcsx2_patches
     7z a -r ../patches.zip patches/.
 }

The problem is that it wasn't finding libshaderc_shared.so.1 in /opt/pcsx2. The library is dynamically loaded with dlopen and to tell it to load in /opt/pcsx2, we have to define a rpath. Also SHADERC_LIBRARY should be the library file, but it doesn't really matter as it doesn't link at build time.