Howto: Get the PPA builds working on x86_64 Void Linux (and probably other distros)
#1
Brick 
Motivation: my distribution (Void Linux) packages the stable version of pcsx2, which is old and slow compared to the dev/git versions. I've been having difficulty compiling a newer version due to various cmake and cross-architecture (32-bit x86 on x86_64) nightmares. 

This leaves the options of (1) running PCSX2 under wine (preferably avoided) and (2) trying to run one of the pre-compiled PCSX2 builds from the PPAs.  This guide covers the latter option.

Resulting gaming quality: Everything I have tried so far works; and it has been a much faster/better experience than running the stable version from my distro's packages.

Disclaimer: The methods described in this guide are total and complete hacks; you should beware of the possible risks.  Notably:

(1) You generally shouldn't manually install things into /usr/share and /usr/lib, these directories are normally managed by your package manager.  Your package manager might complain later. 
(2) Symlinking libraries arbitrarily may cause problems with future programs and/or automagic package manager library-arrangement-foo (depending on your distro).  
(3) To keep things tidy you shouldn't mix 32-bit and 64-bit files and folders.

You need to keep a list of the changes you make here so that you can undo them later if any problems surface.  Luckily the list of changes is quite small, so everything is easy to undo.

Howto

(1) Read and understand the section above this.  I know you skipped it, I could feel the framedrop from here.  

(2) Download the latest pcsx2-unstable-*.deb file from the PCSX PPA:

http://ppa.launchpad.net/pcsx2-team/pcsx....snapshot/

Sidenote: You don't want:
  • Anything with 'dbg' (debug) in its name
  • The source code ('snapshot' in the name)
If you download the wrong file then it won't have a 'usr' folder inside of it (see next step).

(3) Extract this .deb somewhere.

.deb files are typically .tar.gz (or similar) compressed files with a few alterations.  Most archive programs should be able to open them.

The folder you will want to extract is 'usr'.  This contains all of the emulator files and libraries.

(4) Copy the contents of this folder to your system.

This is the minimum I've found I could get away with:
Code:
cp -rv /home/valentine/app/pcsx2/usr/games/* /usr/local/bin/     (you may need to create /usr/local/bin first)
cp -rv /home/valentine/app/pcsx2/usr/lib/games/ /usr/lib/
cp -rv /home/valentine/app/pcsx2/usr/share/games /usr/share/

Optionally (for translations):
Code:
cp -rv /home/valentine/app/pcsx2/usr/share/locale/* /usr/share/locale/

(5) Run the emulator, looking for broken shared libraries:

Code:
PCSX2 --console

   

Some errors will only appear when you get to the plugin configuration dialog (either manually or via the first-time-user wizard).  I found that my GS plugin was not listed due to these problems:

   

(6) Work out how to get these shared libraries.

You distro's package manager should allow you to install them somehow.  If you are already on a 32 bit OS then this will be easier.

If you are on x86_64 (likely): you will need to research how to install 32 bit libraries on your distro.  Every distro does it differently.  In Void's case you have to install 'void-repository-multilib' first for 32-bit packages to become available.

Notable libraries you will need: libgtk+ (libgtk2), wxwidgets, libsdl, libjpeg (libjpeg-turbo or sim), mesa/glx/similar (opengl).  An approximate list of the -dev versions is on the Linux compilation guide; however the PCSX2 binary should tell you the names of any that are still missing from your system when you try to run it.

Whilst I was able to obtain most libraries from my package manager, there were two that I could not: libOpenGL.so.0 and libGLX.so.0

As it turns out: the functions that both of these shared libraries provide (inspectable using 'nm -D' on a copy of these files manually downloaded from Debian's repositories) are instead provided by a different shared library on my distro.

In my case the fix was:

Code:
sudo ln -s /usr/lib32/libGL.so /usr/lib32/libGLX.so.0
sudo ln -s /usr/lib32/libGL.so /usr/lib32/libOpenGL.so.0

(7) Restart the emulator, see if there are any further shared lib issues.  Rinse and repeat until they all disappear.

(8) Enjoy a working and up-to-date copy of PCSX2.  Kiss slowdowns and framedrops goodbye.  Just don't stare directly at any new bugs

Undoing these changes

(1) Remove the files/folders you copied. 
(2) Remove any symlinks you made to fix library issues.
(3) Leave any package you have installed alone; they shouldn't cause you any issues.

My distro (Void) does not use the /usr/games or /usr/*/games folders; so I don't have much worry about leaving those.  My main concerns are the symlinks in /usr/lib32/; which could confuse my package manager at a later date if a package decides to use those filenames again.

How would I do things "properly"?

Use 'debootstrap' to install a whole 32-bit debian system into a folder, and chroot into that.  That will provide a semi-isolated environment that you can install all of the correct libraries and bits in.

Unfortunately this is a lot more complicated and might require libGL hacks anyway to interface properly with your host system anyway.  YMMV, but in the long term I find simpler options always cause less trouble than the more complicated ones.

Questions and concerns

Please ask Smile
Reply

Sponsored links





Users browsing this thread: 1 Guest(s)