..:: PCSX2 Forums ::..

Full Version: Linux - Compile Guide and Support
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 35
Thanks. Which driver do you have for your graphical card and which model ?
(04-02-2011, 04:09 PM)gregory Wrote: [ -> ]Thanks. Which driver do you have for your graphical card and which model ?

Your welcome, and thanks for the reply.

Nvidia Beta driver version 270.30
Nvidia Geforce GT240

and i use Mandriva Linux Free 2010.2 32bit.
Hum, the error appears here -> if (!_this->GL_CreateContext)
It seems either an issue with _this (structure of the video device configuration) or either the opengl context.
1/ Could do a quick test with padnull. Others pads uses sdl too, maybe there is a conflict.
2/ Try this patch. It will force an opengl 3.0 context instead of 2.1. If you have an X11 error, you will need to update libsdl
Code:
--- plugins/GSdx/GS.cpp    (revision 4528)
+++ plugins/GSdx/GS.cpp    (working copy)
@@ -140,6 +140,9 @@
            return -1;
        }
    }
+    // Force an opengl 3.0 context
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION,3);
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION,0);

    return 0;
}
(04-03-2011, 11:20 AM)gregory Wrote: [ -> ]Hum, the error appears here -> if (!_this->GL_CreateContext)
It seems either an issue with _this (structure of the video device configuration) or either the opengl context.
1/ Could do a quick test with padnull. Others pads uses sdl too, maybe there is a conflict.
2/ Try this patch. It will force an opengl 3.0 context instead of 2.1. If you have an X11 error, you will need to update libsdl
Code:
--- plugins/GSdx/GS.cpp    (revision 4528)
+++ plugins/GSdx/GS.cpp    (working copy)
@@ -140,6 +140,9 @@
            return -1;
        }
    }
+    // Force an opengl 3.0 context
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION,3);
+    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION,0);

    return 0;
}
thanks for the reply

i still got crash, i put the gdb result in attachment.

Btw, after i using this trik export SDL_JOYSTICK_DEVICE=/dev/input/js0
i got new problem, when i using Leff Analog Stick to setup with Onepad or Zeropad, it's crashed. >.<
Can you help me with this problem too?
Which value have you in _this?
you do not have luck Sad Maybe time to learn gdb Smile

For the crash with the pad. Do a test without building gsdx (-DFORCE_INTERNAL_SDL=FALSE). Maybe an incompatibility with the new sdl.

For GSdx. Do not hesitate to search google for more gdb doc.
Create the file ~/.gdbinit and add
Code:
set print pretty on
set print object on
set print static-members on
set print vtbl on
set print demangle on
set demangle-style gnu-v3
set print sevenbit-strings off
Run gdb until the crash occured. If you missed it you can move the stack level with the "up" and "down" command.
Note you can toggle source list with ctrl-x A
Note2: you can create a breakpoint too -> "break SDL_CreateWindow"

Then do:
print *_this
print _this->GL_CreateContext
thanks for the reply,
look like i need to learn gdb, but right now i don't have good internet connection, now i only have 7kbps internet connection and unstable too. >.<
i will wait until my new adsl connection is up, i just upgrade my adsl conection from 384kbps to 512kbps, and it's not up yet.

about the pad, it's happen when i'am using this Mandriva Linux Free 2010.2, i try pcsx2 beta binary from pcsx2.net download page, and when i try configure Left Analog Stick still got crash too.
it's not crashed in PCLinuxOS 2010.12 and i can configure it too.

i try download SDL 1.2.4 source rpm and compile itu using rpm-build, then install it, re compile pcsx2 with release and without internal sdl, but still got crashed.

when i using SDL rpm binary from PCLinuxOS 2010.12 and install it to my Mandriva 2010.2, it not crushed, and i can configure it too, but i can not using the Left Analog Stick in the game.

btw, right now i will try compile GSdx in PCLinuxOS 2010.12, perhaps thereis something strange with Mandriva Linux 2010.2.

SDL 1.2.14 package from Mandriva doesn't correctly detect all the axis. In fact it detects only one axis out of four (and no hat) on my gamepad. The moment I touch the "up-down" axis on the Left Joystick most of the apps/games are crashing.

Try to downgrade SDL to 1.2.13, that solved the issue for me.
Worth to try.
On debian I have the following version
Code:
ii  libsdl-gfx1.2-4                      2.0.20-1.1                   drawing and graphical effects extension for SDL
ii  libsdl-image1.2                      1.2.10-2+b2                  image loading library for Simple DirectMedia Layer 1.2
ii  libsdl-mixer1.2                      1.2.8-6.3                    mixer library for Simple DirectMedia Layer 1.2
ii  libsdl-net1.2                        1.2.7-2                      network library for Simple DirectMedia Layer
ii  libsdl-pango1                        0.1.2-4                      text rendering with Pango in SDL applications (shared library)
ii  libsdl-perl                          2.2.5-1+b1                   SDL bindings for the Perl language
ii  libsdl-sound1.2                      1.0.3-3+b1                   Decoder of several sound file formats for SDL
ii  libsdl-ttf2.0-0                      2.0.9-1                      ttf library for Simple DirectMedia Layer with FreeType 2 support
ii  libsdl1.2-dev                        1.2.14-6.1                   Simple DirectMedia Layer development files
ii  libsdl1.2debian                      1.2.14-6.1                   Simple DirectMedia Layer
ii  libsdl1.2debian-alsa                 1.2.14-6.1                   Simple DirectMedia Layer (with X11 and ALSA options)

The debian package contains several patches but at least 2 for joystick.
Code:
::::::::::::::
222_joystick_crash.diff
::::::::::::::
Description: Fix crash with joystick detection.
Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c
===================================================================
--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:37:36.000000000 -0500
+++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:38:27.000000000 -0500
@@ -700,7 +700,7 @@
                continue;
            }
            if ( test_bit(i, absbit) ) {
-                int values[5];
+                int values[6];

                if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
                    continue;
Code:
::::::::::::::
218_joystick_memmove.diff
::::::::::::::
---
src/joystick/SDL_joystick.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -373,7 +373,7 @@
    /* Remove joystick from list */
    for ( i=0; SDL_joysticks[i]; ++i ) {
        if ( joystick == SDL_joysticks[i] ) {
-            SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i+1],
+            SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i+1],
                   (SDL_numjoysticks-i)*sizeof(joystick));
            break;
        }

Try to check the sdl code if the patches are already present. If not apply them and do a test.
(04-04-2011, 09:28 PM)dubigrasu Wrote: [ -> ]SDL 1.2.14 package from Mandriva doesn't correctly detect all the axis. In fact it detects only one axis out of four (and no hat) on my gamepad. The moment I touch the "up-down" axis on the Left Joystick most of the apps/games are crashing.

Try to downgrade SDL to 1.2.13, that solved the issue for me.
Worth to try.


Okay, i will download 1.2.13 source rpm, and recompile it.
With SDL 1.2.13, Can you using Left Analog Axis with the Game in PCSX2 ?
So in not my gamepad, i almost try to Buy XBOX360 Gamepad to change My PLaystation 2 Dual Shock (Conected via pararel port).



(04-05-2011, 09:02 AM)gregory Wrote: [ -> ]On debian I have the following version
Code:
ii  libsdl-gfx1.2-4                      2.0.20-1.1                   drawing and graphical effects extension for SDL
ii  libsdl-image1.2                      1.2.10-2+b2                  image loading library for Simple DirectMedia Layer 1.2
ii  libsdl-mixer1.2                      1.2.8-6.3                    mixer library for Simple DirectMedia Layer 1.2
ii  libsdl-net1.2                        1.2.7-2                      network library for Simple DirectMedia Layer
ii  libsdl-pango1                        0.1.2-4                      text rendering with Pango in SDL applications (shared library)
ii  libsdl-perl                          2.2.5-1+b1                   SDL bindings for the Perl language
ii  libsdl-sound1.2                      1.0.3-3+b1                   Decoder of several sound file formats for SDL
ii  libsdl-ttf2.0-0                      2.0.9-1                      ttf library for Simple DirectMedia Layer with FreeType 2 support
ii  libsdl1.2-dev                        1.2.14-6.1                   Simple DirectMedia Layer development files
ii  libsdl1.2debian                      1.2.14-6.1                   Simple DirectMedia Layer
ii  libsdl1.2debian-alsa                 1.2.14-6.1                   Simple DirectMedia Layer (with X11 and ALSA options)

The debian package contains several patches but at least 2 for joystick.
Code:
::::::::::::::
222_joystick_crash.diff
::::::::::::::
Description: Fix crash with joystick detection.
Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c
===================================================================
--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:37:36.000000000 -0500
+++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c    2010-01-12 12:38:27.000000000 -0500
@@ -700,7 +700,7 @@
                continue;
            }
            if ( test_bit(i, absbit) ) {
-                int values[5];
+                int values[6];

                if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
                    continue;
Code:
::::::::::::::
218_joystick_memmove.diff
::::::::::::::
---
src/joystick/SDL_joystick.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -373,7 +373,7 @@
    /* Remove joystick from list */
    for ( i=0; SDL_joysticks[i]; ++i ) {
        if ( joystick == SDL_joysticks[i] ) {
-            SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i+1],
+            SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i+1],
                   (SDL_numjoysticks-i)*sizeof(joystick));
            break;
        }

Try to check the sdl code if the patches are already present. If not apply them and do a test.

hmm, i will try the patch with 1.2.14 source code , and compile it in my Mandriva.
i hope it solved my gamepad problem, if it solved, i will use 1.2.14, but if not, i will use 1.2.13.
in my Mandriva i only install SDL , Sdl mixer and SDL Pango.


i just try Compile GSdx in PCLinuxOS, i got the same error just like in my Mandriva. Sad

After that, i reboot to my Mandriva,
and i try make .gdbinit file like you told me.

run gdb
i run it until Error Window Popup, and chose Ignore
then in gdb i type this print *_this , but i only get "Cannot access memory at address 0x0"
typing print _this->GL_CreateContext , i only get "Cannot access memory at address 0x7c"

i put gdb log in attachment

btw, i don't know programing, so i want to ask, when i run gdb, what i must to get?

ps: i like this forum, a lot of people help a newbie like me.
and trying to solve a problem is more fun, rather than playing the game.
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 35