Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LFS 9.1 i386 no-systemd 6.9 Glibc-2.31 'No module named msvcrt'
Hi All,
I am building LFS 9.1 i386 on a Lenovo x61s using MX Linux 18 i386 as the host. Chapter 5 built fine, no errors. I am near the beginning of chapter 6, building Glibc from section 6.9. I mounted the virtual file systems correctly from section 6.2.2. and chrooted correctly from 6.4.
I am getting what looks like a Python module ('subprocess.py') reporting 'msvcrt' module as not found. It appears as though the system type is being mis-identified. I have applied the Glibc patch and applied the case switch for LSB compliance, created the 'build' sub-directory and 'cd'ed into the build directory. In addition, I ran the 'configure' command without any errors.
The compile log output is:
Code:
make -r PARALLELMFLAGS="" -C .. objdir=`pwd` all
make[1]: Entering directory '/sources/glibc-2.31'
type "make help" for help with common glibc makefile targets
make subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory '/sources/glibc-2.31/csu'
python3 -B ../scripts/gen-as-const.py --cc="gcc -ffile-prefix-map=/tools=/usr -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math -fstack-protector-strong -Wstrict-prototypes -Wold-style-definition -fmath-errno -ftls-model=initial-exec -I../include -I/sources/glibc-2.31/build/csu -I/sources/glibc-2.31/build -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch -I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu -I../sysdeps/i386 -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /tools/lib/gcc/i686-pc-linux-gnu/9.2.0/include -isystem /tools/lib/gcc/i686-pc-linux-gnu/9.2.0/include-fixed -isystem /usr/include -D_LIBC_REENTRANT -include /sources/glibc-2.31/build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -DGEN_AS_CONST_HEADERS \
-MD -MP -MF /sources/glibc-2.31/build/tcb-offsets.h.dT \
-MT '/sources/glibc-2.31/build/tcb-offsets.h.d /sources/glibc-2.31/build/tcb-offsets.h'" \
../sysdeps/i386/nptl/tcb-offsets.sym > /sources/glibc-2.31/build/tcb-offsets.hT
Traceback (most recent call last):
File "/tools/lib/python3.8/subprocess.py", line 64, in <module>
import msvcrt
ModuleNotFoundError: No module named 'msvcrt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "../scripts/gen-as-const.py", line 28, in <module>
import glibcextract
File "/sources/glibc-2.31/scripts/glibcextract.py", line 22, in <module>
import subprocess
File "/tools/lib/python3.8/subprocess.py", line 69, in <module>
import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'
make[2]: *** [../Makerules:271: /sources/glibc-2.31/build/tcb-offsets.h] Error 1
make[2]: Leaving directory '/sources/glibc-2.31/csu'
make[1]: *** [Makefile:470: csu/subdir_lib] Error 2
make[1]: Leaving directory '/sources/glibc-2.31'
make: *** [Makefile:9: all] Error 2
I would greatly appreciate any insights/suggestions as to how to correct this (if it is correctable).
I had a similar problem with Section 6.9 related to Python 3 as I received the following error when executing the configure command:
Code:
checking for python3... no
checking for python... no
configure: error:
*** These critical programs are missing or too old: python
*** Check the INSTALL file for required versions.
I thought the proposed solution of rebuilding python 3 as in Chapter 5 could also solve my problem. I changed to the sources directory, executed "tar -xvf Python-3.8.1.tar.xz", changed to the new Python-3.8.1 directory, and executed the sed and configure commands in Section 5.30. All seemed to go well with the configure command and the Makefile was created. However, when I executed the make command, I received a lot of the following kind of output:
Hello Spiky0011,
I am using the pdf book, but yes learned that lesson early on the hard way. Now I'm always careful to copy and paste multiple line commands to a text editor first to clean it up. Then I scroll back up in the terminal just to confirm.
Well spiky0011, yet another humbling learning experience! I can't identify the difference between the commands I carefully cut and checked from the pdf and then again from the html page today, but it seems to have worked.
When I was reinstalling Python-3.8.1 following Section 5.30, after executing "make" I still received a number of lines of the following which suggested to me that I failed as before:
However, I received the notification that "Python build finished successfully!" rather than the "Indentation Error" I'd received before. And this time I was able to execute make and make install.
Hoping I had successfully reinstalled python following 5.30, I went back to Section 6.9 to again try installing Glibc-2.31 (which had been my original problem as with this OP) and sure enough was able to complete it this time!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.