gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Go as SPEC benchmark?


From: James Fulton Koehler
Subject: Re: [gnugo-devel] Go as SPEC benchmark?
Date: Mon, 18 Nov 2002 22:10:53 -0600

Arend Bayer wrote:

> Jim Koehler wrote:
>
> >    I'll append the typescript from the configure --without-curses and
> > then a paste of the screen from the execution and gdb session.  The
> > parts are appended as two forwarded emails.
>
> > $ ./configure --without-curses' 
> (...)
>
> This didn't work:
>
> > $ make
> (...)
>
> >         cc  -g   -o extract_fuseki  extract_fuseki.o
> > ../engine/libengine.a libpatterns.a ../engine/libengine.a libpatterns.a
> > ../sgf/libsgf.a ../utils/libutils.a libdfa.a -lcurses -lm
>                                                 ^^^^^
> (Similar at other places.) This shouldn't be there.
>
> There are horribly many checks for curses in configure.in, but even
> with ./configure --disable-color --disable-curses --without-curses I
> could not get rid of it.
>
> It seems to that the problem is the test for HAVE_CURSES_ARROW which
> was apparently added for debugboard. (It also introduces the
> unnecessary --enable-curses and --disable-curses
>
> (Btw, for reasons unknown to me, ./configure does not complain about
> misspelled options.)
>
> Jim, if you could try the patch below, that would be great.
> (And re-run ./configure.)
> (This patch kills the "-lcurses" from all Makefiles for me.)
>
> > GNU Go is thinking...
> > Memory fault(coredump)
> > 998 zera 802>
> > 998 zera 802> gdb ./interface/gnugo core
> > HP gdb 1.3.00
> > Copyright 1986 - 1999 Free Software Foundation, Inc.
> > Hewlett-Packard Wildebeest 1.3.00 (based on GDB 4.17-hpwdb-980821)
> > Wildebeest is free software, covered by the GNU General Public License,
> > 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 Wildebeest.  Type "show warranty" for
> > details.
> > Wildebeest was built for ia64-hp-hpux11.20
> > and target ia64-hp-hpux11.20.
> > ..
> > Core was generated by `gnugo'.
> > Program terminated with signal 11, Segmentation fault.
> > #0  0x410d460:0 in clear_move_reasons () at move_reasons.c:111
> > 111           move[ii].value                  = 0.0;
> > (gdb) bt
> > #0  0x410d460:0 in clear_move_reasons () at move_reasons.c:111
> > #1  0x40e2ff0:0 in reset_engine () at genmove.c:86
> > #2  0x40e4620:0 in do_genmove (move=0x7ffff550, color=1,
> >     pure_threat_value=0.400000006) at genmove.c:336
> > #3  0x40e40f0:0 in genmove (i=0x7ffff570, j=0x7ffff574, color=1)
> >     at genmove.c:274
> > #4  0x40ff1c0:0 in gnugo_genmove (i=0x7ffff570, j=0x7ffff574, color=1)
> >     at interface.c:269
> > #5  0x407cee0:0 in computer_move (gameinfo=0x7ffff688,
> > passes=0x7ffff5bc)
> >     at play_ascii.c:454
> > #6  0x407d7e0:0 in do_move (gameinfo=0x7ffff688,
> >     command=0x7ffff5c0 <Address 0x7ffff5c0 out of bounds>,
>                         ^^^^^^^
> This also should not happen AFAIK.
>
> Arend
>
> > passes=0x7ffff5bc,
> >     force=0) at play_ascii.c:518
> > #7  0x407f460:0 in play_ascii (tree=0x7ffff678, gameinfo=0x7ffff688,
> >     filename=0x0, until=0x0) at play_ascii.c:775
> > #8  0x4078fb0:0 in main (argc=1, argv=0x7ffffa38) at main.c:1128
> > (gdb)
>
> And the patch:
>
> diff -X /home/arend/.diffignore -ur ./configure 
> ../gnugo-3.2-without-curses/configure
> --- ./configure Wed Apr 24 14:04:10 2002
> +++ ../gnugo-3.2-without-curses/configure       Mon Nov 18 20:12:35 2002
> @@ -4255,226 +4255,6 @@
>
>  fi
>
> -if test "$curses_header" != "no";then
> -  echo "$as_me:4259: checking for library containing initscr" >&5
> -echo $ECHO_N "checking for library containing initscr... $ECHO_C" >&6
> -if test "${ac_cv_search_initscr+set}" = set; then
> -  echo $ECHO_N "(cached) $ECHO_C" >&6
> -else
> -  ac_func_search_save_LIBS=$LIBS
> -ac_cv_search_initscr=no
> -cat >conftest.$ac_ext <<_ACEOF
> -#line 4267 "configure"
> -#include "confdefs.h"
> -
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -#ifdef __cplusplus
> -extern "C"
> -#endif
> -/* We use char because int might match the return type of a gcc2
> -   builtin and then its argument prototype would still apply.  */
> -char initscr ();
> -int
> -main ()
> -{
> -initscr ();
> -  ;
> -  return 0;
> -}
> -_ACEOF
> -rm -f conftest.$ac_objext conftest$ac_exeext
> -if { (eval echo "$as_me:4286: \"$ac_link\"") >&5
> -  (eval $ac_link) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4289: \$? = $ac_status" >&5
> -  (exit $ac_status); } &&
> -         { ac_try='test -s conftest$ac_exeext'
> -  { (eval echo "$as_me:4292: \"$ac_try\"") >&5
> -  (eval $ac_try) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4295: \$? = $ac_status" >&5
> -  (exit $ac_status); }; }; then
> -  ac_cv_search_initscr="none required"
> -else
> -  echo "$as_me: failed program was:" >&5
> -cat conftest.$ac_ext >&5
> -fi
> -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
> -if test "$ac_cv_search_initscr" = no; then
> -  for ac_lib in ncurses curses pdcurses termcap terminfo termlib; do
> -    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
> -    cat >conftest.$ac_ext <<_ACEOF
> -#line 4307 "configure"
> -#include "confdefs.h"
> -
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -#ifdef __cplusplus
> -extern "C"
> -#endif
> -/* We use char because int might match the return type of a gcc2
> -   builtin and then its argument prototype would still apply.  */
> -char initscr ();
> -int
> -main ()
> -{
> -initscr ();
> -  ;
> -  return 0;
> -}
> -_ACEOF
> -rm -f conftest.$ac_objext conftest$ac_exeext
> -if { (eval echo "$as_me:4326: \"$ac_link\"") >&5
> -  (eval $ac_link) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4329: \$? = $ac_status" >&5
> -  (exit $ac_status); } &&
> -         { ac_try='test -s conftest$ac_exeext'
> -  { (eval echo "$as_me:4332: \"$ac_try\"") >&5
> -  (eval $ac_try) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4335: \$? = $ac_status" >&5
> -  (exit $ac_status); }; }; then
> -  ac_cv_search_initscr="-l$ac_lib"
> -break
> -else
> -  echo "$as_me: failed program was:" >&5
> -cat conftest.$ac_ext >&5
> -fi
> -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
> -  done
> -fi
> -LIBS=$ac_func_search_save_LIBS
> -fi
> -echo "$as_me:4348: result: $ac_cv_search_initscr" >&5
> -echo "${ECHO_T}$ac_cv_search_initscr" >&6
> -if test "$ac_cv_search_initscr" != no; then
> -  test "$ac_cv_search_initscr" = "none required" || 
> LIBS="$ac_cv_search_initscr $LIBS"
> -
> -fi
> -
> -  if test "$ac_cv_search_initscr" != "no";then
> -    cat >>confdefs.h <<\EOF
> -#define CURSES 1
> -EOF
> -
> -for ac_func in vwprintw keypad
> -do
> -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
> -echo "$as_me:4363: checking for $ac_func" >&5
> -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
> -if eval "test \"\${$as_ac_var+set}\" = set"; then
> -  echo $ECHO_N "(cached) $ECHO_C" >&6
> -else
> -  cat >conftest.$ac_ext <<_ACEOF
> -#line 4369 "configure"
> -#include "confdefs.h"
> -/* System header to define __stub macros and hopefully few prototypes,
> -    which can conflict with char $ac_func (); below.  */
> -#include <assert.h>
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -#ifdef __cplusplus
> -extern "C"
> -#endif
> -/* We use char because int might match the return type of a gcc2
> -   builtin and then its argument prototype would still apply.  */
> -char $ac_func ();
> -char (*f) ();
> -
> -int
> -main ()
> -{
> -/* The GNU C library defines this for functions which it implements
> -    to always fail with ENOSYS.  Some functions are actually named
> -    something starting with __ and the normal name is an alias.  */
> -#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
> -choke me
> -#else
> -f = $ac_func;
> -#endif
> -
> -  ;
> -  return 0;
> -}
> -_ACEOF
> -rm -f conftest.$ac_objext conftest$ac_exeext
> -if { (eval echo "$as_me:4400: \"$ac_link\"") >&5
> -  (eval $ac_link) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4403: \$? = $ac_status" >&5
> -  (exit $ac_status); } &&
> -         { ac_try='test -s conftest$ac_exeext'
> -  { (eval echo "$as_me:4406: \"$ac_try\"") >&5
> -  (eval $ac_try) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4409: \$? = $ac_status" >&5
> -  (exit $ac_status); }; }; then
> -  eval "$as_ac_var=yes"
> -else
> -  echo "$as_me: failed program was:" >&5
> -cat conftest.$ac_ext >&5
> -eval "$as_ac_var=no"
> -fi
> -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
> -fi
> -echo "$as_me:4419: result: `eval echo '${'$as_ac_var'}'`" >&5
> -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
> -if test `eval echo '${'$as_ac_var'}'` = yes; then
> -  cat >>confdefs.h <<EOF
> -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
> -EOF
> -
> -fi
> -done
> -
> -    echo "$as_me:4429: checking for KEY_UP" >&5
> -echo $ECHO_N "checking for KEY_UP... $ECHO_C" >&6
> -if test "${gnugo_cv_decl_key_up+set}" = set; then
> -  echo $ECHO_N "(cached) $ECHO_C" >&6
> -else
> -  cat >conftest.$ac_ext <<_ACEOF
> -#line 4435 "configure"
> -#include "confdefs.h"
> -#include <$curses_header>
> -int
> -main ()
> -{
> -int c=KEY_UP
> -  ;
> -  return 0;
> -}
> -_ACEOF
> -rm -f conftest.$ac_objext
> -if { (eval echo "$as_me:4447: \"$ac_compile\"") >&5
> -  (eval $ac_compile) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4450: \$? = $ac_status" >&5
> -  (exit $ac_status); } &&
> -         { ac_try='test -s conftest.$ac_objext'
> -  { (eval echo "$as_me:4453: \"$ac_try\"") >&5
> -  (eval $ac_try) 2>&5
> -  ac_status=$?
> -  echo "$as_me:4456: \$? = $ac_status" >&5
> -  (exit $ac_status); }; }; then
> -  gnugo_cv_decl_key_up="yes"
> -else
> -  echo "$as_me: failed program was:" >&5
> -cat conftest.$ac_ext >&5
> -gnugo_cv_decl_key_up="no"
> -fi
> -rm -f conftest.$ac_objext conftest.$ac_ext
> -
> -fi
> -echo "$as_me:4467: result: $gnugo_cv_decl_key_up" >&5
> -echo "${ECHO_T}$gnugo_cv_decl_key_up" >&6
> -    if test "$gnugo_cv_decl_key_up" = "yes";then
> -      cat >>confdefs.h <<\EOF
> -#define HAVE_CURSES_ARROWS 1
> -EOF
> -
> -    fi
> -  fi
> -fi
> -
>  tmp_color_result="none"
>
>  if test "$with_curses" != no -a "$enable_color" != no ; then
> @@ -4482,7 +4262,7 @@
>
>          if test "$term_header" != "no" -a "$curses_header" != "no" ; then
>
> -        echo "$as_me:4485: checking for library containing tparm" >&5
> +        echo "$as_me:4265: checking for library containing tparm" >&5
>  echo $ECHO_N "checking for library containing tparm... $ECHO_C" >&6
>  if test "${ac_cv_search_tparm+set}" = set; then
>    echo $ECHO_N "(cached) $ECHO_C" >&6
> @@ -4490,7 +4270,7 @@
>    ac_func_search_save_LIBS=$LIBS
>  ac_cv_search_tparm=no
>  cat >conftest.$ac_ext <<_ACEOF
> -#line 4493 "configure"
> +#line 4273 "configure"
>  #include "confdefs.h"
>
>  /* Override any gcc2 internal prototype to avoid an error.  */
> @@ -4509,16 +4289,16 @@
>  }
>  _ACEOF
>  rm -f conftest.$ac_objext conftest$ac_exeext
> -if { (eval echo "$as_me:4512: \"$ac_link\"") >&5
> +if { (eval echo "$as_me:4292: \"$ac_link\"") >&5
>    (eval $ac_link) 2>&5
>    ac_status=$?
> -  echo "$as_me:4515: \$? = $ac_status" >&5
> +  echo "$as_me:4295: \$? = $ac_status" >&5
>    (exit $ac_status); } &&
>           { ac_try='test -s conftest$ac_exeext'
> -  { (eval echo "$as_me:4518: \"$ac_try\"") >&5
> +  { (eval echo "$as_me:4298: \"$ac_try\"") >&5
>    (eval $ac_try) 2>&5
>    ac_status=$?
> -  echo "$as_me:4521: \$? = $ac_status" >&5
> +  echo "$as_me:4301: \$? = $ac_status" >&5
>    (exit $ac_status); }; }; then
>    ac_cv_search_tparm="none required"
>  else
> @@ -4530,7 +4310,7 @@
>    for ac_lib in ncurses curses pdcurses termcap terminfo termlib; do
>      LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
>      cat >conftest.$ac_ext <<_ACEOF
> -#line 4533 "configure"
> +#line 4313 "configure"
>  #include "confdefs.h"
>
>  /* Override any gcc2 internal prototype to avoid an error.  */
> @@ -4549,16 +4329,16 @@
>  }
>  _ACEOF
>  rm -f conftest.$ac_objext conftest$ac_exeext
> -if { (eval echo "$as_me:4552: \"$ac_link\"") >&5
> +if { (eval echo "$as_me:4332: \"$ac_link\"") >&5
>    (eval $ac_link) 2>&5
>    ac_status=$?
> -  echo "$as_me:4555: \$? = $ac_status" >&5
> +  echo "$as_me:4335: \$? = $ac_status" >&5
>    (exit $ac_status); } &&
>           { ac_try='test -s conftest$ac_exeext'
> -  { (eval echo "$as_me:4558: \"$ac_try\"") >&5
> +  { (eval echo "$as_me:4338: \"$ac_try\"") >&5
>    (eval $ac_try) 2>&5
>    ac_status=$?
> -  echo "$as_me:4561: \$? = $ac_status" >&5
> +  echo "$as_me:4341: \$? = $ac_status" >&5
>    (exit $ac_status); }; }; then
>    ac_cv_search_tparm="-l$ac_lib"
>  break
> @@ -4571,7 +4351,7 @@
>  fi
>  LIBS=$ac_func_search_save_LIBS
>  fi
> -echo "$as_me:4574: result: $ac_cv_search_tparm" >&5
> +echo "$as_me:4354: result: $ac_cv_search_tparm" >&5
>  echo "${ECHO_T}$ac_cv_search_tparm" >&6
>  if test "$ac_cv_search_tparm" != no; then
>    test "$ac_cv_search_tparm" = "none required" || LIBS="$ac_cv_search_tparm 
> $LIBS"
> @@ -4597,9 +4377,9 @@
>
>  fi
>
> -echo "$as_me:4600: checking for color support" >&5
> +echo "$as_me:4380: checking for color support" >&5
>  echo $ECHO_N "checking for color support... $ECHO_C" >&6
> -echo "$as_me:4602: result: $tmp_color_result" >&5
> +echo "$as_me:4382: result: $tmp_color_result" >&5
>  echo "${ECHO_T}$tmp_color_result" >&6
>
>  if test "$enable_grid_opt" = "distrust" ; then
> @@ -4870,7 +4650,7 @@
>  : ${CONFIG_STATUS=./config.status}
>  ac_clean_files_save=$ac_clean_files
>  ac_clean_files="$ac_clean_files $CONFIG_STATUS"
> -{ echo "$as_me:4873: creating $CONFIG_STATUS" >&5
> +{ echo "$as_me:4653: creating $CONFIG_STATUS" >&5
>  echo "$as_me: creating $CONFIG_STATUS" >&6;}
>  cat >$CONFIG_STATUS <<_ACEOF
>  #! $SHELL
> @@ -5046,7 +4826,7 @@
>      echo "$ac_cs_version"; exit 0 ;;
>    --he | --h)
>      # Conflict between --help and --header
> -    { { echo "$as_me:5049: error: ambiguous option: $1
> +    { { echo "$as_me:4829: error: ambiguous option: $1
>  Try \`$0 --help' for more information." >&5
>  echo "$as_me: error: ambiguous option: $1
>  Try \`$0 --help' for more information." >&2;}
> @@ -5065,7 +4845,7 @@
>      ac_need_defaults=false;;
>
>    # This is an error.
> -  -*) { { echo "$as_me:5068: error: unrecognized option: $1
> +  -*) { { echo "$as_me:4848: error: unrecognized option: $1
>  Try \`$0 --help' for more information." >&5
>  echo "$as_me: error: unrecognized option: $1
>  Try \`$0 --help' for more information." >&2;}
> @@ -5122,7 +4902,7 @@
>    "config.vc" ) CONFIG_FILES="$CONFIG_FILES config.vc:config.vcin" ;;
>    "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
>    "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
> -  *) { { echo "$as_me:5125: error: invalid argument: $ac_config_target" >&5
> +  *) { { echo "$as_me:4905: error: invalid argument: $ac_config_target" >&5
>  echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
>     { (exit 1); exit 1; }; };;
>    esac
> @@ -5362,7 +5142,7 @@
>    esac
>
>    if test x"$ac_file" != x-; then
> -    { echo "$as_me:5365: creating $ac_file" >&5
> +    { echo "$as_me:5145: creating $ac_file" >&5
>  echo "$as_me: creating $ac_file" >&6;}
>      rm -f "$ac_file"
>    fi
> @@ -5380,7 +5160,7 @@
>        -) echo $tmp/stdin ;;
>        [\\/$]*)
>           # Absolute (can't be DOS-style, as IFS=:)
> -         test -f "$f" || { { echo "$as_me:5383: error: cannot find input 
> file: $f" >&5
> +         test -f "$f" || { { echo "$as_me:5163: error: cannot find input 
> file: $f" >&5
>  echo "$as_me: error: cannot find input file: $f" >&2;}
>     { (exit 1); exit 1; }; }
>           echo $f;;
> @@ -5393,7 +5173,7 @@
>             echo $srcdir/$f
>           else
>             # /dev/null tree
> -           { { echo "$as_me:5396: error: cannot find input file: $f" >&5
> +           { { echo "$as_me:5176: error: cannot find input file: $f" >&5
>  echo "$as_me: error: cannot find input file: $f" >&2;}
>     { (exit 1); exit 1; }; }
>           fi;;
> @@ -5454,7 +5234,7 @@
>    * )   ac_file_in=$ac_file.in ;;
>    esac
>
> -  test x"$ac_file" != x- && { echo "$as_me:5457: creating $ac_file" >&5
> +  test x"$ac_file" != x- && { echo "$as_me:5237: creating $ac_file" >&5
>  echo "$as_me: creating $ac_file" >&6;}
>
>    # First look for the input files in the build tree, otherwise in the
> @@ -5465,7 +5245,7 @@
>        -) echo $tmp/stdin ;;
>        [\\/$]*)
>           # Absolute (can't be DOS-style, as IFS=:)
> -         test -f "$f" || { { echo "$as_me:5468: error: cannot find input 
> file: $f" >&5
> +         test -f "$f" || { { echo "$as_me:5248: error: cannot find input 
> file: $f" >&5
>  echo "$as_me: error: cannot find input file: $f" >&2;}
>     { (exit 1); exit 1; }; }
>           echo $f;;
> @@ -5478,7 +5258,7 @@
>             echo $srcdir/$f
>           else
>             # /dev/null tree
> -           { { echo "$as_me:5481: error: cannot find input file: $f" >&5
> +           { { echo "$as_me:5261: error: cannot find input file: $f" >&5
>  echo "$as_me: error: cannot find input file: $f" >&2;}
>     { (exit 1); exit 1; }; }
>           fi;;
> @@ -5595,7 +5375,7 @@
>    rm -f $tmp/in
>    if test x"$ac_file" != x-; then
>      if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
> -      { echo "$as_me:5598: $ac_file is unchanged" >&5
> +      { echo "$as_me:5378: $ac_file is unchanged" >&5
>  echo "$as_me: $ac_file is unchanged" >&6;}
>      else
>        ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
> diff -X /home/arend/.diffignore -ur ./configure.in 
> ../gnugo-3.2-without-curses/configure.in
> --- ./configure.in      Wed Apr 24 13:54:21 2002
> +++ ../gnugo-3.2-without-curses/configure.in    Mon Nov 18 20:12:09 2002
> @@ -226,30 +226,7 @@
>
>  dnl check for a working curses library for use in debugboard
>
> -AH_TEMPLATE([CURSES],
> -[Define to use curses for color debugging])
> -
> -AH_TEMPLATE([HAVE_CURSES_ARROWS],
> -[Define if the curses headers defines  KEY_{UP,DOWN,LEFT,RIGHT}])
> -
> -if test "$curses_header" != "no";then
> -  AC_SEARCH_LIBS(initscr,ncurses curses pdcurses termcap terminfo termlib)
> -  if test "$ac_cv_search_initscr" != "no";then
> -    AC_DEFINE(CURSES)
> -    AC_CHECK_FUNCS(vwprintw keypad)
> -    AC_CACHE_CHECK(
> -       [for KEY_UP],
> -       gnugo_cv_decl_key_up,
> -       AC_TRY_COMPILE([#include <$curses_header>],
> -               [int c=KEY_UP],
> -               gnugo_cv_decl_key_up="yes",
> -               gnugo_cv_decl_key_up="no")
> -    )
> -    if test "$gnugo_cv_decl_key_up" = "yes";then
> -      AC_DEFINE(HAVE_CURSES_ARROWS)
> -    fi
> -  fi
> -fi
> +dnl Killed. /ab
>
>  dnl -------- color debugging support -----------

 This change and  "configure --without-curses" enabled me to configure, make, 
and run.  More
details later.

 - Jim





reply via email to

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