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

fix: Loosen acceptable types to support current linux build on aarch64 #415

Conversation

rdeaton-freenome
Copy link
Contributor

@rdeaton-freenome rdeaton-freenome commented Jan 2, 2024

Fixes #412

@rdeaton-freenome rdeaton-freenome changed the title Loosen acceptable types to support current linux build on aarch64 fix: Loosen acceptable types to support current linux build on aarch64 Jan 2, 2024
@ghuls
Copy link
Contributor

ghuls commented Feb 5, 2024

Same for ppc64le.

ghuls added a commit to aertslab/scatac_fragment_tools that referenced this pull request Feb 5, 2024
Don't build for Windows and some Linux versions:
  - Building HTSlib on Windows is not possible.
  - Building HTSlib does not work on Linux:
      - x86: len() as u64 is not valid on 32-bit
      - aarch64 and ppc64le:
          - expected `*mut u8`, found `&mut i8`
          - Fixed by: rust-bio/rust-htslib#415
  - Building zlib-ng does not work for all Linux targets:
      - armv7:
          - Might get fixed in the future if zig gets fixed:
            ziglang/zig#10411
ghuls added a commit to aertslab/scatac_fragment_tools that referenced this pull request Feb 5, 2024
Don't build for Windows and some Linux versions:
  - Building HTSlib on Windows is not possible.
  - Building HTSlib does not work on Linux:
      - x86:
          - len() as u64 is not valid on 32-bit
      - aarch64 and ppc64le:
          - expected `*mut u8`, found `&mut i8`
          - Fixed by: rust-bio/rust-htslib#415
  - Building zlib-ng does not work for all Linux targets:
      - armv7:
          - Might get fixed in the future if zig gets fixed:
            ziglang/zig#10411
      - s390:
          - Error: Unrecognized opcode: `stfle'
Copy link
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aarch64 does not support i8?

Copy link
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@johanneskoester johanneskoester merged commit 1d78d12 into rust-bio:master Feb 7, 2024
1 check passed
@ghuls
Copy link
Contributor

ghuls commented Feb 7, 2024

ghuls added a commit to aertslab/scatac_fragment_tools that referenced this pull request Feb 7, 2024
…-htslib is fixed.

Enable support for building for aarch64 and ppc64le on Linux now
rust-htslib is fixed.

See: rust-bio/rust-htslib#415
@rdeaton-freenome rdeaton-freenome deleted the rdeaton/20240102/fix_linux_build branch February 7, 2024 23:08
@rdeaton-freenome
Copy link
Contributor Author

That article is spot on, it is fundamentally because the signedness of char is different across platforms. There are definitely better ways to fix this long term, but luckily the range of values here is so small that taking half of the i8 range is sufficient. Thanks!

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

Successfully merging this pull request may close these issues.

error[E0308]: mismatched types - expected raw pointer *mut u8 during cross compilation
3 participants