[Top][All Lists]

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

Re: Compiling into chroot

From: Alon Bar-Lev
Subject: Re: Compiling into chroot
Date: Thu, 12 Jun 2008 23:34:32 +0300

On 6/12/08, Bob Friesenhahn <address@hidden> wrote:
> On Thu, 12 Jun 2008, Alon Bar-Lev wrote:
> >
> > Because of this configure --prefix=/ is used, so embedded paths will
> > be relative to root and not directory in host system.
> > So the only issue is with libtool.
> >
>  Libtool is not aware of --prefix!  It only knows the paths given to it and
> what it learns from its environment.

Because of this we recommend an environment variable.
So that it can substract it from the path to determine the path on the chroot.

> > This is the simplest, as execution of commands within the chroot is
> > impossible. As it may be cross compile and target is not operational.
> >
>  Commands may be executed if the chroot environment is sufficiently updated
> to make it possible.

How? If this is for different CPU?
I have the same issue with cross compile to mips, I compile initramfs.
Do you mean that you need a libtool something to run on my embedded
initramfs to fix up the mess at runtime?

> > As far as I understand, you can add FAKEROOT into each path variable
> > read from .la files, and removed before writing the .la files. Also
> > removed from all operations during the finish stage.
> >
>  How does this mesh with libltdl (which also reads .la files) and test
> suites?  It seems that libltdl would also need to know about FAKEROOT, which
> results in every application using libltdl responding to FAKEROOT.  There
> may be additional security issues here similar to LD_LIBRARY_PATH, but worse
> since the compromised application could setenv FAKEROOT before a module is
> loaded and cause a compromised module/library to be loaded.

I don't understand!
If all pathes within the .la files are relative to the FAKEROOT, the
libltdl which runs within the chroot environment will find the files
exactly where .la files reference to.
All the work should be done so that within the chroot environment all
files will be as if they were compiled within it.

> > But as libtool script is so complex it is very difficult to provide a
> > solution to outsiders.
> >
>  A well kept secret is that the libtool maintainers also consider the
> libtool script to be quite complex. :-)

I figured this out... Even libtool-2 with all its cleanups is very complex.


reply via email to

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