Moderator: Andres Valverde
I am sure it is very easy to fix. But the main problem is that I cannot even run PSWBTM under Linux. When I load the executable from Pradu´s site it does not run under my Linux, and complains about missing run/time libraries, the required (obsolete) versions are unoptainable. If I load the source, I cannot compile it under Linux because it is missing the compile-time libraries that are unobtainable.
(This was reported to me by Pradu, whose Linux seems to be the only one capable of compiling and running PSWBTM.)
Michel wrote:I wonder if there is not a license problem with PSWBTM. It seems wxWindows is GPL according to this page http://docs.wxwidgets.org/stable/wx_wxl ... #wxlicense.
By the nature of the GPL the license of PSWBTM should then also be GPL compatible,
I have the feeling that the license
http://pradu.us/home/cc/PSWBTM/
is not GPL compatible. Item 2 is the cuprit
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
I think it was such a clause that made the original Qt non-GPL compatible.
EDIT: I am not trying to be obnoxious, but in the open source world license issues are taken very seriously.
2. The exception is that you may use, copy, link, modify and distribute under the user's own terms, binary object code versions of works based on the Library.
2. The exception is that you may use, copy, link, modify and distribute under the user's own terms, binary object code versions of works based on the Library.
Yeah I use the following Linux makefile:Sven Schüle wrote:(This was reported to me by Pradu, whose Linux seems to be the only one capable of compiling and running PSWBTM.)
After looking at the "official" source tree very quickly it seems there is only a Makefile.win, so either Pradu sends his Linux makefile to you, or you adapt Makefile.win (should be quite easy since it is already based on gcc/g++).
The only issue might be that it is based on wxWidgets which I guess you have to download and build for your own Linux. Maybe the wxX11 port is the one that is required, for which the build shall be prepared (according to the docs, see the very end of "wx.pdf" which can be downloaded from SourceForge together with other PDF docs) by "configure --with-x11 --with-universal".
My 0,0002 ct
Sven
WX_CONFIG := wx-config
PROGRAM = PSWBTMApp
FLAGS = -DwxUSE_UNICODE=0 -Bstatic -D_XBOARD
LFLAGS = -DwxUSE_UNICODE=0 -Bstatic
OBJECTS = $(PROGRAM).o Configuration.o Engine.o EngineList.o EngineManager.o \
NewTournament.o Pairing.o PSWBTMFrm.o Tournament.o \
UpdateInfoEvt.o
CXX = $(shell $(WX_CONFIG) --cxx)
.SUFFIXES: .o .cpp
.cpp.o :
$(CXX) -c `$(WX_CONFIG) --cxxflags` $(FLAGS) -o $@ $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) $(LFLAGS) `$(WX_CONFIG) --libs`
clean:
rm -f *.o $(PROGRAM)
Indeed I'm using an older wxWidgets to compile (gtk2-ansi-release-2.8.4.0) because I've been too lazy to upgrade. Type wx-config --unicode=no and try to compile again with your version of wxWidgets. I would be surprised if there is no longer any ANSI support in wxWidgets. If this doesn't work either, I'll try to find out what the problem is this weekend.Michel wrote:At least I think I understand the compilation issue. PSWBTM uses non-unicode strings
(the good old "...."). Now it seems the recent wxWindows libraries that come with
Ubuntu no longer support the non-unicode functions (at least I did not find out how
to make them work). As a result you get errors like
undefined reference to `wxString::Format(char const*, ...)
because a function of that signature is no longer in the library.
If you delete -DwxUSE_UNICODE=0 from the makefile you get compilation errors
PSWBTMApp.cpp:21: error: no matching function for call to ‘wxString::Format(const char [7])’
/usr/include/wx-2.8/wx/string.h:1208: note: candidates are: static wxString wxString::Format(const wxChar*, ...)
So do we have to convert PSWBTM to unicode (a trivial but tedious fix) or is there
another solution (I do not know wxWindows very well)?
Michel
Warning: No config found to match: /usr/bin/wx-config --unicode=no
in /usr/lib/wx/config
If you require this configuration, please install the desired
library build.
If this doesn't work either, I'll try to find out what the problem is this weekend.
#include "wx/wx.h"
int main(){
wxExecute(wxT("xboard"));
}
g++ test.c -o test `wx-config --cflags` `wx-config --libs`
Error: first chess program (gnuchessx) exited unexpectely
to further analyze why your example program exits unexpectedly you could try tracking all system calls and their results by calling something like "strace -f ./test >strace.log 2>&1" and watch out for any anomalies in "strace.log". If "strace" is not in your PATH then maybe it's /sbin/strace or /usr/sbin/strace. "-f" includes child processes.
#include "wx/wx.h"
int main(){
wxExecute(wxT("xboard"));
}
// These lines close the open file descriptors to to avoid any
// input/output which might block the process or irritate the user. If
// one wants proper IO for the subprocess, the right thing to do is to
// start an xterm executing it.
if ( !(flags & wxEXEC_SYNC) )
{
// FD_SETSIZE is unsigned under BSD, signed under other platforms
// so we need a cast to avoid warnings on all platforms
for ( int fd = 0; fd < (int)FD_SETSIZE; fd++ )
{
if ( fd == pipeIn[wxPipe::Read]
|| fd == pipeOut[wxPipe::Write]
|| fd == pipeErr[wxPipe::Write]
|| traits->IsWriteFDOfEndProcessPipe(execData, fd) )
{
// don't close this one, we still need it
continue;
}
// leave stderr opened too, it won't do any harm
if ( fd != STDERR_FILENO )
close(fd);
}
}
}
If closing a non-open file descriptor leads to problems, this should be considered a severe Ubuntu bug.
Return to Winboard and related Topics
Users browsing this forum: No registered users and 18 guests