Discussion:
[lfs-support] Some blfs programs expect /usr/bin/python
Hazel Russman
2018-03-08 09:20:16 UTC
Permalink
Python is installed in LFS 8.2 as /usr/bin/python3. While I was building harfbuzz in BLFS 8.2, I discovered that the check stage requires /usr/bin/python. There may be other programs that look for this name too. Creating a symlink solved the problem.

I couldn't find an instruction in LFS to create this link. I suggest adding:
Some programs expect to find /usr/bin/python. To satisfy them, create a symbolic link:
ln -svf python3 /usr/bin/python
--
Hazel Russman
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki
Pierre Labastie
2018-03-08 10:14:58 UTC
Permalink
Post by Hazel Russman
Python is installed in LFS 8.2 as /usr/bin/python3. While I was building harfbuzz in BLFS 8.2, I discovered that the check stage requires /usr/bin/python. There may be other programs that look for this name too. Creating a symlink solved the problem.
ln -svf python3 /usr/bin/python
I wouldn't recommend doing that: it could lead to execute python2 code with
python3, but many python2 scripts cannot be run with python3. I'm not sure
what to do with harfbuzz, but I guess Python2 should be in optional deps (to
run tests). In any case, the link above should be only temporary for running
harfbuz tests. Another possibility is to issue:
---
find . -name \*.py | xargs sed -i 's/env python/&3/'
---

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/w
Hazel Russman
2018-03-08 11:41:39 UTC
Permalink
On Thu, 8 Mar 2018 11:14:58 +0100
Post by Pierre Labastie
Post by Hazel Russman
Python is installed in LFS 8.2 as /usr/bin/python3. While I was building harfbuzz in BLFS 8.2, I discovered that the check stage requires /usr/bin/python. There may be other programs that look for this name too. Creating a symlink solved the problem.
ln -svf python3 /usr/bin/python
I wouldn't recommend doing that: it could lead to execute python2 code with
python3, but many python2 scripts cannot be run with python3. I'm not sure
what to do with harfbuzz, but I guess Python2 should be in optional deps (to
run tests). In any case, the link above should be only temporary for running
---
find . -name \*.py | xargs sed -i 's/env python/&3/'
---
Pierre
--
Oops! I forgot that /usr/bin/python is often a link to python2. Your find-and-edit is a neater solution than making a temporary symlink and then deleting it. Maybe it could be added to harfbuzz and to any other packages that turn out to throw this problem. I suspect that with python3 now compulsory, most people will not want to install python2 just for a few checks.
--

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org
Ken Moffat
2018-03-08 12:16:33 UTC
Permalink
Post by Hazel Russman
On Thu, 8 Mar 2018 11:14:58 +0100
Post by Pierre Labastie
Post by Hazel Russman
ln -svf python3 /usr/bin/python
I wouldn't recommend doing that: it could lead to execute python2 code with
python3, but many python2 scripts cannot be run with python3. I'm not sure
what to do with harfbuzz, but I guess Python2 should be in optional deps (to
run tests). In any case, the link above should be only temporary for running
---
find . -name \*.py | xargs sed -i 's/env python/&3/'
---
Pierre
--
Oops! I forgot that /usr/bin/python is often a link to python2. Your find-and-edit is a neater solution than making a temporary symlink and then deleting it. Maybe it could be added to harfbuzz and to any other packages that turn out to throw this problem. I suspect that with python3 now compulsory, most people will not want to install python2 just for a few checks.
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.

ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-m
Bruce Dubbs
2018-03-08 16:11:23 UTC
Permalink
Post by Ken Moffat
Post by Hazel Russman
On Thu, 8 Mar 2018 11:14:58 +0100
Post by Pierre Labastie
Post by Hazel Russman
ln -svf python3 /usr/bin/python
I wouldn't recommend doing that: it could lead to execute python2 code with
python3, but many python2 scripts cannot be run with python3. I'm not sure
what to do with harfbuzz, but I guess Python2 should be in optional deps (to
run tests). In any case, the link above should be only temporary for running
---
find . -name \*.py | xargs sed -i 's/env python/&3/'
---
Pierre
--
Oops! I forgot that /usr/bin/python is often a link to python2. Your find-and-edit is a neater solution than making a temporary symlink and then deleting it. Maybe it could be added to harfbuzz and to any other packages that turn out to throw this problem. I suspect that with python3 now compulsory, most people will not want to install python2 just for a few checks.
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.
Hazel,

python is mentioned in 176 files in BLFS, but only 42 of those are
python3. In any reasonable workstation system, both versions will be
needed. If you are creating a server of some type (file, web, database,
mail, etc) you might be able to avoid python2.

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-
Hazel Russman
2018-03-08 17:15:02 UTC
Permalink
On Thu, 8 Mar 2018 10:11:23 -0600
Post by Bruce Dubbs
Post by Ken Moffat
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.
Hazel,
python is mentioned in 176 files in BLFS, but only 42 of those are
python3. In any reasonable workstation system, both versions will be
needed. If you are creating a server of some type (file, web, database,
mail, etc) you might be able to avoid python2.
-- Bruce
I'll have to install it then, as a graphical desktop is essential. But two pythons still looks to me like bloat. In all my previous builds, I've been able to avoid python3 altogether. On the other hand, I must say I'm impressed with ninja. I built glib yesterday and it took only a fraction of the time it used to take using make.
--
Hazel
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting
Richard Melville
2018-03-13 09:49:57 UTC
Permalink
Post by Hazel Russman
On Thu, 8 Mar 2018 10:11:23 -0600
Post by Bruce Dubbs
Post by Ken Moffat
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.
Hazel,
python is mentioned in 176 files in BLFS, but only 42 of those are
python3. In any reasonable workstation system, both versions will be
needed. If you are creating a server of some type (file, web, database,
mail, etc) you might be able to avoid python2.
-- Bruce
I'll have to install it then, as a graphical desktop is essential. But two
pythons still looks to me like bloat. In all my previous builds, I've been
able to avoid python3 altogether. On the other hand, I must say I'm
impressed with ninja. I built glib yesterday and it took only a fraction of
the time it used to take using make.
Hazel, a little late in replying, I know, but I agree, it is annoying to
have to install two versions of Python. Of course, the Python Community
would say that there is only one version of Python now and that is Python 3.

This reminds me of the IPv4/IPv6 issue; IPv6, like Python 3, has been
around for some considerable time, and yet we are still wedded to IPv4.
The problem is that, although new and improved versions of software, or
protocols, are released, it is not possible to force everybody to use
them. Maybe laziness plays a part, or familiarity with the old, or just
simple economics.

Richard
Tim Tassonis
2018-03-13 09:58:10 UTC
Permalink
Post by Hazel Russman
On Thu, 8 Mar 2018 10:11:23 -0600
Post by Bruce Dubbs
Post by Ken Moffat
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.
Hazel,
python is mentioned in 176 files in BLFS, but only 42 of those are
python3.   In any reasonable workstation system, both versions will be
needed.  If you are creating a server of some type (file, web, database,
mail, etc) you might be able to avoid python2.
You can build a server without python, but only if you leave out samba.
samba needs python.
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.o
Bruce Dubbs
2018-03-13 16:11:15 UTC
Permalink
Post by Hazel Russman
On Thu, 8 Mar 2018 10:11:23 -0600
Post by Bruce Dubbs
Post by Ken Moffat
I admire your optimism that you will be able to build (what I assume
is) a desktop system without python2.
Hazel,
python is mentioned in 176 files in BLFS, but only 42 of those are
python3.   In any reasonable workstation system, both versions will be
needed.  If you are creating a server of some type (file, web, database,
mail, etc) you might be able to avoid python2.
    -- Bruce
I'll have to install it then, as a graphical desktop is essential.
But two pythons still looks to me like bloat. In all my previous
builds, I've been able to avoid python3 altogether. On the other
hand, I must say I'm impressed with ninja. I built glib yesterday
and it took only a fraction of the time it used to take using make.
Hazel, a little late in replying, I know, but I agree, it is annoying to
have to install two versions of Python.  Of course, the Python Community
would say that there is only one version of Python now and that is Python 3.
This reminds me of the IPv4/IPv6 issue; IPv6, like Python 3, has been
around for some considerable time, and yet we are still wedded to IPv4.
The problem is that, although new and improved versions of software, or
protocols, are released, it is not possible to force everybody to use
them.  Maybe laziness plays a part, or familiarity with the old, or just
simple economics.
About IPv6; If you are doing NAT within a local network, IPv4 is just
easier to comprehend. 192.169.12.22 is just easier to understand than
2600:3c01::f03c:91ff:fe70:25e8 (higgs).

In addition, some ISPs, at least here in the US, do not offer an IPv6
address or address range.

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

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mai
Richard Melville
2018-03-13 17:03:14 UTC
Permalink
Post by Bruce Dubbs
Post by Hazel Russman
On Thu, 8 Mar 2018 10:11:23 -0600
Post by Bruce Dubbs
Post by Ken Moffat
I admire your optimism that you will be able to build (what I
assume
Post by Bruce Dubbs
Post by Ken Moffat
is) a desktop system without python2.
Hazel,
python is mentioned in 176 files in BLFS, but only 42 of those are
python3. In any reasonable workstation system, both versions will
be
Post by Bruce Dubbs
needed. If you are creating a server of some type (file, web,
database,
Post by Bruce Dubbs
mail, etc) you might be able to avoid python2.
-- Bruce
I'll have to install it then, as a graphical desktop is essential.
But two pythons still looks to me like bloat. In all my previous
builds, I've been able to avoid python3 altogether. On the other
hand, I must say I'm impressed with ninja. I built glib yesterday
and it took only a fraction of the time it used to take using make.
Hazel, a little late in replying, I know, but I agree, it is annoying to
have to install two versions of Python. Of course, the Python Community
would say that there is only one version of Python now and that is Python 3.
This reminds me of the IPv4/IPv6 issue; IPv6, like Python 3, has been
around for some considerable time, and yet we are still wedded to IPv4.
The problem is that, although new and improved versions of software, or
protocols, are released, it is not possible to force everybody to use
them. Maybe laziness plays a part, or familiarity with the old, or just
simple economics.
About IPv6; If you are doing NAT within a local network, IPv4 is just
easier to comprehend. 192.169.12.22 is just easier to understand than
2600:3c01::f03c:91ff:fe70:25e8 (higgs).
In addition, some ISPs, at least here in the US, do not offer an IPv6
address or address range.
The situation is even worse here in the UK with very few ISPs offering
IPv6. We were lucky enough to find a good ISP that gave us a /48 IPv6
block. This enabled us to create a pure IPv6 network and use a NAT64
translator (https://www.jool.mx/en/index.html) to access the Web, which, of
course, is still predominantly only IPv4 aware. Having such a large IPv6
block (~ 1.2 septillion addresses) we didn't need NAT in the traditional
sense.

Richard

Loading...