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

bzip2 release has broken links in bin directory #2

Open
FeodorFitsner opened this issue Apr 26, 2024 · 6 comments
Open

bzip2 release has broken links in bin directory #2

FeodorFitsner opened this issue Apr 26, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@FeodorFitsner
Copy link

Describe the bug

bzip2 1.0.8-1 release has broken links in bin directory which causes problems while assembling a Python package with it.

$ ls -al bzip2-1.0.8-1-aarch64-linux-android/bin
total 632
drwxr-xr-x@ 13 feodor  staff    416 14 Feb 14:06 .
drwx------@  6 feodor  staff    192 26 Apr 14:18 ..
-rwxr-xr-x@  1 feodor  staff  98160 14 Feb 14:06 bunzip2
-rwxr-xr-x@  1 feodor  staff  98160 14 Feb 14:06 bzcat
lrwxrwxrwx@  1 feodor  staff    131 14 Feb 14:06 bzcmp -> /home/runner/work/cpython-android-source-deps/cpython-android-source-deps/bzip2/build/1.0.8/aarch64-linux-android/prefix/bin/bzdiff
-rwxr-xr-x@  1 feodor  staff   2140 14 Feb 14:06 bzdiff
lrwxrwxrwx@  1 feodor  staff    131 14 Feb 14:06 bzegrep -> /home/runner/work/cpython-android-source-deps/cpython-android-source-deps/bzip2/build/1.0.8/aarch64-linux-android/prefix/bin/bzgrep
lrwxrwxrwx@  1 feodor  staff    131 14 Feb 14:06 bzfgrep -> /home/runner/work/cpython-android-source-deps/cpython-android-source-deps/bzip2/build/1.0.8/aarch64-linux-android/prefix/bin/bzgrep
-rwxr-xr-x@  1 feodor  staff   2054 14 Feb 14:06 bzgrep
-rwxr-xr-x@  1 feodor  staff  98160 14 Feb 14:06 bzip2
-rwxr-xr-x@  1 feodor  staff  13984 14 Feb 14:06 bzip2recover
lrwxrwxrwx@  1 feodor  staff    131 14 Feb 14:06 bzless -> /home/runner/work/cpython-android-source-deps/cpython-android-source-deps/bzip2/build/1.0.8/aarch64-linux-android/prefix/bin/bzmore
-rwxr-xr-x@  1 feodor  staff   1259 14 Feb 14:06 bzmore

Other distros seem to be fine, for example xz-5.4.6-0 has relative links:

drwxr-xr-x  25 feodor  staff     800 14 Feb 14:10 .
drwxr-xr-x   6 feodor  staff     192 26 Apr 14:01 ..
lrwxr-xr-x   1 feodor  staff       2 14 Feb 14:10 lzcat -> xz
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzcmp -> xzdiff
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzdiff -> xzdiff
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzegrep -> xzgrep
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzfgrep -> xzgrep
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzgrep -> xzgrep
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzless -> xzless
lrwxr-xr-x   1 feodor  staff       2 14 Feb 14:10 lzma -> xz
-rwxr-xr-x   1 feodor  staff   63552 14 Feb 14:10 lzmadec
-rwxr-xr-x   1 feodor  staff   84472 14 Feb 14:10 lzmainfo
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 lzmore -> xzmore
lrwxr-xr-x   1 feodor  staff       2 14 Feb 14:10 unlzma -> xz
lrwxr-xr-x   1 feodor  staff       2 14 Feb 14:10 unxz -> xz
-rwxr-xr-x   1 feodor  staff  404096 14 Feb 14:10 xz
lrwxr-xr-x   1 feodor  staff       2 14 Feb 14:10 xzcat -> xz
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 xzcmp -> xzdiff
-rwxr-xr-x   1 feodor  staff  135976 14 Feb 14:10 xzdec
-rwxr-xr-x   1 feodor  staff    7424 14 Feb 14:10 xzdiff
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 xzegrep -> xzgrep
lrwxr-xr-x   1 feodor  staff       6 14 Feb 14:10 xzfgrep -> xzgrep
-rwxr-xr-x   1 feodor  staff   10335 14 Feb 14:10 xzgrep
-rwxr-xr-x   1 feodor  staff    1815 14 Feb 14:10 xzless
-rwxr-xr-x   1 feodor  staff    2192 14 Feb 14:10 xzmore

Steps to reproduce

List detailed contents of any archive from this release: https://github.com/beeware/cpython-android-source-deps/releases/tag/bzip2-1.0.8-1

Expected behavior

Relative links.

Screenshots

No response

Environment

  • Operating System: macOS
  • Python version: 3.12

Logs

No response

Additional context

No response

@FeodorFitsner FeodorFitsner added the bug Something isn't working label Apr 26, 2024
@mhsmith
Copy link
Member

mhsmith commented Apr 27, 2024

Thanks for the report; I would accept a pull request that fixes this. But what problems does it cause when building Python? That should only need the include and lib directories.

@FeodorFitsner
Copy link
Author

It's shutil.copytree() that failing while trying to copy those links, but it could be fixed by adding ignore_dangling_symlinks=True.

So, what would be the fix:

  1. fixing links;
  2. removing links or bin directory all together?

@mhsmith
Copy link
Member

mhsmith commented Apr 27, 2024

Is this error coming from Python's own build system, or one of your own scripts?

  • If it's your own script, you can probably just remove the bin directory before copying anything.
  • If it's Python's own build system, please let me know which version you're building, and post the relevant part of the build log.

The proper fix would be to make the bzip2 build script produce relative links. For example, the last line of the script is currently:

make install PREFIX=$prefix

Maybe this could be changed to:

cd $prefix
make install PREFIX=.

@FeodorFitsner
Copy link
Author

That's my own script to build Python with the structure to work with mobile-forge. Mobile forge doesn't need bin though.

@mhsmith
Copy link
Member

mhsmith commented Apr 29, 2024

Mobile-forge doesn't really have Android support yet. You should use Chaquopy's build-wheel tool instead.

@FeodorFitsner
Copy link
Author

I'm working on a proof-of-concept of Android support in mobile-forge and it looks promising so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants