..:: 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
Hi Gumbo, thank you for that info. And also, I don't think that Fedora RPM's will get through using yum --localinstall, if ever I use that.
Recently I'm getting some strange results when I try to test build an rpm for Fedora. While I can compile the code perfectly from the command line, the rpm build gives unusual errors. Culd these be a problem with pcsx2 i.e. new dependencies? (although I don't think rpmbuild is a sandbox and this code compiles outside of the command) - or is this a problem with rpmbuild command itself (thus requiring a bug report to Fedora)?

Any advice would be gratefully received...

Code:
[makerpm@weaver SPECS]$ rpmbuild -ba pcsx2-1.3.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.vqM2Tr
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ cd /home/makerpm/rpmbuild/BUILD
+ rm -rf pcsx2-1.3
+ /usr/bin/gzip -dc /home/makerpm/rpmbuild/SOURCES/pcsx2-1.3.tar.gz
+ /usr/bin/tar -xf -
/usr/bin/tar: Ignoring unknown extended header keyword `SCHILY.fflags'
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd pcsx2-1.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #1 (pcsx2-1.3.0_fedora_cflags_opts.diff):'
Patch #1 (pcsx2-1.3.0_fedora_cflags_opts.diff):
+ /usr/bin/cat /home/makerpm/rpmbuild/SOURCES/pcsx2-1.3.0_fedora_cflags_opts.diff
+ /usr/bin/patch -p1 --fuzz=0
patching file pcsx2/CMakeLists.txt
+ chmod -x pcsx2/Docs/GPL.txt pcsx2/Docs/License.txt pcsx2/Docs/readme-Docs.txt pcsx2/Docs/PCSX2_FAQ.doc pcsx2/Docs/PCSX2_Readme.doc bin/docs/pcsx2.1 linux_various/pcsx2.xpm
+ sed -i 's/\r//' pcsx2/Docs/GPL.txt
+ sed -i 's/\r//' pcsx2/Docs/License.txt
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.QEqlrW
+ umask 022
+ cd /home/makerpm/rpmbuild/BUILD
+ cd pcsx2-1.3
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro '
+ export LDFLAGS
+ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DBUILD_SHARED_LIBS:BOOL=ON . -DGLSL_SHADER_DIR=/usr/lib/pcsx2 -DBUILD_REPLAY_LOADERS=FALSE -DXDG_STD=TRUE -DGLSL_API=FALSE -DFORCE_INTERNAL_SOUNDTOUCH=FALSE -DFORCE_INTERNAL_SDL=FALSE -DPLUGIN_DIR=/usr/lib/pcsx2 -DGAMEINDEX_DIR=/usr/share/pcsx2 -DCMAKE_BUILD_STRIP=FALSE -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build Fedora specific
-- Cross compilation is disabled.
-- Compiling a i386 build on a i686 host.
-- Enable the building of po files by default in Release build !!!
-- Found ALSA: /usr/lib/libasound.so (found version "1.0.27.2")
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.18.3")
-- Found Git: /usr/bin/git (found version "1.9.3")
-- Found JPEG: /usr/lib/libjpeg.so  
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- Found OpenGL: /usr/lib/libGL.so  
-- Could NOT find wxWidgets (missing:  wxWidgets_FOUND)
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found Cg: /usr/lib/libCg.so;/usr/lib/libCgGL.so  
-- Found GLEW: /usr/lib/libGLEW.so  
-- Found Libc: /usr/lib/librt.so;/usr/lib/libdl.so;/usr/lib/libm.so  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- aio found
-- EGL found
-- GLESv2 found
-- portaudio found
-- SoundTouch found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found SDL: /usr/lib/libSDL.so (found version "1.2.15")
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.5.0")
-- Found GTK2_GTK: /usr/lib/libgtk-x11-2.0.so  
-- Skip build of common libraries: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), aio
-- Skip build of pcsx2 core: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs
-- Skip build of zzogl: miss some dependencies
-- check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs
-- Skip build of spu2-x: miss some dependencies
-- check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (>=1.2) pcsx2 common libs
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_Fortran_FLAGS_RELEASE
    FORCE_INTERNAL_SDL
    FORCE_INTERNAL_SOUNDTOUCH
    GAMEINDEX_DIR
    GLSL_SHADER_DIR
    INCLUDE_INSTALL_DIR
    LIB_INSTALL_DIR
    PLUGIN_DIR
    SHARE_INSTALL_PREFIX
    SYSCONF_INSTALL_DIR

I think this configure diaogue is unusual, as there is not an error usually with wxWidgets, libaio etc. etc.

Just for the record, current Fedora dependencies included in the rpm are:

Code:
BuildRequires: desktop-file-utils
BuildRequires: Cg
BuildRequires: cmake
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: libXrandr-devel
BuildRequires: freetype-devel
BuildRequires: glew-devel
BuildRequires: gettext
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: alsa-lib-devel
BuildRequires: SDL-devel
BuildRequires: gtk2-devel
BuildRequires: portaudio-devel
BuildRequires: sparsehash-devel
BuildRequires: wxGTK-devel
BuildRequires: soundtouch-devel
BuildRequires: libX11-devel
BuildRequires: libICE-devel
BuildRequires: libaio-devel
BuildRequires: mesa-libGLES

Build is broken:

Code:
....

[ 41%] Building CXX object plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/GLLoader.cpp.o
cd /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx && /usr/lib/ccache/c++   -DGSdx_0_1_16_EXPORTS -D_ARCH_32=1 -D_M_X86=1 -D_M_X86_32=1 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -march=native -pipe -std=c++0x -fvisibility=hidden -pthread -Wall -Wno-attributes -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value  -Wstrict-aliasing -Wstrict-overflow=4  -D_FORTIFY_SOURCE=2  -Wformat -Wformat-security -DNDEBUG  -Wno-invalid-offsetof -I/usr/include/libdrm -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/SDL -I/home/makerpm/rpmbuild/BUILD/pcsx2-1.3/common/include -I/home/makerpm/rpmbuild/BUILD/pcsx2-1.3/common/include/Utilities -I/home/makerpm/rpmbuild/BUILD/pcsx2-1.3/common/include/x86emitter -I/home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/.     -fno-operator-names -mfpmath=sse -fno-strict-aliasing -Wno-unknown-pragmas -Wno-parentheses -Wunused-variable -O2 -W -DXDG_STD -fabi-version=6 -mpreferred-stack-boundary=2 -o CMakeFiles/GSdx-0.1.16.dir/GLLoader.cpp.o -c /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/GLLoader.cpp
/home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/GLLoader.cpp:1:0: warning: SSE instruction set disabled, using 387 arithmetics [enabled by default]
/* * Copyright (C) 2011-2014 Gregory hainaut
^
In file included from /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/stdafx.h:293:0,
                 from /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/GLLoader.cpp:21:
/usr/lib/gcc/i686-redhat-linux/4.8.3/include/xmmintrin.h:31:3: error: #error "SSE instruction set not enabled"
# error "SSE instruction set not enabled"
   ^
In file included from /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/stdafx.h:294:0,
                 from /home/makerpm/rpmbuild/BUILD/pcsx2-1.3/plugins/GSdx/GLLoader.cpp:21:
/usr/lib/gcc/i686-redhat-linux/4.8.3/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
# error "SSE2 instruction set not enabled"
   ^
make[2]: *** [plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/GLLoader.cpp.o] Error 1
make[2]: Leaving directory `/home/makerpm/rpmbuild/BUILD/pcsx2-1.3'
make[1]: *** [plugins/GSdx/CMakeFiles/GSdx-0.1.16.dir/all] Error 2
make[1]: Leaving directory `/home/makerpm/rpmbuild/BUILD/pcsx2-1.3'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.QEqlrW (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.QEqlrW (%build)
Did you add the new cross build option?

edit: -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake
(01-25-2015, 02:44 PM)gregory Wrote: [ -> ]Did you add the new cross build option?

edit: -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake

I added this and get
Code:
-- Cross compilation is enabled.
-- Compiling a i386 build on a i686 host.

Hmmm - failing to detect libraries, I checked again and this error is present outside rpmfusion - doesn't make sense as these should be the versions present in Fedora...

Whatever the cause of this error, the build completes outside rpmbuild, but fails within it, as before.

Do you think the error might be to do with a bug in the rpmbuild environment? I can't think of any other reason.
Did you enable the DISABLE_ADVANCE_SIMD option?
I have now, but still no improvement. Also tried DCMAKE_WX28_API=TRUE but no improvement (anyway shouldn't be needed)

This must be the source of the problem....

Code:
-- Skip build of common libraries: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), aio
-- Skip build of pcsx2 core: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs
-- Skip build of zzogl: miss some dependencies
-- check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs
-- Skip build of spu2-x: miss some dependencies
-- check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (>=1.2) pcsx2 common libs
-- Configuring done

But all these libraries check out, not sure why configure is missing them, it never used to.

Code:
$ rpm -qa | grep glew
glew-devel-1.9.0-4.fc20.i686
$ rpm -qa | grep Cg
libCg-3.1.0013-3.fc19.i686
Cg-3.1.0013-3.fc19.i686
$ rpm -qa | grep wx
wxGTK-devel-2.8.12-9.fc20.i686
wxGTK3-devel-3.0.2-2.fc20.i686
wxGTK3-3.0.2-2.fc20.i686
wxGTK-2.8.12-9.fc20.i686
$ rpm -qa | grep soundtouch
soundtouch-1.4.0-8.fc20.i686
soundtouch-devel-1.4.0-8.fc20.i686
$ rpm -qa | grep SDL
SDL-1.2.15-13.fc20.i686
SDL2-2.0.3-1.fc20.i686
SDL-devel-1.2.15-13.fc20.i686

I've just checked the build environment by going back and compiling pcsx2-1.2 again - it configures and builds with no problems.

I'm stumped...
Can yoou post the full log with latest option (disable ..., and cmake cross building).

In your previous log, -msse2 was not enabled but instead it uses native arch which was wrong.
Quote: -march=native

Edit: by the way you have extra hardening flags that might explain others compilation error.
Hi Gregory,

Sorry it's taken me awhile to reply - lot of plates to keep spinning these days.
The build log is attached.[attachment=53877]

I'm not sure why the flags are being hardened like this. My understanding is that rpmbuild takes the local parameters and echo %CFLAGS does not give me any output, implying nothing is set. I can't find anything that would indicate rpmbuild has changed, but I'll search more over the next few days.

By the way, I've altered the spec file so that no changes are made to the flags specified by pcsx2.

edit: downloaded latest git and compiled normally (outside rpmbuild) - not detecting libraries for e.g. wxwidgets, so not building core. Completes build otherwise. Buildlog attached.[attachment=53879]
You set the option -DCMAKE_DISABLE_ADVANCE_SIMD=TRUE whereas it ought to be -DDISABLE_ADVANCE_SIMD=TRUE

On the flags topic they are set by some scripts. Or maybe they use a special gcc wrapper (arch does that).
Quote:+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -I/usr/lib/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro '
+ export LDFLAGS
Thanks for that gregory -
The build works with the correct version of DISABLE_ADVANCED_SIMD Blush

so no problem with rpmbuild afterall Biggrin

However I'm still failing to detect vital libraries - and so not building pcsx2 core. Perhaps there are some new dependencies I'm missing, or perhaps the libraries are not showing up because Fedora puts them in a strange place?

Anyway this is the result of configure on the most recent git is this:

Code:
$ cmake .. -DDISABLE_ADVANCE_SIMD=true
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build Fedora specific
-- Cross compilation is disabled.
-- Compiling a i386 build on a i686 host.
-- BuildType set to Devel by default
-- Disable the building of po files by default in Devel build !!!
-- Found ALSA: /usr/lib/libasound.so (found version "1.0.27.2")
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.18.3")
-- Found Git: /usr/bin/git (found version "1.9.3")
-- Found JPEG: /usr/lib/libjpeg.so  
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- Found OpenGL: /usr/lib/libGL.so  
-- Could NOT find wxWidgets (missing:  wxWidgets_FOUND)
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found Cg: /usr/lib/libCg.so;/usr/lib/libCgGL.so  
-- Found GLEW: /usr/lib/libGLEW.so  
-- Found Libc: /usr/lib/librt.so;/usr/lib/libdl.so;/usr/lib/libm.so  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- aio found
-- EGL found
-- GLESv2 found
-- portaudio found
-- SoundTouch found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Found SDL: /usr/lib/libSDL.so (found version "1.2.15")
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.5.0")
-- Found GTK2_GTK: /usr/lib/libgtk-x11-2.0.so  
-- Skip build of common libraries: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), aio
-- Skip build of pcsx2 core: miss some dependencies
-- check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs
-- Skip build of zzogl: miss some dependencies
-- check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs
-- Skip build of spu2-x: miss some dependencies
-- check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (>=1.2) pcsx2 common libs
-- Configuring done
-- Generating done
-- Build files have been written to: /home/makerpm/pcsx2-git/my_build
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