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

Too many levels of symbolic links at share/terminfo/N/NCR260VT300WPP #1800

Closed
oxidase opened this issue Mar 12, 2024 · 4 comments · Fixed by #1898
Closed

Too many levels of symbolic links at share/terminfo/N/NCR260VT300WPP #1800

oxidase opened this issue Mar 12, 2024 · 4 comments · Fixed by #1898
Assignees
Labels
type: bug type: toolchain Related to the toolchains provided by rules_python
Milestone

Comments

@oxidase
Copy link
Contributor

oxidase commented Mar 12, 2024

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: 4dcfd21
The regression was introduced in 3f40e98

Description

1 the new python runtime 3.12.2 contains terminfo data with a symbolic link which leads to Too many levels of symbolic links on a case-insensitive file system:

wget -q https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2+20240224-aarch64-unknown-linux-gnu-install_only.tar.gz -O - | tar tv | grep share/terminfo/N/NCR260VT300WPP
lrwxrwxrwx  0 root   root        0 Jan  1 01:00 python/share/terminfo/N/NCR260VT300WPP -> ../n/ncr260vt300wpp

The previous version 3.12.1 has no share/terminfo directory

wget -q https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1+20240107-aarch64-unknown-linux-gnu-install_only.tar.gz -O - | tar tv | grep share/terminfo

The fix filters out share/terminfo/N/NCR260VT300WPP symbolic link

/cc @trentontrees

🔥 Exception or Error


ERROR: /private/.../external/rules_poetry~~poetry~poetry/BUILD:7317:8: Target '@@rules_poetry~~poetry~poetry//:utm' depends on toolchain '@@rules_python~~python~python_3_12_aarch64-unknown-linux-gnu//:python_runtimes', which cannot be found: no such package '@@rules_python~~python~python_3_12_aarch64-unknown-linux-gnu//': error globbing [bin/**, extensions/**, include/**, lib/**, libs/**, share/**] - [**/* *, lib/libpython3.12.so, lib/**/*.a, lib/python3.12/**/test/**, lib/python3.12/**/tests/**, **/__pycache__/*.pyc.*, share/terminfo/N/NCR260VT300WPP] op=FILES: /private/.../external/rules_python~~python~python_3_12_aarch64-unknown-linux-gnu/share/terminfo/N/NCR260VT300WPP (Too many levels of symbolic links)'

🌍 Your Environment

Operating System:

  
MacOS Sonoma 14.4
FS: APFS
  

Output of bazel version:

  
Bazelisk version: development
Build label: 7.1.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Mar 11 17:55:51 2024 (1710179751)
Build timestamp: 1710179751
Build timestamp as int: 1710179751
  

Rules_python version:

  
5ab3e9cca2a1cbd5a320ccb5aa4db093af019374
  
@jvolkman
Copy link
Contributor

Looks like this was introduced upstream here.

This will be an issue when working with the linux archive on macOS, since the file system is case-insensitive by default.

@oxidase
Copy link
Contributor Author

oxidase commented Mar 12, 2024

Thanks @jvolkman! Created indygreg/python-build-standalone#231

@aignas
Copy link
Collaborator

aignas commented Mar 13, 2024

I guess the right thing for rules_python would be to revert the addition of 3.12.2 until this gets fixed upstream.

@aignas aignas added type: bug type: toolchain Related to the toolchains provided by rules_python labels Mar 13, 2024
@aignas aignas added this to the v0.32.0 milestone Mar 29, 2024
@aignas aignas modified the milestones: v0.32.0, v0.33.0 May 13, 2024
@aignas
Copy link
Collaborator

aignas commented May 13, 2024

Should we exclude share/terminfo on Linux toolchains from the filegroup globs? I think that somewhat coincides with the suggested fix (i.e. deleting) upstream.

@aignas aignas self-assigned this May 14, 2024
@aignas aignas modified the milestones: v0.33.0, v0.32.2 May 14, 2024
aignas added a commit to aignas/rules_python that referenced this issue May 14, 2024
…hains

This affects Linux toolchains that have the `terminfo` databases bundled
with the toolchain. Our solution to this is to remove the
`share/terminfo` altogether if we are downloading an affected `linux`
toolchain.

Workaround indygreg/python-build-standalone#231
Fixes bazelbuild#1800
github-merge-queue bot pushed a commit that referenced this issue May 14, 2024
…hains (#1898)

This affects Linux toolchains that have the `terminfo` databases bundled
with the toolchain. Our solution to this is to remove the
`share/terminfo` altogether if we are downloading an affected `linux`
toolchain.

Tested with (on a Mac):
```console
bazel build --platforms=//tests/support:linux_x86_64 @python_3_11//:files
bazel build --platforms=//tests/support:windows_x86_64 @python_3_11//:files
```

Workaround
indygreg/python-build-standalone#231
Fixes #1800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: toolchain Related to the toolchains provided by rules_python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants