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

Re: Compiling libgphoto and gphoto2-2.1.4



Thanks for the reply,

I should have been more thorough in my explanation for why I thought
./configure --host=cris was ok. Although it does exit with "*** Could
not determine how to handle \n*** shared libraries!" it has a lot of
lines checking for cris-*, and it finds what it's looking for: (snipped)
checking for cris-strip... cris-strip
checking for cris-gcc... cris-gcc
checking whether cris-gcc accepts -g... yes
checking for /usr/local/cris/cris-axis-elf/bin/ld option to reload
object files... -r
checking for cris-ranlib... (cached) cris-ranlib

checking for cris-strip... (cached) cris-strip
checking for cris-gcc option to produce PIC... -fPIC

However, when I do ./configure --host=cris-axis-linux-gnu I notice that
it has a lot less lines talking about cris-*, and it can't find much/any
of it. And more importantly, at the end of the script it shows the basic
configuration for both libgphoto2 and libgphoto2_port. What worries me
is that it says "Compiler: gcc", which is incorrect (should be cris-gcc
right?). I looked carefully at the configure output, and what happens is
it first configures for libgphoto2, then does a similar configure
process for libgphoto2_port. I can tell the dividing point by these lines:
configure: configuring in libgphoto2_port
configure: running /bin/sh './configure' --prefix=/usr/local 
'--host=cris-axis-linux-gnu' 'host_alias=cris-axis-linux-gnu'
--cache-file=/dev/null --srcdir=.

The point I want to make about the division is it seems like if I get
one working, I should probably be able to do the same thing to get the
other working.

In the first half (./configure --host=cris-axis-linux-gnu for
libgphoto2) I notice lines like these:
checking for cris-axis-linux-gnu-strip... no
checking build system type... i686-pc-linux-gnu

checking host system type... cris-axis-linux-gnu
checking for cris-axis-linux-gnu-ranlib... no

checking for ranlib... ranlib
checking for cris-axis-linux-gnu-file... no

checking for file... /usr/bin/file
checking for cris-axis-linux-gnu-ranlib... ranlib

checking for cris-axis-linux-gnu-strip... strip

Can you understand why I'm befuddled? Did you then try doing make? When
I do make I see it perform gcc on a whole bunch of things, not cris-gcc.
Finally though, when I do make after ./configure
--host=cris-axis-linux-gnu, and then the same in the gphoto2 directory,
I get a binary in the gphoto2 source directory that runs on my
development box. (I've not tried the same binary on the Axis, but unless
I'm really confused, that has no chance of working).

I suppose my next step is to dive into the configure script. I should
check why when I do ./configure --host=cris it finds gcc-cris, but when
I do --host=cris-axis-linux-gnu it does not. I hope what I've described
may tell someone here what the real issue is.

Thanks for the hint about make install. I realized I had no idea where
it would install to (surely not target/cris-axis-linux-gnu/) and was
just going to copy the executable (and the libgphoto2 library) to where
I need them.

Thanks,
Nate

> Nathan.Smith@xxxxxxx.gov wrote:
> > I'm pretty sure ./configure --host=cris is fine, because in 
> config.sub> they have this:
> >         cris | cris-* | etrax*)
> >                 basic_machine=cris-axis
> 
> Actually, it does matter; --host=cris-axis-linux-gnu is needed to 
> pick 
> up the correct compiler.  With just --host=cris you'll pick up the 
> cris-axis-elf-gcc compiler.  (I downloaded libgphoto2-2.1.4, and 
> ./configure --host=cris-axis-linux-gnu works fine.)
> 
> Another thing (in reply to your original e-mail): you probably 
> don't 
> want to do a 'make install' without either modifying the resulting 
> makefile or providing an alternate install directory when invoking 
> configure.
> 
> -- 
> Orjan Friberg
> Axis Communications
> 
>