..:: PCSX2 Forums ::..

Full Version: [BUG Report] Build on Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Firstly, sorry for my bad English, I'm French.

I've found a (very Smile ) small error during the linux build of PCSX 2 (SVN of official PCSX2, rev. 455). It seems that "plugin/build.sh" file use an incorrect sh syntax. "function buildplugin {" is a bash syntax, and I must execute "bash build.sh" to build correctly :

sh :
foo() {
}
bash :
function foo {
}

To solve the problem : replace 'sh' by 'bash', or replace the bash by sh syntax.

Else, all work correctly, good job Smile. I will try to launch a game tomorrow.

Note : There is no error message when libxxf86-dev is not installed, build work, but naturally, ZeroGs plugin don't work. You could use a check like this :
AC_CHECK_LIB(Xxf86vm,main,[LIBS="$LIBS -lXxf86vm"],[echo "Error! You need to have libXxf86vm-dev." ; exit -1])
instead of this :
AC_CHECK_LIB(Xxf86vm,main,[LIBS="$LIBS -lXxf86vm"])
In plugin/zerogs/opengl/configure.ac line 134
Notified our linux coder. Moved.
Noted. I'll commit both changes sometime in the next few days; I'm not sure if I'll have time tonight or not...
Other thing,

When I compile a devbuild, I get an error like this :

LnxSysExex.cpp 615 : g_SaveGSStream was not declared in this scope.

I must add the following lines in this file to compile :

Code:
#ifdef PCSX2_DEVBUILD
#include "GS.h"
#endif

PS :

In any game, I have a segfault after (during ?) IPU initialisation with a non devbuild when EERec is enabled. I haven't this error in devbuild.

SVN Rev 455
I think that this include should be added without ifdef -- compiler know better to resolve this. And segfault... How do you know it was IPU? Say ulimit -c 100000, than after crush gdb ./pcsx2 core My release build is o'k, but I use highly hacked open GL plugin.
I don't know if it was the IPU, but I had (in non devbuild) a segfault just after that :

# Initialize IPU

In devbuild, I have another segfault (rev 455), the stacktrace :

Code:
#0  ?? () at :0
#1  ExecuteCpu () at LnxSysExec.cpp:107
#2  RunExecute (elf_file=0x0, use_bios=false) at LnxSysExec.cpp:204
#3  OnFile_RunCD (menuitem=0x9aca980, user_data=0x0) at LnxMain.cpp:402
#4  g_cclosure_marshal_VOID__VOID () at :0
#5  g_closure_invoke () at :0
#6  ?? () at :0
#7  g_signal_emit_valist () at :0
#8  g_signal_emit () at :0
#9  gtk_widget_activate () at :0
#10  gtk_menu_shell_activate_item () at :0
#11  ?? () at :0
#12  ?? () at :0
#13  ?? () at :0
#14  ?? () at :0
#15  g_closure_invoke () at :0
#16  ?? () at :0
#17  g_signal_emit_valist () at :0
#18  g_signal_emit () at :0
#19  ?? () at :0
#20  gtk_propagate_event () at :0
#21  gtk_main_do_event () at :0
#22  ?? () at :0
#23  g_main_context_dispatch () at :0
#24  ?? () at :0
#25  g_main_loop_run () at :0
#26  gtk_main () at :0
#27  StartGui () at LnxMain.cpp:366
#28  main (argc=1, argv=0xbf94c3e4) at LnxMain.cpp:223

I don't have segfault here when I use :

Code:
recCpu.Execute();

instead of :

Code:
recExecute;

in LnxSysExec.cpp, line 107.
Mhhh, my previous post is wrong (my fix is wrong too), sorry... I've removed some __fastcall(s) and now I have a better stacktrace :

Code:
#0  getBits (address=0x10002000 <Address 0x10002000 out of bounds>, size=384, advance=143092320) at IPU.cpp:1204
#1  IPUCMD_WRITE (val=1342177280) at IPU.cpp:568
#2  ipuWrite32 (mem=268443648, value=1342177280) at IPU.cpp:334
#3  hwWrite32_page_02 (mem=268443648, value=1342177280) at HwWrite.cpp:469
#4  ?? () at :0
#5  cpuExecuteBios () at R5900.cpp:647
#6  loadElfFile (filename=0xbffca5bd \"cdrom0:\\\\SLES_543.55;1\") at Elfheader.cpp:552
#7  RunExecute (elf_file=0x0, use_bios=false) at LnxSysExec.cpp:191
#8  OnFile_RunCD (menuitem=0xa0dc980, user_data=0x0) at LnxMain.cpp:402
#9  g_cclosure_marshal_VOID__VOID () at :0
#10  g_closure_invoke () at :0
#11  ?? () at :0
#12  g_signal_emit_valist () at :0
#13  g_signal_emit () at :0
#14  gtk_widget_activate () at :0
#15  gtk_menu_shell_activate_item () at :0
#16  ?? () at :0
#17  ?? () at :0
#18  ?? () at :0
#19  ?? () at :0
#20  g_closure_invoke () at :0
#21  ?? () at :0
#22  g_signal_emit_valist () at :0
#23  g_signal_emit () at :0
#24  ?? () at :0
#25  gtk_propagate_event () at :0
#26  gtk_main_do_event () at :0
#27  ?? () at :0
#28  g_main_context_dispatch () at :0
#29  ?? () at :0
#30  g_main_loop_run () at :0
#31  gtk_main () at :0
#32  StartGui () at LnxMain.cpp:366
#33  main (argc=1, argv=0xbffcb254) at LnxMain.cpp:223

Here :
Code:
*(u32*)address = *(u32*)readmem;
in IPU.cpp, line 1204.

Note : At the begin of getBits, size=512.

"adress" is not valid ("out of bounds")... I've searched, but I don't understand at all why it's not valid... (rev 468) whith these options :
Code:
--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`

Without EERec :
Code:
#0  getBits (address=0x10002000 <Address 0x10002000 out of bounds>, size=384, advance=143092320) at IPU.cpp:1204
#1  IPUCMD_WRITE (val=1342177280) at IPU.cpp:568
#2  ipuWrite32 (mem=268443648, value=1342177280) at IPU.cpp:334
#3  hwWrite32_page_02 (mem=268443648, value=1342177280) at HwWrite.cpp:469
#4  vtlb_memWrite32 (mem=268443648, value=1342177280) at vtlb.cpp:175
#5  R5900::Interpreter::OpcodeImpl::SW () at R5900OpcodeImpl.cpp:436
#6  execI () at Interpreter.cpp:70
#7  intExecute () at Interpreter.cpp:251
#8  ExecuteCpu () at LnxSysExec.cpp:112
#9  RunExecute (elf_file=0x0, use_bios=false) at LnxSysExec.cpp:201
#10  OnFile_RunCD (menuitem=0xa58f980, user_data=0x0) at LnxMain.cpp:402
#11  g_cclosure_marshal_VOID__VOID () at :0
#12  g_closure_invoke () at :0
#13  ?? () at :0
#14  g_signal_emit_valist () at :0
#15  g_signal_emit () at :0
#16  gtk_widget_activate () at :0
#17  gtk_menu_shell_activate_item () at :0
#18  ?? () at :0
#19  ?? () at :0
#20  ?? () at :0
#21  ?? () at :0
#22  g_closure_invoke () at :0
#23  ?? () at :0
#24  g_signal_emit_valist () at :0
#25  g_signal_emit () at :0
#26  ?? () at :0
#27  gtk_propagate_event () at :0
#28  gtk_main_do_event () at :0
#29  ?? () at :0
#30  g_main_context_dispatch () at :0
#31  ?? () at :0
#32  g_main_loop_run () at :0
#33  gtk_main () at :0
#34  StartGui () at LnxMain.cpp:366
#35  main (argc=1, argv=0xbf9223a4) at LnxMain.cpp:223

PS :

Arff, I had forgotten to remove __fastcall from IPU.cpp (I had only removed __fastcall in IPU.h). Then, when I remove __fastcall, in getBits function, I have not segfault. Whith or without EERec, I can now launch the Bios and FFXII.