v8.4 LFS systemd - chpt 6.9 Glibc: Error during "make" No module named '_posixsubprocess'
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.
That's a big page, compiling glibc. I have versions in /usr/lib64/python2.x/site-packages, and /usr/lib64/python3.x/lib-dynload/
Now You will have /usr/lib, not /usr/lib64 and probably only 1 python version in /tools. Check you have it in
/tools/usr/lib
My next suspect would be the clever stuff they did so you can see the libs in /tools because you will hardly compile without the stuff in /tools. That's what it's there for. See how you get on.
In tools/lib there is /python3.7 directory with nothing with '_posixsubprocess' or 'posixsubprocess'
In tools/lib64 is also a /python3.7 which looks identical to tools/lib/python3.7 with no such posixsubprocess or _posixsubprocess.
Update:
I rebuilt both Python and Glibc, but this time with one difference. Instead of the usual "make -j4," this time I just did it with make. It was successful.
Any ideas on why they would be the case?
Last edited by GeekBoy; 06-03-2019 at 09:25 PM.
Reason: Additional Information
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Tar up your /sources and save it in the build host. Wipe the disk, rebuild /tools (Chapter 5) the module paths hard coded into your python build are incorrect. Never try to rebuild a missing or corrupted chapter 5 package (./configure --prefix=/tools) during chapter 6 because the search paths are different.
CH5: PATH=/tools/bin:/bin:/usr/bin (In lfs user .bash_profile)
CH6: PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin (In chapter 6 chroot command.)
This is without bringing the linker changes into it, which complicates it even further. If you've been doing this a long time you can get away with it by building some simple tools like gawk with static linking. But, Python... That's a can of worms. Start over.
PS: Just saw your second message. Do you mean you rebuilt the chapter 5 libc (the one for /tools) during chapter 6? If that even worked I am surprised. It may cause you bizarre problems later...
There's a big difference between 'tools/usr' which searches whatever directory you happen top be in, and '/tools/usr' which searches /.
'make' uses 1 make process; make -j4 uses 4, and is therefore faster.
I have misgivings also about rebuilding python (back in Chapter 5), but if glibc compiled, I'd probably keep going. If you didn't exit the chroot and set up for chapter 5 again to build python you're in a mess. I presume that whatever you did, chapter 6's glibc worked in the chroot? I'd take the advice in the previous post then.
I did rebuild Python under chroot, but under the advice of another who mentioned to exclude the sed command because the path changes.
So it did compile. I did the "make check." While it is mentioned some of the tests will probably fail, what is not mentioned is what should happen if those tests fail, or you get a passing test.
The book does not mentioned what to expect at the end. Should it fail like this just because there is an expected failed test, and this is normal, or do I have an issue because of the error reported at the end?
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
The book does mention what to expect and most of those are covered by the section immediately following the shown "make check" command in the Chapter 6 Glibc build instructions. The exceptions are these two:
Which are likely due to timeouts during the tests.
As to Python: If you built Python in chapter 6 again before building (g)libc, you will need to build it again at the normal step 6.51. This is necessary because if you built it before installing libc, it will be linked to /tools/lib/{glibc.so,libstdc++.so} instead of /lib/{glibc.so,libstdc++.so}. Also note that libstdc++.so is part of the GCC package, so even if you were to rebuild Python right after glibc, you'd still be linking to things in /tools. Finally, since SSL was not installed when you built Python, the _ssl module wouldn't be built either. Lots of things use Python's _ssl module so, it is needed. So... be sure to build Python again at the normal step.
I am using a flash drive as the partition location.
So they could be the cause of timeout.
But still does not really answer about what I asked. The book does not mention at all what the end result should be at all. While it does mention about some of the tests failing, and how critical the test is, it still does not address if you should be getting a fail as don't worry about it, or if fail, you have an issue.
I am using a flash drive as the partition location.
Personally, I think that's crazy. Usb drives are best used as data disk, write and read slowly, and wear very fast. Even if you haven't a spare partition, you can use this dodge: choose a spot with 5G free, and do the following
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Quote:
Originally Posted by GeekBoy
But still does not really answer about what I asked. The book does not mention at all what the end result should be at all. While it does mention about some of the tests failing, and how critical the test is, it still does not address if you should be getting a fail as don't worry about it, or if fail, you have an issue.
They do address it as best they can. Different tests will fail on different machines. There are many things related to the hardware and/or build host that can cause a test to fail: kernel configuration, shell environment, chroot settings, installed software, lack of microcode updates, host cpu available features, and even BIOS bugs can cause tests to fail. The problem you're having is that you expect certainty, the exact output you can expect from the test suites but, that is impossible in the open source ecosystem.
Generally, if the majority of the tests pass the system will be fine. There really is only reason for concern if hundreds of tests fail. Test suites on these core libraries look for things that most users will not encounter through the normal use of the machine. A lot of the tests look for things the developers call "corner cases". These are mostly obscure problems that only show up in very specific circumstances that will not occur for most uses of the library or tool. I would not be concerned about the failures you encountered... You can move on to the next step.
Personally, I think that's crazy. Usb drives are best used as data disk, write and read slowly, and wear very fast. Even if you haven't a spare partition, you can use this dodge: choose a spot with 5G free, and do the following
They do address it as best they can. Different tests will fail on different machines. There are many things related to the hardware and/or build host that can cause a test to fail: kernel configuration, shell environment, chroot settings, installed software, lack of microcode updates, host cpu available features, and even BIOS bugs can cause tests to fail. The problem you're having is that you expect certainty, the exact output you can expect from the test suites but, that is impossible in the open source ecosystem.
Generally, if the majority of the tests pass the system will be fine. There really is only reason for concern if hundreds of tests fail. Test suites on these core libraries look for things that most users will not encounter through the normal use of the machine. A lot of the tests look for things the developers call "corner cases". These are mostly obscure problems that only show up in very specific circumstances that will not occur for most uses of the library or tool. I would not be concerned about the failures you encountered... You can move on to the next step.
Yes, I understand that, but saying it is critical to run the test but then having the "make" fail is the part which could be explained a bit better. Maybe it could be mentioned a little better why it is so critical and possibly explain when you have a problem when make check fails
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
LOL, a fail on make is different. The "make" step builds the package, make check builds and runs the tests. If the build fails, that needs to be fixed before running tests.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.