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

Unavailable Tcl version when compiling for MacOS 10.6 #92171

Closed
lmbelo opened this issue May 2, 2022 · 7 comments · Fixed by #92179
Closed

Unavailable Tcl version when compiling for MacOS 10.6 #92171

lmbelo opened this issue May 2, 2022 · 7 comments · Fixed by #92179
Labels
build OS-mac type-bug

Comments

@lmbelo
Copy link

@lmbelo lmbelo commented May 2, 2022

Bug report

MacOS build-installer.py script failing with the --dep-target=10.6 argument. It tries to download an unavailable Tcl version (8.6.12) from the FTP server.

Error

urllib.error.URLError: <urlopen error ftp error: URLError("ftp error: error_perm('550 Failed to change directory.')")>

Your environment

  • CPython versions tested on: 3.10.4
  • Operating system and architecture: MacOS M1
@lmbelo lmbelo added the type-bug label May 2, 2022
@lmbelo lmbelo changed the title Unavailable tcl version when compiling for MacOS 10.6 Unavailable Tcl version when compiling for MacOS 10.6 May 2, 2022
@erlend-aasland erlend-aasland added the build label May 2, 2022
@erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 2, 2022

Quoting the Tcl/Tk website:

The main site for Tcl/Tk source distributions is SourceForge

The link they provide for 8.6.12 is https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz

@lmbelo
Copy link
Author

@lmbelo lmbelo commented May 2, 2022

It works well using the SourceForge link.

@erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 2, 2022

For the record:

$ wget ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.8-src.tar.gz
--2022-05-02 13:02:17--  ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.8-src.tar.gz
           => ‘tcl8.6.8-src.tar.gz.1’
Resolving ftp.tcl.tk (ftp.tcl.tk)... 66.228.49.43
Connecting to ftp.tcl.tk (ftp.tcl.tk)|66.228.49.43|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/tcl//tcl8_6 ... done.
==> SIZE tcl8.6.8-src.tar.gz ... 9793786
==> PASV ... done.    ==> RETR tcl8.6.8-src.tar.gz ... done.
Length: 9793786 (9,3M) (unauthoritative)

tcl8.6.8-src.tar.gz.1                                       100%[=========================================================================================================================================>]   9,34M  5,31MB/s    in 1,8s    

2022-05-02 13:02:20 (5,31 MB/s) - ‘tcl8.6.8-src.tar.gz.1’ saved [9793786]

$ wget ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.12-src.tar.gz
--2022-05-02 13:02:23--  ftp://ftp.tcl.tk/pub/tcl//tcl8_6/tcl8.6.12-src.tar.gz
           => ‘tcl8.6.12-src.tar.gz.1’
Resolving ftp.tcl.tk (ftp.tcl.tk)... 66.228.49.43
Connecting to ftp.tcl.tk (ftp.tcl.tk)|66.228.49.43|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/tcl//tcl8_6 ... done.
==> SIZE tcl8.6.12-src.tar.gz ... done.

==> PASV ... done.    ==> RETR tcl8.6.12-src.tar.gz ... 
No such file ‘tcl8.6.12-src.tar.gz’.

@ronaldoussoren
Copy link
Contributor

@ronaldoussoren ronaldoussoren commented May 5, 2022

The SourceForge download link is problematic for the build script because it inserts an intermediate page and that breaks the build-installer.py script.

A somewhat easy fix would be to change the downloadURL function in that script to use curl(1) instead of urllib to download. I checked that curl -LO https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz will download the source archive.

@erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented May 5, 2022

Good point regarding the redirects. Using curl is a better option.

@ronaldoussoren
Copy link
Contributor

@ronaldoussoren ronaldoussoren commented May 6, 2022

Calling out to curl is the easy option, it Is also possible to follow redirects in Python code but that's more work and probably not worth the effort for this script.

@zware
Copy link
Member

@zware zware commented May 6, 2022

We do keep a copy of the vanilla tcl/tk sources in our own GitHub repo for use on Windows, though the link GitHub gives to the archive is also a redirect (https://github.com/python/cpython-source-deps/archive/refs/tags/tcl-core-8.6.12.0.tar.gz -> https://codeload.github.com/python/cpython-source-deps/tar.gz/refs/tags/tcl-core-8.6.12.0; similar for tk). We also only use the tcl-core package rather than the full-fat tcl distribution; we've found that's all we actually need on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build OS-mac type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants