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

Re: Compiling libgphoto and gphoto2-2.1.4



I'm pretty sure ./configure --host=cris is fine, because in config.sub
they have this:
        cris | cris-* | etrax*)
                basic_machine=cris-axis

Now, configure fails like this: 
checking for dlopen... no
checking for dlopen in -ldl... no
configure: error:
*** Could not determine how to handle
*** shared libraries!

I've pulled a consecutive piece out of the configure file that mentions
dlopen. If I remember, dlopen is used to open dyname libraries within
code. I've never done this, I've just read about it. But I don't
understand much more than that. If anyone has any more concrete paths to
follow, I'd appreciate it. I've put ***'s on the lines that seem to
relate to the error.

if test $ac_cv_lib_dld_shl_load = yes; then
  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
  echo "$as_me:$LINENO: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
if test "${ac_cv_func_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char dlopen (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
/* 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 dlopen ();
/* 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_dlopen) || defined (__stub___dlopen)
choke me
#else
char (*f) () = dlopen;
#endif
#ifdef __cplusplus
}
#endif

int
main ()
{
return f != dlopen;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  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
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_func_dlopen=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_func_dlopen=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
if test $ac_cv_func_dlopen = yes; then
  lt_cv_dlopen="dlopen"
else
  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5  ***********
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6  ***********
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext


//This is the very end of the file

echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
  LTDL_LIBS="-ldl"
else
  { { echo "$as_me:$LINENO: error:
*** Could not determine how to handle
*** shared libraries!" >&5
echo "$as_me: error:
*** Could not determine how to handle
*** shared libraries!" >&2;}
   { (exit 1); exit 1; }; }
fi
                                                                       
        
fi
                                                                       
        
fi
                                                                       
        

Thanks to anyone if they can give me concrete information, or vague
pointers so I can understand this stuff.
-Nate

> Nathan.Smith@xxxxxxx.gov wrote:
> > 
> > I'm at a loss because I'm not familiar at all with libraries, beyond
> > that they are required for some programs to work. What libraries are
> > shared, and how do I tell it how to handle them? Has anyone compiled
> > gphoto for the Axis, or can explain to me what I need to do to get
> > libgphoto to work with gphoto? I will then compile gphoto in a 
> similar> way, do ./configure --host=cris && make.
> 
> I think you should be using --host=cris-axis-linux-gnu.  If that 
> doesn't 
> help, you have check the configure script to see what it's trying 
> to do. 
>  Also, the dev-etrax archive (at 
> http://mhonarc.axis.se/dev-etrax/maillist.html) has a few threads 
> on 
> using configure for cross-compilation (search for "configure").
> 
> -- 
> Orjan Friberg
> Axis Communications
> 
>