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

Backport #20587 to 2.19.x to fix Exec format error when running Pants on Linux #20651

Closed
yjabri opened this issue Mar 7, 2024 · 4 comments
Closed
Labels

Comments

@yjabri
Copy link
Contributor

yjabri commented Mar 7, 2024

Describe the bug
When running the command pants several of my coworkers have ran into Exec format error. This is because the shebang in the nce/path/.../bin/pants is longer than the 128 character limit imposed by linux and gets cutoff.

The 2.1.154 release of Pex includes a work around for this. However Pants 2.19.x currently uses v2.1.148.

During the Pants Build Pex step of the release, Pants packages itself as a pex, however it uses pex v2.1.148. This produces potentially broken Pants Pexs on linux if your home directory is sufficiently long.

I believe if we cherry picked the work done in #20587 it would solve the problem.

Pants version
2.19

OS
Both

Additional info

@huonw
Copy link
Contributor

huonw commented Mar 7, 2024

This sounds good, thanks for requesting it! I've prepped #20653

huonw added a commit that referenced this issue Mar 7, 2024
Cherry pick of #20587 , which includes:

- #20587
- #20502
- #20496
- #20416
- #20391
- #20149

The upgrade past https://github.com/pex-tool/pex/releases/tag/v2.1.154
is what is acutely driving this cherry-pick, as it resolves the
over-long shebang issue (#20651) where the Pants `bin/pants` script can
have a `#!...` line that's too long.

Closes #20651

Co-authored-by: cburroughs <[email protected]>
@huonw
Copy link
Contributor

huonw commented Mar 7, 2024

#20653 is merged, so closing this. This will come out in the release in the 2.19.x series: 2.19.2rc0.

@huonw huonw closed this as completed Mar 7, 2024
@yjabri
Copy link
Contributor Author

yjabri commented Mar 8, 2024

Thanks for the incredibly quick turn around @huonw!

@huonw
Copy link
Contributor

huonw commented Apr 6, 2024

This is now released in 2.19.2 stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants