Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust compiler requires python 2.7 #30618

Closed
Slowhand5 opened this issue Dec 29, 2015 · 11 comments
Closed

Rust compiler requires python 2.7 #30618

Slowhand5 opened this issue Dec 29, 2015 · 11 comments

Comments

@Slowhand5
Copy link

The "Building from Source" instructions on the github wiki page specify that the rust compiler requires
python 2.6 or later, however the ./configure script says that python 2.7 is required.

@steveklabnik
Copy link
Member

We do not have a github wiki anymore, where did you find this?

@Slowhand5
Copy link
Author

Hi Steve,

I found the github wiki page at:
https://github.com/rust-lang/rust

On Tue, Dec 29, 2015 at 3:52 PM, Steve Klabnik notifications@github.com
wrote:

We do not have a github wiki anymore, where did you find this?


Reply to this email directly or view it on GitHub
#30618 (comment).

@est31
Copy link
Member

est31 commented Dec 29, 2015

@steveklabnik
Copy link
Member

Ah ha! Thanks, I will send a fix.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Dec 29, 2015
@tshepang
Copy link
Member

Where in ./configure is 2.7 required? It seems it accepts both 2.6 and 2.7.

@hanna-kruppe
Copy link
Contributor

Our Python situation is really confusing. The configure script indicates that Python is needed for LLVM, but LLVM's docs say it only needs Python for its tests, and we (thankfully) don't run LLVM tests. Perhaps there is some flag that enables them, but by default that is not the case. Furthermore, configure seems to accept Python versions as old as 2.4 (or rather, rejects 2.3 because "LLVM requires Python 2.4-2.7") when provided with a --python=<path> argument, though as @tshepang found it will look for only 2.6/2.7 in the absence of this argument. But LLVM 2.8's docs state that Python ">=2.7" is required (from lurking on the llvm-dev mailing list, I recall that this does not include 3.x).

As if all that wasn't bad enough, we have a number of Python scripts in src/etc/ with no easy way to tell what Python version those require. Not all of those scripts are part of the normal build/development process (for example, some generate tables of precomputed constants). At a glance, I saw one use of the with statement in featurechk.pywhich gives us a lower bound of 2.6 for a normal process. It's also quite possibly that some 2.7 features have slipped in.

Honestly I would be in favor of just requiring 2.7 regardless of whether anything even needs it. Just to make all this confusion stop.

@Slowhand5
Copy link
Author

 Thanks for following up about this.

 I found this warning about updating python.  I'm running CentOS 6.2

presently:
CentOS 6.2 ships with Python 2.6.6 and depends on that specific version. Be
careful not to replace it or bad things will happen. If you need access to
a newer version of Python you must compile it yourself and install it
side-by-side with the system version.
source:
https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only

Here are the last few lines of output I get from the rust configure

script:
checking for python... user defined: /usr/bin/python2.6
checking for python >= 2.7... not found
configure: error: found python 2.6.6 (/usr/bin/python2.6); required >= 2.7
See `config.log' for more details.
configure: error: LLVM configure failed

On Wed, Dec 30, 2015 at 5:32 AM, rkruppe notifications@github.com wrote:

Our Python situation is really confusing. The configure script indicates
that Python is needed for LLVM, but LLVM's docs say it only needs Python
for its tests, and we (thankfully) don't run LLVM tests. Perhaps there is
some flag that enables them, but by default that is not the case.
Furthermore, configure seems to accept Python versions as old as 2.4 (or
rather, rejects 2.3 because "LLVM requires Python 2.4-2.7") when provided
with a --python= argument, though as @tshepang
https://github.com/tshepang found it will look for only 2.6/2.7 in the
absence of this argument. But LLVM 2.8's docs state that Python ">=2.7" is
required (from lurking on the llvm-dev mailing list, I recall that this
does not include 3.x).

As if all that wasn't bad enough, we have a number of Python scripts in
src/etc/ with no easy way to tell what Python version those require. At a
glance, I saw one use of the with statement which gives us a lower bound
of 2.6, and it's quite possibly that some 2.7 features have slipped in over
the years. Two scripts that I wrote explicitly require 2.7 but that's
unavoidable and those scripts are not part of the normal build process of
even most development work. The others, no idea.

Honestly I would be in favor of just requiring 2.7 regardless of whether
anything even needs it. Just to make all this confusion stop.


Reply to this email directly or view it on GitHub
#30618 (comment).

@hanna-kruppe
Copy link
Contributor

Ah, this error is from LLVM's configure script, not from Rust's. Ours should be updated to correctly check for 2.7, since LLVM apparently requires it1. Someone could check if our LLVM build even requires Python (as mentioned before, the docs say it's only needed for tests, which we don't run). If not, maybe (if all of Rust's Python scripts work on 2.6) building with Python 2.6 could still be supported.

@Slowhand5
Copy link
Author

We do not have a github wiki anymore, where did you find this?

Just to be clear, is the github site no longer used for Rust? If not,
the wiki page should at least be updated to say that it's no longer
active, and point users at the current instructions for obtaining and
building the rust compiler.

On Tue, Dec 29, 2015 at 4:56 PM, est31 notifications@github.com wrote:

I think @Slowhand5 https://github.com/Slowhand5 refers to the README:
https://github.com/rust-lang/rust/blob/master/README.md#building-from-source


Reply to this email directly or view it on GitHub
#30618 (comment).

@hanna-kruppe
Copy link
Contributor

@Slowhand5

There is a difference between the GitHub repository and the GitHub wiki. GitHub offers wikis for the projects it hosts, but Rust does not use that capability any more. Rust still uses and will continue to use GitHub for development, issue tracking, etc. — only the wiki is not used any more. For comparison, here is a random example of what GitHub wiki looks like: https://github.com/nim-lang/Nim/wiki

@frewsxcv
Copy link
Member

👍 for not supporting Python 2.6 (which is no longer maintained by the PSF)

Manishearth added a commit to Manishearth/rust that referenced this issue Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants