bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Compile & crash on Solaris


From: Holger
Subject: Re: [Bug-gnubg] Compile & crash on Solaris
Date: Fri, 3 Jan 2003 00:56:49 +0100 (MET)

Joern Thyssen wrote:
> On Thu, Jan 02, 2003 at 10:57:15PM +0100, Holger wrote
> > The main problem is that the programme doesn't run. It crashs almost
> right away.
> > 
> > As I'm at university I cannot install GNUbg under the default, but
> > /home/pub/lib/... . I ran configure with these options:
> > ./configure --enable-bearoff=external \
> >             --without-sound \
> >             --without-gtkextra \
> >             --prefix=/home/pub/lib/gnubg-`date +%y%m%d`
> > 
> > Here is the debug output of two invocations. How should GNUbg be
> invoked, anyway, with --datadir or does it find it by itself?
> 
> gnubg should use whatever you've specified with --prefix above as the
> default datadir.

With the option above this results in
/home/pub/lib/gnubg-030102/share/gnubg. The bearoff databases, weights and so 
on are in this folder. Is this ok?

> > (gdb) run
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0xfe6331b4 in strlen ()
> > (gdb) bt
> > #0  0xfe6331b4 in strlen ()
> > #1  0xfe6860f0 in _doprnt ()
> > #2  0xfe687eb8 in sprintf ()
> > #3  0x6f188 in PathSearch (szFile=0xbdac0 "met/zadeh.xml", szDir=0x0) at
> > path.c:86
> > #4  0x4ac5c in readMET (pmd=0xffbe9b58, szFileName=0xbdac0
> "met/zadeh.xml",
> > szDir=0x0)
> >     at matchequity.c:1273
> > #5  0x4b47c in InitMatchEquity (szFileName=0xbdac0 "met/zadeh.xml",
> > szDir=0x0)
> >     at matchequity.c:1631
> > #6  0x2157c in real_main (closure=0x1, argc=1, argv=0xffbeeb84) at
> > gnubg.c:6352
> > #7  0x21b40 in main (argc=1, argv=0xffbeeb84) at gnubg.c:6612
> 
> This code seems to be the culprit (path.c line 85ff):
> 
>     sprintf( pch, "%s/%s", szDir, szFile );
>     if( !access( pch, R_OK ) )
>       return realloc( pch, strlen( pch ) + 1 );
> 
> I guess this should be
> 
>    if ( szDir ) {
>       sprintf( pch, "%s/%s", szDir, szFile );
>       if( !access( pch, R_OK ) )
>       return realloc( pch, strlen( pch ) + 1 );
>    }
> 
> I wonder why I works on all other platforms?!

On Windows at least GNUbg is almost always started with --datadir. And I
think if not, szDir is set at some other place before. For the other Unices this
is strange, though.

> > (gdb) run -datadir=/home/pub/lib/gnubg-030102/share/gnubg
> > Starting program: /home/pub/lib/gnubg-030102/bin/gnubg
> > -datadir=/home/pub/lib/gnubg-030102/share/gnubg
> > warning: Unable to find dynamic linker breakpoint function.
> > warning: GDB will be unable to debug shared library initializers
> > warning: and track explicitly loaded dynamic code.
> > GNU Backgammon 0.12  Copyright 1999, 2000, 2001, 2002 Gary Wong.
> > GNU Backgammon is free software, covered by the GNU General Public
> License
> > version 2, and you are welcome to change it and/or distribute copies of
> it
> > under certain conditions.  Type "show copying" to see the conditions.
> > There is absolutely no warranty for GNU Backgammon.  Type "show
> warranty"
> > for
> > details.
> > ld.so.1: /home/pub/lib/gnubg-030102/bin/gnubg: fatal: relocation error:
> file
> > /home/pub/lib/gnubg-030102/bin/gnubg: symbol xmlCatalogResolve:
> referenced
> > symbol not found
> 
> Hmm, something is wrong with your system :-) Or perhaps with your
> version of gdb?!

The first might be. :-( The latter I don't think.

> Can you try my fix above and run gnubg outside the debugger?
> 
> Jørn

Your fix does the job. But obviously I could avoid it by specifying the
datadir as well. Because now I get the second error. It results again in a 
crash.
Could you maybe give me a hint on what could causing this? Maybe
setting/correcting a library path variable?

> ./bin/gnubg 
GNU Backgammon 0.12  Copyright 1999, 2000, 2001, 2002 Gary Wong.
GNU Backgammon is free software, covered by the GNU General Public License
version 2, and you are welcome to change it and/or distribute copies of it
under certain conditions.  Type "show copying" to see the conditions.
There is absolutely no warranty for GNU Backgammon.  Type "show warranty"
for
details.
ld.so.1: ./bin/gnubg: fatal: relocation error: file ./bin/gnubg: symbol
xmlCatalogResolve: referenced symbol not found
Killed

Regards,

        Holger

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]