Page 1 of 1

Compiling gtk branch

PostPosted: 10 Jun 2010, 10:57
by F. Bluemers
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

Re: Compiling gtk branch

PostPosted: 11 Jun 2010, 04:17
by Josh Pettus
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?

Re: Compiling gtk branch

PostPosted: 11 Jun 2010, 09:32
by F. Bluemers
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.

Re: Compiling gtk branch

PostPosted: 29 Mar 2011, 07:44
by John Cheetham
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

Re: Compiling gtk branch

PostPosted: 02 Apr 2011, 20:28
by F. Bluemers
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