Compiling gtk branch

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Compiling gtk branch

Postby F. Bluemers » 10 Jun 2010, 10:57

I've tried to compile it and got these errors/warnings
callback.c:629: warning: conflicting types for ‘ShowThinkingProc’
callback.c:248: note: previous implicit declaration of ‘ShowThinkingProc’ was here
interface.c: In function ‘load_pixbuf’:
interface.c:70: warning: incompatible implicit declaration of built-in function ‘exit’
In file included from xboard.c:1057:
args.h: In function ‘ParseArgs’:
args.h:988: warning: cast from pointer to integer of different size
args.h:1002: warning: cast from pointer to integer of different size
args.h: In function ‘SetDefaultsFromList’:
args.h:1098: warning: cast from pointer to integer of different size
args.h:1104: warning: cast from pointer to integer of different size
args.h:1112: warning: cast from pointer to integer of different size
args.h:1115: warning: cast from pointer to integer of different size
xboard.c: In function ‘SaveFontArg’:
xboard.c:1164: warning: cast from pointer to integer of different size
xboard.c: In function ‘SaveAttribsArg’:
xboard.c:1196: warning: cast from pointer to integer of different size
xboard.c: In function ‘SaveColor’:
xboard.c:1202: warning: cast from pointer to integer of different size
xboard.c:1203: warning: cast from pointer to integer of different size
xedittags.c: In function ‘EditTagsPopUp’:
xedittags.c:128: warning: passing argument 2 of ‘gtk_container_foreach’ from incompatible pointer type
/usr/include/gtk-2.0/gtk/gtkcontainer.h:122: note: expected ‘GtkCallback’ but argument is of type ‘void (*)(void)’
/usr/bin/ld: xengineoutput.o: undefined reference to symbol 'XtAddEventHandler'
/usr/bin/ld: note: 'XtAddEventHandler' is defined in DSO /usr/lib64/libXt.so.6 so try adding it to the linker command line
/usr/lib64/libXt.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [xboard] Error 1
make: *** [all] Error 2


I thought I'd installed all the header files for X11,is there still something missing?
(its a fedora 13 box,btw)
Best
Fonzy
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands

Re: Compiling gtk branch

Postby Josh Pettus » 11 Jun 2010, 04:17

I use Ubuntu and to get xboard to compile I had to make sure I also had to install 2 packages:

xorg-dev
x11-dev

I know fedora uses a different system then the debian apt-get program but there should be some similar packages right?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Compiling gtk branch

Postby F. Bluemers » 11 Jun 2010, 09:32

Darklord42 wrote:I use Ubuntu and to get xboard to compile I had to make sure I also had to install 2 packages:

xorg-dev
x11-dev

I know fedora uses a different system then the debian apt-get program but there should be some similar packages right?

Yes,similar packages.
The "normal" xboard compiles just fine.
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands

Re: Compiling gtk branch

Postby John Cheetham » 29 Mar 2011, 07:44

I got the same error (undefined reference to symbol 'XtAddEventHandler') when compiling the xboard GTK branch on Fedora 14 x64.

To fix it you need to change a line in Makefile.am.

Change:
xboard_LDADD = -lm @XAW_LIBS@ @GTK_LIBS@
to
xboard_LDADD = -lm @XAW_LIBS@ @GTK_LIBS@ -lXt -lX11

I also had to delete my settings file (~/.xboardrc) which contained settings for my xboard version 4.5.1 for the GTK version to run.
If you need to keep your settings rename this file instead of deleting it.

The GTK version comes up with some warning message boxes at startup, but then it runs OK.

JC
John Cheetham
 
Posts: 11
Joined: 28 Mar 2011, 07:36

Re: Compiling gtk branch

Postby F. Bluemers » 02 Apr 2011, 20:28

John Cheetham wrote:I got the same error (undefined reference to symbol 'XtAddEventHandler') when compiling the xboard GTK branch on Fedora 14 x64.

To fix it you need to change a line in Makefile.am.

Change:
xboard_LDADD = -lm @XAW_LIBS@ @GTK_LIBS@
to
xboard_LDADD = -lm @XAW_LIBS@ @GTK_LIBS@ -lXt -lX11

I also had to delete my settings file (~/.xboardrc) which contained settings for my xboard version 4.5.1 for the GTK version to run.
If you need to keep your settings rename this file instead of deleting it.

The GTK version comes up with some warning message boxes at startup, but then it runs OK.

JC

Thanks,it compiles fine now.
The GTK version does not look bad.
One interesting quirk is that after starting analysis mode,the main window gets bigger and bigger
with the length of the PV from the engine :mrgreen: .
A quick fix would be to restrain the label length with gtk_label_width_chars or gtk_label_max_width_chars in DisplayMessage(xboard.c )
Not very elegant but it seems there is no real elegant fix.
Maybe this is a basis for a better fix: http://tadeboro.blogspot.com/2009/05/wr ... label.html

Best
Fonzy
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 2 guests