problem compiling client

Speak about everything in regards to Crossfire.

Moderator: Board moderators

Post Reply
james

problem compiling client

Post by james »

Hello,

I'm running Debian woody on a 2.4.25 kernel and have been playing crossfire for a little while now using the debian packages. I downloaded the newest source tarballs from sourceforge and have installed the server without a problem. The client, however, is causing me problems.

I want the gtk interface (don't care for sdl) and have the necessary gtk, png, etc stuff.

*****************************************

$ ./configure

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/james/download/crossfire_stuff/crossfire-client-1.7.0/utils/missing: Unknown `--run' option
Try `/home/james/download/crossfire_stuff/crossfire-client-1.7.0/utils/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for mkdir... /bin/mkdir
checking for tar... /bin/tar
checking for makedepend... /usr/X11R6/bin/makedepend
checking for cp... /bin/cp
checking for rm... /bin/rm
checking for perl... /usr/bin/perl
checking for ar... /usr/bin/ar
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.0.0... yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
GTK found - building both gtk and x11 client
Xlibs: -L/usr/X11R6/lib -lX11
Extras:
Xpre: -lSM -lICE
checking for main in -lasound... yes
checking for alNewConfig in -laudio... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
Using ALSA sound system (0.9.x)
checking for sdl-config... no
checking for SDL - version >= 1.1.3... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
checking for main in -lXext... yes
checking for sqrt in -lm... yes
checking for main in -lz... yes
checking for main in -lpng... yes
checking for main in -ldmalloc... no
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking dmalloc.h usability... no
checking dmalloc.h presence... no
checking for dmalloc.h... no
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking whether gcc needs -traditional... no
checking for vprintf... yes
checking for _doprnt... no
checking for mkdir... yes
checking for socket... yes
checking for strcspn... yes
checking for sysconf... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gtk/Makefile
config.status: creating x11/Makefile
config.status: creating common/Makefile
config.status: creating sound-src/Makefile
config.status: creating gnome/Makefile
config.status: creating common/config.h
config.status: executing depfiles commands

********************************

What are the errors/warning reported on the 6-.. lines?

********************************

$ make depend

making depend in common...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/common'
/usr/X11R6/bin/makedepend -- -g -O2 -DALSA9_SOUND -Wall -I. -- client.c commands.c image.c init.c item.c metaserver.c misc.c newsocket.c player.c script.c
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/common'
making depend in x11...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/x11'
/usr/X11R6/bin/makedepend -- -g -O2 -DALSA9_SOUND -Wall -I/usr/X11R6/include -I.. -I../common -I. -- png.c sound.c x11.c xutil.c
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/x11'
making depend in gtk...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/gtk'
/usr/X11R6/bin/makedepend -- -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -- config.c gx11.c image.c keys.c map.c png.c sdl.c sound.c
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/gtk'
making depend in sound-src...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/sound-src'
/usr/X11R6/bin/makedepend -- -g -O2 -DALSA9_SOUND -Wall -I. -I.. -I../common -I. --
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/sound-src'

********************************

No error there.

However, running 'make' yields the following:

********************************

$ make

making all in common...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/common'
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c client.c
In file included from client.c:168:
/usr/include/netinet/tcp.h:167: warning: `SOL_TCP' redefined
client-types.h:104: warning: this is the location of the previous definition
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c commands.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c image.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c init.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c item.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c metaserver.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -c misc.c
misc.c: In function `monitorChilds':
misc.c:246: parse error before `*'
misc.c:249: `next' undeclared (first use in this function)
misc.c:249: (Each undeclared identifier is reported only once
misc.c:249: for each function it appears in.)
make[1]: *** [misc.o] Error 1
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/common'
making all in x11...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/x11'
gcc -g -O2 -DALSA9_SOUND -Wall -I/usr/X11R6/include -I.. -I../common -I. -c png.c
gcc -g -O2 -DALSA9_SOUND -Wall -I/usr/X11R6/include -I.. -I../common -I. -c sound.c
gcc -g -O2 -DALSA9_SOUND -Wall -I/usr/X11R6/include -I.. -I../common -I. -c x11.c
gcc -g -O2 -DALSA9_SOUND -Wall -I/usr/X11R6/include -I.. -I../common -I. -c xutil.c
make[1]: *** No rule to make target `../common/libcfclient.a', needed by `cfclient'. Stop.
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/x11'
making all in gtk...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/gtk'
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c config.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c gx11.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c image.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c keys.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c map.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c png.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c sdl.c
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -I.. -I../common -I../pixmaps -c sound.c
make[1]: *** No rule to make target `../common/libcfclient.a', needed by `gcfclient'. Stop.
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/gtk'
making all in sound-src...
make[1]: Entering directory `/home/james/download/crossfire-client-1.7.0/sound-src'
/usr/bin/perl -p -e s#/usr/local/lib/sounds#/usr/local/share/crossfire-client/sounds# sounds.dist > sounds
/usr/bin/perl ../utils/deftoheader.pl sounds soundsdef.h def_sounds
199 lines processed
gcc -g -O2 -DALSA9_SOUND -Wall -I. -I.. -I../common -I. -c cfsndserv.c
cfsndserv.c: In function `init_audio':
cfsndserv.c:343: parse error before `unsigned'
cfsndserv.c:346: `format' undeclared (first use in this function)
cfsndserv.c:346: (Each undeclared identifier is reported only once
cfsndserv.c:346: for each function it appears in.)
cfsndserv.c:356: parse error before `unsigned'
cfsndserv.c:357: `channels' undeclared (first use in this function)
cfsndserv.c:365: parse error before `unsigned'
cfsndserv.c:366: `r' undeclared (first use in this function)
cfsndserv.c:367: parse error before `int'
cfsndserv.c:368: `dir' undeclared (first use in this function)
make[1]: *** [cfsndserv.o] Error 1
make[1]: Leaving directory `/home/james/download/crossfire-client-1.7.0/sound-src'
make: *** [all] Error 2

********************************

Any ideas how to resolve this issue? I tried running configure with '--disable-sound', '--disable-alsa' and '--disable-alsa9', all to no avail.

I would like to try the new client (as I was using the one packaged with debian -- version 1.2!!).

Any help would be greatly appreciated. Thanks in Advance!
James
User avatar
Azriel
Regular
Posts: 85
Joined: Thu May 13, 2004 7:33 am

Post by Azriel »

I had the same problem. The scripting of the client does not complie very well, so i changed the function 'monitorChild' and another one in scripting.c to do nothing. It compiled and it workd (but i have still a memory leak with the gtk client. The x client works fine)

Az
poof
Senior member
Posts: 333
Joined: Fri May 07, 2004 5:31 pm
Location: Alaska, USA

Post by poof »

FYI, setting SDL with smoothing in the client config here got rid of the memory leak for me in the GTK+ client. Have to install the SDL development libraries and recompile but that is a small price to pay to get rid of the memory leak IMO.
e-mail: poof \a\t eracc \d\o\t com
james

Post by james »

Thank you Azriel and poof for your help.

The compile problems were due to some non-ANSI C code. I modifed the source and all went well. (Should I bother passing the diffs to the development team?)

I didn't think that the memory leak would affect me, but as soon as I compiled the client and started using it, it was rathe obvious. I followed your advice, poof, and it went away!

Thanks again!
James
Avion
Senior member
Posts: 301
Joined: Tue Jun 03, 2003 1:16 am
Location: Canada
Contact:

Post by Avion »

james wrote:Thank you Azriel and poof for your help.

The compile problems were due to some non-ANSI C code. I modifed the source and all went well. (Should I bother passing the diffs to the development team?)

I didn't think that the memory leak would affect me, but as soon as I compiled the client and started using it, it was rathe obvious. I followed your advice, poof, and it went away!

Thanks again!
James
Please do pass this sort of info to the development mailing list or the sourceforge bug tracker. Especially re: non standard coding issues. Not only do many developers not read the message boards, the mailing list is a historical record of issues and the bugtracker is well... a bug tracker.
Post Reply