On 3/22/20 5:50 PM, Ken Moffat via blfs-support wrote:
On Sun, Mar 22, 2020 at 04:41:58PM -0500, Bruce Dubbs via blfs-support wrote:
On 3/22/20 4:14 PM, Ken Moffat via blfs-support wrote:
On Sun, Mar 22, 2020 at 08:04:53AM +0000, spiky0011 via blfs-support wrote:
On 22/03/2020 05:30, Nagasayanam, V.S via blfs-support wrote:
Sir,
This is in continuation of my previous mail wherein I expressed my
difficulty in compiling Moxjs-60 in chroot environment in BLFS-9.1. Your
reply is quoted below:

The problem happens in chroot because '/run' is empty.  The fix when
building in chroot is:
# mount --bind /run /mnt/lfs/run

Before your reply was received late last night, I went through Google
again and somewhere I read that compilation should be done in actual LFS
environment. I booted into LFS and ran 'config' command in mozjs
directory. It was a success, much to my relief! I then went back to
chroot environment and finished LXDE installation successfully.

I request that your solution may be added in BLFS book, although I
approached the problem differently with success.
To avoid top posting, I have written a new message. Hope you don't mind.
Thanks for the quick response.
With regards,
Yours,
V S Nagasayanam.

On the Mozls-60 page just before the compile section there is a note

"If installing in the chroot environment, be sure to export the |SHELL|
environment variable or configuration of the package will fail."

Did you see this part?

Spike.


Hi V S and Spike -

this seems to be a different issue from exporting the SHELL
variable.  Usually I do not build a desktop in chroot, but a few
times a year I do, and it has bitten me at least three times.

I'd thought this was probably mentioned in one of the books, but
after grepping in LFS I don't think it is.

The packages which I build while in chroot are only a small subset
of what is in BLFS, but the following have now been mentioned:

firefox

When I first hit this, and found the solution, I decided to rebuild
node-js and I think that was because the log showed it had decided
that multiprocessing was not supported, but had continued anyway.

mozjs60 (68 is not yet in either visible book, but I suspect it
might be affected unless python as rewritten how the multiprocessing
package works)

For thunderbird, I'm unsure if this is needed - but it is based on
firefox-68 and firefox has needed it since at least 53, so probably.

For seamonkey I guess it will also be needed.

The key item for packages where this _is_ needed is that the error
will include

OSError: [Errno 38] Function not implemented

and the lines above that will mention multiprocessing.



So, I suppose that a copy member for all of these packages would be
appropriate.  Or perhaps combine it with the information about SHELL
although I guess node-js might not need that part.  Taking to -dev.

Try this before entering chroot:

$ cat mount-virt.sh
#!/bin/bash

function mountbind
{
    if ! mountpoint $LFS/$1 >/dev/null; then
      $SUDO mount --bind /$1 $LFS/$1
      echo $LFS/$1 mounted
    else
      echo $LFS/$1 already mounted
    fi
}

function mounttype
{
    if ! mountpoint $LFS/$1 >/dev/null; then
      $SUDO mount -t $2 $3 $4 $5 $LFS/$1
      echo $LFS/$1 mounted
    else
      echo $LFS/$1 already mounted
    fi
}

if [ $EUID -ne 0 ]; then
   SUDO=sudo
else
   SUDO=""
fi

if [ x$LFS == x ]; then
   echo "LFS not set"
   exit 1
fi


mountbind dev
mounttype dev/pts devpts devpts -o gid=5,mode=620
mounttype proc    proc   proc
mounttype sys     sysfs  sysfs
mounttype run     tmpfs  run
mkdir $LFS/run/shm
mountbind usr/src
mountbind boot
mountbind home

=====

I think a separate /run would be OK.

Have you tried building firefox in chroot in the last couple of
years, with /run in chroot not mounted ?

I have not. I only need to build about 10 packages in chroot: nfs and openssh mostly. Then I build everything over ssh.

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to