Guenter | 22 Apr 2012 14:35

problem with cross-compile install

Hi,
I just found an issue with 'make install' when cross-compiling:
the libs are stored in $prefix/lib64 if the build system is 64-bit while 
they are stored in $prefix/lib on a 32-bit build system.
It seems that the decision if the subfolder is named 'lib' or 'lib64' is 
made based on the build system and not on the host system as it should 
be. I've no idea if that can be fixed at all for cross-compilation since 
I doubt that configure (or where is it decided?) knows if the host 
compiler produces 64 or 32 bit libraries ...
but its probably a good idea to always use 'lib' when cross-compiling ...
anyone have some ideas?

This happens with both c-ares and curl, and IIRC with libssh2 too ...

Gün.

Daniel Stenberg | 22 Apr 2012 15:15
Picon
Favicon
Gravatar

Re: problem with cross-compile install

On Sun, 22 Apr 2012, Guenter wrote:

> but its probably a good idea to always use 'lib' when cross-compiling ... 
> anyone have some ideas?

I agree with this. lib seems more conservative and less risk of being wrong.

--

-- 

  / daniel.haxx.se

Yang Tse | 23 Apr 2012 15:54
Picon

Re: problem with cross-compile install

On Sun, Apr 22, 2012 at 2:35 PM, Guenter <lists@...> wrote:

> Hi,
> I just found an issue with 'make install' when cross-compiling:
> the libs are stored in $prefix/lib64 if the build system is 64-bit while
> they are stored in $prefix/lib on a 32-bit build system.
> [...]
> but its probably a good idea to always use 'lib' when cross-compiling ...
> anyone have some ideas?

We do nothing funny in our configure script or Makefile.am files
relative to the 'install' target of generated makefiles. Whatever we
get is whatever 'automake' decides is appropriate to generate. So in
case there is something blatantly wrong this should most likely be
directed to the automake mailing list.

Are you attempting to run 'make-install' in the cross compiling
environment or in the actual destination machine? I believe that it is
in the cross compiling environment in order to allow other build
processes to locate the cross compiled library.

Are you using '--prefix' when running configure?

Are you setting DESTDIR environment variable before running 'make install'?

--

-- 
-=[Yang]=-

Guenter | 24 Apr 2012 11:14

Re: problem with cross-compile install

Hi Yang,
Am 23.04.2012 15:54, schrieb Yang Tse:
> We do nothing funny in our configure script or Makefile.am files
> relative to the 'install' target of generated makefiles. Whatever we
> get is whatever 'automake' decides is appropriate to generate. So in
> case there is something blatantly wrong this should most likely be
> directed to the automake mailing list.
true.

> Are you attempting to run 'make-install' in the cross compiling
> environment or in the actual destination machine? I believe that it is
> in the cross compiling environment in order to allow other build
> processes to locate the cross compiled library.
yes.

> Are you using '--prefix' when running configure?
yes.

> Are you setting DESTDIR environment variable before running 'make install'?
no. I do now use:
--prefix=${IPREFIX} --libdir=${IPREFIX}/lib
which fixes this issue, so I can live with that ...

thanks for looking into it!

Gün.


Gmane