On 7/4/2019 5:13 PM, Ken Moffat via blfs-support wrote:
On Thu, Jul 04, 2019 at 07:54:48PM +0000, DJ Lucas via blfs-support wrote:
Or more specifically, my Python 2 is unable to run mach.

Creating config.status
Traceback (most recent call last):
   File "../js/src/../../configure.py", line 127, in <module>
     sys.exit(main(sys.argv))
   File "../js/src/../../configure.py", line 34, in main
     return config_status(config)
   File "../js/src/../../configure.py", line 122, in config_status
     return config_status(args=[], **encode(sanitized_config, encoding))
   File "/sources/mozjs-60.1.0/python/mozbuild/mozbuild/config_status.py",
line 133, in config_status
     reader = BuildReader(env)
   File "/sources/mozjs-60.1.0/python/mozbuild/mozbuild/frontend/reader.py",
line 868, in __init__
     self._gyp_worker_pool = ProcessPoolExecutor(max_workers=max_workers)
   File 
"/sources/mozjs-60.1.0/third_party/python/futures/concurrent/futures/process.py",
line 285, in __init__
     EXTRA_QUEUED_CALLS)
   File "/usr/lib/python2.7/multiprocessing/__init__.py", line 217, in Queue
     from multiprocessing.queues import Queue
   File "/sources/mozjs-60.1.0/build/mach_bootstrap.py", line 363, in
__call__
     module = self._original_import(name, globals, locals, fromlist, level)
   File "/usr/lib/python2.7/multiprocessing/queues.py", line 48, in <module>
     from .synchronize import Lock, BoundedSemaphore, Semaphore, Condition
   File "/sources/mozjs-60.1.0/build/mach_bootstrap.py", line 363, in
__call__
     module = self._original_import(name, globals, locals, fromlist, level)
   File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 59, in
<module>
     " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation,
therefore, the required synchronization primitives needed will not function,
see issue 3770.

After booting into the system, I was still unable to run mach. Rebuilding
Python2 from the real environment fixes the issue, but I'm unsure as to why
ATM. I do have both /run and /dev/shm bind mounted in the chroot environment
and have for years. This might even be the problem as /dev/shm is a smylink
now days, and it's easy enough to get around, but was never a problem before
very recently. I used to build in chroot all the way to a full Gnome
environment. I suppose it's too late to go back and investigate at this
point, but anybody else run across this, or is it a me problem (likely my
stone age chroot script)?

--DJ

I had something similar last November, I'd booted the new system and
then gone back to chroot so that I could use some things which get
built much, much later - and was meanwhile continuing the new build.

 From my notes at the time, I was trying to build firefox-63-ish. The
last part before it reported OSError: was somewhat similar =

  0:13.31   File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, 
in __init__
  0:13.31     sl = self._semlock = _multiprocessing.SemLock(kind, value, 
maxvalue)

For me,
https://lists.gnu.org/archive/html/guix-devel/2014-01/msg00144.html
was the important link and the solution (on the host) was apparently

  #mount --bind /run /mnt/lfs/run

Unfortunately, that was recent enough for me to remember that I'd
seen something similar, but long enough ago that I've forgotten the
details.
Mystery solved, PEBKAC. :-) That was the answer despite my declaration to the contrary. /run was *not* mounted as I had thought it was. Sorry for the noise.

For reference, I use the following simple script (updated for may mistake):

#!/bin/bash
LFS="/media/lfs"
FIRST_IN=0

mount | grep "${LFS}/dev" && FIRST_IN=1

if test "${FIRST_IN}" == "0"; then
    sudo mount --bind /dev "${LFS}/dev"
    sudo mount --bind /dev/pts "${LFS}/dev/pts"
    sudo mount --bind /dev/shm "${LFS}/dev/shm"
    sudo mount --bind /proc "${LFS}/proc"
    sudo mount --bind /sys "${LFS}/sys"
    sudo mount --bind /run "${LFS}/run"
fi

sudo chroot "${LFS}" /usr/bin/env -i   \
    HOME=/root TERM="${TERM}"          \
    PS1='(lfs chroot) \u:\w\$ '        \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    SSH_CLIENT="${SSH_CLIENT}"         \
    /bin/bash --login

if test "${FIRST_IN}" == "0"; then
    sudo umount "${LFS}/run"
    sudo umount "${LFS}/sys"
    sudo umount "${LFS}/proc"
    sudo umount "${LFS}/dev/shm"
    sudo umount "${LFS}/dev/pts"
    sudo umount "${LFS}/dev"
fi

If not immediately obvious, can enter chroot multiple times without stepping on the other session (as long as the first session in is also the last session out).

--DJ

--
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