Wrong Python version detection causes build fail

RESOLVED INVALID

Status

RESOLVED INVALID
7 years ago
6 months ago

People

(Reporter: gtametame, Unassigned)

Tracking

Trunk
All
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
Building the last trunk with make -f client.mk and default .mozconfig fails

I'm on Ubuntu Natty and the python version is 2.7.1+
/usr/bin/python links to /usr/bin/python2.7

The build process detects a 2.6 version and fails:

checking for Python version >= 2.5 but not 3.x... /home/von/src/mozilla-central/configure: 6771: /usr/bin/python2.6: not found
configure: error: Python 2.5 or higher (but not Python 3.x) is required.

I think the problem comes from the following line in configure.in:

MOZ_PATH_PROGS(PYTHON, $PYTHON python2.7 python2.6 python2.5 python)

Setting the variable $PYTHON to "python" solves the problem.
Sounds like you have a broken symlink for python2.6 in your path?
That or you've upgraded python but didn't remove config.cache.
(Reporter)

Comment 3

7 years ago
I've a fresh install of Natty so no previous versions of python.

But when I type python2.6 in console I have these propositions
~$python2.6
No command 'python2.6' found, did you mean:
 Command 'ipython2.6' from package 'ipython' (universe)
python2.6: command not found


Maybe it's a part of the problem
(Reporter)

Comment 4

7 years ago
I've removed the ubuntu package called command-not-found
So ~$python2.6 gives me
bash: python2.6: command not found
(Reporter)

Comment 5

7 years ago
OK it works without the command-not-found ubuntu package (after removing config.cache)
To close this bug the solution is to add in the page:

https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Linux_Prerequisites

something like:

"
The package command-not-found could interfer with autoconf so it's better to remove it:
apt-get remove command-not-found
"

Kyle can you close the bug? and do the modif on mozilla.org?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
I use Ubuntu 10.04, and I get the "command not found magic", but it's never interfered with my build. Has that changed? I can't fathom that they could ship something that would break autoconf.
(Reporter)

Comment 7

7 years ago
I've reinstall the command-not-found package and I can't reproduce the bug anymore.
I think the problem was coming from a bad config.cache
Sorry for the invalid bug report.
Status: RESOLVED → VERIFIED
Resolution: WORKSFORME → INVALID
Re-opening.  I've got this same issue on a Fedora box, where python2.6 is getting set in http://mxr.mozilla.org/mozilla-central/source/configure.in#806, but I have 2.7.1.

checking for Python version >= 2.5 but not 3.x... /home/dave/moz/mozilla-central/configure: line 7280: /usr/bin/python2.6: No such file or directory
configure: error: Python 2.5 or higher (but not Python 3.x) is required.

Looking at the configure checks:

$ python -c "import sys; x = sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.'; print x" 2.5
False

$ which python
/usr/bin/python
$ python --version
Python 2.7.1

$ find /usr -name 'python2*'
/usr/bin/python2.7
/usr/bin/python2
/usr/bin/python2.7-config
/usr/lib/python2.7
/usr/lib/python2.6
/usr/include/python2.7
...
/usr/lib64/python2.7
/usr/lib64/python2.6

I wonder if the usr/lib64/python2.6 stuff is somehow getting in the way?  I'm stumped.  Any ideas?
Status: VERIFIED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
There doesn't seem to be a path issue, since:

$ python2.6
bash: python2.6: command not found...
You're not running with an existing objdir, are you? If so this could be config.cache hurting you.
You're right, I didn't realize that I had one here, but do (really old box, really, really old build).  Thanks.
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago6 years ago
Resolution: --- → INVALID

Updated

6 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.