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

chore: Bump curl and libz-sys #237

Merged
merged 9 commits into from
Jul 17, 2021
Merged

chore: Bump curl and libz-sys #237

merged 9 commits into from
Jul 17, 2021

Conversation

brainstorm
Copy link
Member

See rust-lang/libz-sys#63 for context.

@pmarks
Copy link
Contributor

pmarks commented Aug 19, 2020

@brainstorm are you sure that's actually giving you zlib-ng? According to this PR, you also need to set default-features = false: rust-lang/libz-sys@754ca14#diff-80398c5faae3c069e4e6aa2ed11b28c0R45

@brainstorm
Copy link
Member Author

This will take a little bit more time to validate/merge since there's some assert/assumptions from htslib's upstream, see context here: rust-lang/libz-sys#63 (comment)

Not much time right now to dive into that, unfortunately (as much as I would love to). Anybody else, please feel free to steal my thunder here ;)

@brainstorm brainstorm self-assigned this Sep 14, 2020
@brainstorm brainstorm removed their assignment Nov 20, 2020
@ghuls
Copy link
Contributor

ghuls commented Jun 8, 2021

This is fixed in the development version of HTSlib (and should be in 1.13, when it is released):
samtools/htslib#1258
samtools/htslib#1257

@brainstorm
Copy link
Member Author

@johanneskoester Would it be ok to sync hts-sys to current htslib HEAD or closest release that fixes this?

@brainstorm brainstorm changed the title Switch zlib implementation to zlib-ng Switch zlib implementation to zlib-ng, update to htslib release 1.13 Jul 15, 2021
@brainstorm
Copy link
Member Author

brainstorm commented Jul 15, 2021

As hinted and discussed in issue #329, build.rs from hts-sys will need some enhancements so that it doesn't break across releases.

Jumping from an upstream htslib release tag should ideally be just pulling the submodule commit and perhaps adapt (htslib) API breaking changes, which hopefully shouldn't be many, but I'm not sure what's the best way to keep build.rs from getting in the way?

For context, the build.rs refactor that @pmarks did relatively recently (partly bypassing @htslib build system) helped with bad stale file issues that broke builds. On the other hand, upstream devs like @jmarshall point out that we should just use the current configure.ac to have all this well integrated. I've seen both approaches break in different ways, so that's why I'm pointing it out before keeping on hacking it together until it works?

@johanneskoester johanneskoester changed the title Switch zlib implementation to zlib-ng, update to htslib release 1.13 feat: Switch zlib implementation to zlib-ng, update to htslib release 1.13 Jul 16, 2021
@johanneskoester
Copy link
Contributor

As hinted and discussed in issue #329, build.rs from hts-sys will need some enhancements so that it doesn't break across releases.

Jumping from an upstream htslib release tag should ideally be just pulling the submodule commit and perhaps adapt (htslib) API breaking changes, which hopefully shouldn't be many, but I'm not sure what's the best way to keep build.rs from getting in the way?

For context, the build.rs refactor that @pmarks did relatively recently (partly bypassing @htslib build system) helped with bad stale file issues that broke builds. On the other hand, upstream devs like @jmarshall point out that we should just use the current configure.ac to have all this well integrated. I've seen both approaches break in different ways, so that's why I'm pointing it out before keeping on hacking it together until it works?

I agree. I would like to not replicate the htslib build in build.rs, but rather just use their system as much as possible. It just requires too much maintenance as it is now. I am just not enough into this to fix it, so please go ahead! Any simplification or improvement would be great!

@pmarks
Copy link
Contributor

pmarks commented Jul 16, 2021

The tricky thing to get right is to have the htslib build use all the same libraries as appear elsewhere in the Rust build. That's what is happening when we take e.g. $DEP_BZIP2_ROOT and pass it to the cc::Build.include() function here. Presumably that can be achieved by passing these paths to htslib/configure. On Mac at least, autoconf isn't available by default, so going that route makes the build less likely to 'just work', which is why I went this route.

@pmarks
Copy link
Contributor

pmarks commented Jul 16, 2021

But I certainly agree that it's a maintenance burden to keep up with changes to htslib & reusing their build system reduces that burden.

@brainstorm brainstorm changed the title feat: Switch zlib implementation to zlib-ng, update to htslib release 1.13 chore: Bump curl and libz-sys Jul 17, 2021
@brainstorm brainstorm merged commit 622a099 into rust-bio:master Jul 17, 2021
@jmarshall
Copy link
Contributor

On the other hand, upstream devs like @jmarshall point out that we should just use the current configure.ac to have all this well integrated.

Please do not @-mention me on things that I have no interest in.

Do not ascribe to me opinions that I have not stated. I said that build.rs should follow htslib's configure.ac more carefully, not that it necessarily should use configure directly instead.

For the list of source filenames problem, you might look at how pysam does this and at make -C htslib print-config (though this would be more accurate if you did use configure).

@pmarks
Copy link
Contributor

pmarks commented Jul 20, 2021

For the list of source filenames problem, you might look at how pysam does this and at make -C htslib print-config (though this would be more accurate if you did use configure).

oh cool, that's a great option, I'll see if that's feasible.

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.

5 participants