Page 1 of 1

Possible bug in the configure script?

Posted: 19 Apr 2005, 17:39
by Pajarico
Hi all,
Im' running amd64 + gentoo, and the configure script only detects guichan if I compile it from source manually.
When i do that the libs are installed under /usr/local/lib

If use the ebuild the libs seems to compile just fine and are installed under /usr/lib64, but they aren't detected.

/usr/lib64 is a symlink to /usr/lib.


Posted: 19 Apr 2005, 18:01
by Bjørn
I think you just need to check closer your system setup and environment. There should be anything in the generated configure script related to those locations.

Posted: 19 Apr 2005, 18:20
by Pajarico
This the part with references to guichan:

Code: Select all

# Checks for libraries
# (someone may want to exchange these symbols with
#  something more meaningful in the future /- kth5)

echo "$as_me:$LINENO: checking for gcnGuichanVersion in -lguichan" >&5
echo $ECHO_N "checking for gcnGuichanVersion in -lguichan... $ECHO_C" >&6
if test "${ac_cv_lib_guichan_gcnGuichanVersion+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
LIBS="-lguichan  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gcnGuichanVersion ();
main ()
gcnGuichanVersion ();
  return 0;
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_cv_lib_guichan_gcnGuichanVersion" >&5
echo "${ECHO_T}$ac_cv_lib_guichan_gcnGuichanVersion" >&6
if test $ac_cv_lib_guichan_gcnGuichanVersion = yes; then
  cat >>confdefs.h <<_ACEOF

  LIBS="-lguichan $LIBS"

  { { echo "$as_me:$LINENO: error:  *** Unable to find Guichan library (" >&5
echo "$as_me: error:  *** Unable to find Guichan library (" >&2;}
   { (exit 1); exit 1; }; }

#AC_CHECK_LIB([guichan_sdl], [gcnSDL], ,
#AC_MSG_ERROR([ *** Unable to find Guichan SDL library (]))

#AC_CHECK_LIB([guichan_opengl], [gcnOpenGL], ,
#AC_MSG_ERROR([ *** Unable to find Guichan OpenGL library (]))
I could look into it but I just don't understand it.


Posted: 21 Apr 2005, 12:25
by Bjørn
Well that's generated code which anybody would have a hard time understanding. :-) The idea is that it uses a minimal source file containing a certain function from Guichan and then tries to compile and link it, checking if any error occurs. It should work for Guichan 0.3.0, it won't for any older version.

There's not much we can do about it because all we did was specify the following check in

AC_CHECK_LIB([guichan], [gcnGuichanVersion], ,
AC_MSG_ERROR([ *** Unable to find Guichan library (]))

If you think nothing is wrong with your environment, you can try taking out the check completely and cross your fingers while you run make. Probably better is to check config.log to find out why ./configure fails on this test.