LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 11-24-2018, 02:34 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
BLFS 8.3 - possible problems with python 3


So I decided to rebuild Python 3 for my blfs system. It was compiled in during the LFS phase, but the blfs book says "Python 3 was installed in LFS. The only reason to rebuild it here is if optional modules are needed." so I thought i would rebuild it.

Naturally there were problems.

Problem one. The book says to, after install, do this:
Code:
ln -svfn python-3.7.0 /usr/share/doc/python-3
There is no such directory. I double checked a few things because I use a destdir install method and ... nope. Docs are not being built.

I don't care about docs not being there, but the apparent descrepency between what is in the book and what is in front of me is worriesome.

Problem two. The BLFS rebuild of python 3 is smaller than the LFS python 3. Specifcally, the package tarball of the newer one is smaller. If extra optional modules were being built, would not the newer one be larger?

I unzipped both packages (the LFS python 3 and the BLFS python 3) and ran diff. Ignoring differences and focusing only one files present one one and not the other reveals:
Code:
Only in old/usr/bin: easy_install-3.7
Only in old/usr/bin: pip3
Only in old/usr/bin: pip3.7
Only in new/usr/lib/python3.7/lib-dynload: _sqlite3.cpython-37m-x86_64-linux-gnu.so
Only in old/usr/lib/python3.7/site-packages: easy_install.py
Only in old/usr/lib/python3.7/site-packages: pip
Only in old/usr/lib/python3.7/site-packages: pip-10.0.1.dist-info
Only in old/usr/lib/python3.7/site-packages: pkg_resources
Only in old/usr/lib/python3.7/site-packages: __pycache__
Only in old/usr/lib/python3.7/site-packages: setuptools
Only in old/usr/lib/python3.7/site-packages: setuptools-39.0.1.dist-info
So why is pip3, easy_install and the others listed, only be compiled in LFS and not in BLFS?

Last edited by jr_bob_dobbs; 11-24-2018 at 02:37 PM.
 
Old 11-24-2018, 03:37 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Did you build the docs in LFS??? If not then it wont be there.
It is optional

Last edited by spiky0011; 11-24-2018 at 03:38 PM.
 
Old 11-24-2018, 04:44 PM   #3
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by spiky0011 View Post
Did you build the docs in LFS??? If not then it wont be there.
It is optional
Oh wow, the LFS book mentions the option of building the docs but the BLFS does not. Odd, or at least counter-intuitive. Thanks for the information.

Now I just have to figure out why the second python 3 install isn't putting pip3 and those other things in. That is a train wreck waiting to happen if I were to actually install it.
 
Old 11-24-2018, 05:22 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
FYI
pip -V =pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)

pip3 -V = pip 10.0.1 from /usr/lib/python3.7/site-packages/pip (python 3.7)

Dont know why the dir name changed in python3,
but pip3 would work if you used it.
 
Old 11-25-2018, 07:58 AM   #5
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by spiky0011 View Post
FYI
pip -V =pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)

pip3 -V = pip 10.0.1 from /usr/lib/python3.7/site-packages/pip (python 3.7)

Dont know why the dir name changed in python3,
but pip3 would work if you used it.
In your post you compare python 2 and 3. I was not comparing python 2 and 3. I was comparing two builds of the same version of python 3 and questioning in why files were in the first build (made during LFS) that were not in the second build (made during BLFS).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
[SOLVED] is it possible to build professional os with LFS/BLFS 7.6 book? Carl_cj Linux From Scratch 10 11-23-2014 05:45 PM
[SOLVED] Is it possible to build BLFS on top of LFS 7.2? erkant Linux From Scratch 4 12-01-2012 03:28 AM
[SOLVED] I can't install anything after installed Python (installing BLFS) & please help me! Forget-Me-Not Linux From Scratch 11 10-26-2012 01:06 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration