..:: PCSX2 Forums ::..

Full Version: PCSX2 for Fedora
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Hum I think the warning because I do not use the variable but only it status (which is not the best but that not so important Wink )
I'm experimenting with the shell script to open pcsx2 with LD_PRELOAD options.
I noticed you had modified the launch_pcsx2_linux.sh script to include an LD_PRELOAD option. Unfortunately this gets kicked out with an error without loading the gsdx plugin on startup:

Code:
Loading plugins...
    Binding GS    : /home/giles/pcsx2-read-only/bin/plugins/libGSdx-0.1.16.so
(pxActionEvent) (LoadSinglePluginEvent) The configured GS plugin file is not a valid dynamic library(LoadCorePlugins)

/home/giles/pcsx2-read-only/bin/plugins/libGSdx-0.1.16.so
(GameDB) 9535 games on record (loaded in 854ms)
[wx] libpcsx2_SDL.so: cannot open shared object file: No such file or directory
Path: /home/giles/pcsx2-read-only/bin/plugins/libonepad-1.1.0.so
File is not a valid dynamic library.
Some kinda plugin failure: /home/giles/pcsx2-read-only/bin/plugins/libonepad-1.1.0.so
[wx] libpcsx2_SDL.so: cannot open shared object file: No such file or directory
Path: /home/giles/pcsx2-read-only/bin/plugins/libGSdx-0.1.16.so
File is not a valid dynamic library.
File is not a PCSX2 pluginPath: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so
Some kinda plugin failure: /home/giles/pcsx2-read-only/bin/plugins/libGSdx-0.1.16.so
Some kinda plugin failure: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so

Loading plugins...
    Binding GS    : /home/giles/pcsx2-read-only/bin/plugins/libzzogl-0.3.0.so
    Binding PAD    : /home/giles/pcsx2-read-only/bin/plugins/libPADnull.so
    Binding SPU2    : /home/giles/pcsx2-read-only/bin/plugins/libSPU2null.so
    Binding CDVD    : /home/giles/pcsx2-read-only/bin/plugins/libCDVDnull.so
    Binding USB    : /home/giles/pcsx2-read-only/bin/plugins/libUSBnull-0.7.0.so
    Binding FW    : /home/giles/pcsx2-read-only/bin/plugins/libFWnull-0.7.0.so
    Binding DEV9    : /home/giles/pcsx2-read-only/bin/plugins/libdev9null-0.5.0.so
Plugins loaded successfully.


Initializing plugins...
    Init GS
    Init PAD
    Init SPU2
    Init CDVD
    Init USB
    Init FW
    Init DEV9
Plugins initialized successfully.

User-canceled plugin configuration; Plugins not loaded!

Calling the LD_PRELOAD option directly through a shell script works, but the console kicks out an error each time when the gsdx plugin is called:

Code:
#!/bin/sh -e

#wrapper for PCSX2 executable to ensure modified SDL library is loaded
LD_PRELOAD="/home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so" ~/pcsx2-read-only/bin/pcsx2

....


File is not a PCSX2 pluginPath: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so
Some kinda plugin failure: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so

Loading plugins...
    Binding GS    : /home/giles/pcsx2-read-only/bin/plugins/libGSdx-0.1.16.so
    Binding PAD    : /home/giles/pcsx2-read-only/bin/plugins/libPADnull.so
    Binding SPU2    : /home/giles/pcsx2-read-only/bin/plugins/libSPU2null.so
    Binding CDVD    : /home/giles/pcsx2-read-only/bin/plugins/libCDVDnull.so
    Binding USB    : /home/giles/pcsx2-read-only/bin/plugins/libUSBnull-0.7.0.so
    Binding FW    : /home/giles/pcsx2-read-only/bin/plugins/libFWnull-0.7.0.so
    Binding DEV9    : /home/giles/pcsx2-read-only/bin/plugins/libdev9null-0.5.0.so
Plugins loaded successfully.


Initializing plugins...
    Init GS
    Init PAD
    Init SPU2
    Init CDVD
    Init USB
    Init FW
    Init DEV9
Plugins initialized successfully.

File is not a PCSX2 pluginPath: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so
Some kinda plugin failure: /home/giles/pcsx2-read-only/bin/plugins/libpcsx2_SDL.so
HLE Notice: ELF does not have a path.

Opening plugins...
    Opening GS
    Opening PAD
    Opening SPU2
    Opening CDVD
isoFile open ok: /home/giles/Thunder_Force_VI.iso
    Image type  = DVD
    Fileparts   = 1
* CDVD Disk Open: DVD, Single layer or unknown:
* * Track 1: Data (Mode 1) (928944 sectors)
    Opening USB
    Opening FW
    Opening DEV9
McdSlot 0: /home/giles/pcsx2-read-only/bin/memcards/Mcd001.ps2
McdSlot 1: /home/giles/pcsx2-read-only/bin/memcards/Mcd002.ps2
Plugins opened successfully.

I don't suppose this matters much in the big scheme of things, as I'll compile the target pcsx2 binary to a fixed place in fedora, so won't need a complex script to launch it, but in the interests of everything eventually being clean and tidy, I wonder if it is possible to prevent pcsx2 having an error on detecting the sdl library?
Hmmm. Think I must have broken the build with my patch. When I try to compile the rpm, the build stops:

The build is started with:
Code:
cmake CMakeLists.txt -DPACKAGE_MODE=TRUE -DCMAKE_INSTALL_PREFIX="/usr" -DPLUGIN_DIR=%{_libdir}/%{name} -DGAMEINDEX_DIR=%{_datadir}/%{name} -DFORCE_INTERNAL_SOUNDTOUCH=FALSE -DFORCE_INTERNAL_SDL=TRUE -DSHARED_SDL=libpcsx2_SDL -DCMAKE_BUILD_TYPE=Release


Code:
[ 23%] Built target Utilities
Linking CXX shared library libPADnull.so
cd /home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/plugins/PadNull && /usr/bin/cmake -E cmake_link_script CMakeFiles/PADnull.dir/link.txt --verbose=1
/usr/lib/ccache/c++   -O2 -g -march=i386 -mtune=i686  -m32 -msse -msse2 -march=i686 -pthread -pthread  -shared -Wl,-soname,libPADnull.so -o libPADnull.so CMakeFiles/PADnull.dir/Pad.cpp.o CMakeFiles/PADnull.dir/Linux/Config.cpp.o CMakeFiles/PADnull.dir/Linux/PadLinux.cpp.o -s
make[2]: Leaving directory `/home/rpmbuild/rpmbuild/BUILD/pcsx2-4918'
/usr/bin/cmake -E cmake_progress_report /home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/CMakeFiles  3
[ 23%] Built target PADnull
make[1]: Leaving directory `/home/rpmbuild/rpmbuild/BUILD/pcsx2-4918'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.cuhY2h (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.cuhY2h (%build)

Patch code is:
Code:
--- pcsx2-4918/pcsx2/gui/Dialogs/FirstTimeWizard.cpp
+++ pcsx2-4918/pcsx2/gui/Dialogs/FirstTimeWizard.cpp
@@ -74,9 +74,7 @@
    SetMinWidth( 600 );

    FastFormatUnicode faqFile;
-    faqFile.Write( L"file:///%s/Docs/PCSX2_FAQ_%u.%u.%u.pdf",
-        InstallFolder.ToString().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo
-    );
+       faqFile.Write( L"file:///usr/share/doc/pcsx2/PCSX2_FAQ_0.9.9.pdf" );

    wxStaticBoxSizer& langSel    = *new wxStaticBoxSizer( wxVERTICAL, this, _("Language selector") );

Is there any reason the patch should affect things like this...?

Interestingly, when I patch and build from the comand line I don't get this error - however the pcsx2 binary isn't created.
However I think this is to do with build type only installing into a protected directory (and rpm build profile has no root privilege for security):
Code:
$ make install
[  3%] Built target translations_pcsx2_Iconized
[  5%] Built target translations_pcsx2_Main
[ 24%] Built target pcsx2_SDL
[ 29%] Built target Utilities
[ 31%] Built target x86emitter
[ 31%] Built target bin2cpp
[ 68%] Built target pcsx2
[ 69%] Built target CDVDiso
[ 71%] Built target CDVDlinuz
[ 71%] Built target CDVDnull
[ 72%] Built target dev9null-0.5.0
[ 73%] Built target FWnull-0.7.0
[ 83%] Built target GSdx-0.1.16
[ 84%] Built target GSnull
[ 85%] Built target onepad-1.1.0
[ 86%] Built target PADnull
[ 86%] Built target SPU2null
[ 91%] Built target spu2x-2.0.0
[ 92%] Built target USBnull-0.7.0
[ 98%] Built target zzogl-0.3.0
[100%] Built target zerospu2
Install the project...
-- Install configuration: "Release"                                            
CMake Error at cmake_install.cmake:38 (FILE):
  file cannot create directory: /var/games/pcsx2.  Maybe need administrative
  privileges.


make: *** [install] Error 1

Not really sure why the rpmbuild is crashing out during the padNull operation...

I'll try building the rpm without the patch to confirm that it's the problem...

EDIT: Not the patch afterall. Same error. Just unhappy with the build for some reason...
Do you use the -j option to compile severals files in parallel? In this case the log file will not stop in the latest bad step but will continue some on going work. However if PadNull is an issue just remove the plugin directory, it is not critical Wink

IMHO, RPM root is chrooted so it can access /var/games, it you build it from command line, /var is your real one hence the security permission issue.
Quote:Do you use the -j option to compile severals files in parallel?

as "cmake foobar -j "...? No...

I have the output of CMakeFiles/CMakeError.log
I don't know if it's relevant:

Code:
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o
/usr/lib/ccache/gcc   -O2 -g -march=i386 -mtune=i686  -m32 -msse -msse2 -march=i686 -pthread  -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/usr/lib/ccache/gcc   -O2 -g -march=i386 -mtune=i686  -m32 -msse -msse2 -march=i686 -pthread  -DCHECK_FUNCTION_EXISTS=pthread_create   CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o cmTryCompileExec -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
gmake[1]: Leaving directory `/home/rpmbuild/rpmbuild/BUILD/pcsx2-4918/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec] Error 1
gmake: *** [cmTryCompileExec/fast] Error 2

Quote:However if PadNull is an issue just remove the plugin directory, it is not critical

I don't think it's the issue but can I specify to build without PadNull to test this out?
Well it was actually make -j 4

Anyway, you can select which plugins is built in the file cmake/SelectPcsx2Plugins.cmake. Just set(PadNull FALSE)

Hum the ouptut is interesting, you have an issue with a library
Quote:/usr/bin/ld: cannot find -lpthreads
By the way how do you generate the log ?

Edit: However I think this error is expected because linux have pthread and pthreads
The log generated itself somehow Wink I was looking for some error log for clues. I'll try building again with PadNull set to false.
Ok. I only have this one CMakeFiles/CMakeOutput.log. Probably because I do not have any error Wink Could you attach this one too (use gzip).

I notice that you have several -march gcc parameter. Maybe there is some unlikely conflict.
Um - maybe you could help me with the patch to stop PadNull being built too Blush I don't know what the second number (164, n) is for in the patching code (thought I did... but clearly was decieving myself)

Code:
--- pcsx2-4918/cmake/SelectPcsx2Plugins.cmake
+++ pcsx2-4918/cmake/SelectPcsx2Plugins.cmake
@@ -164,7 +164,7 @@
#---------------------------------------

#---------------------------------------
#            PadNull
#---------------------------------------
-set(PadNull TRUE)
+set(PadNull FALSE)
#---------------------------------------

The CMakeOutputLog is attached.
Patch seem correct, otherwise move the Padnull directory outside of the tree. The second number is the column Wink

Strangely I do not the the pthread stuff at the end of my log file. Could you do a grep into cmake configuration script (*.cmake file). On debian there are installed into /usr/share/cmake-2.8
Code:
grep -irw pthreads /usr/share/cmake-2.8/

Edit: could you post also cmake autodetection information too.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34