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

fitsio failing to build wheel for pip based install on github. #414

Open
eacharles opened this issue Dec 11, 2024 · 16 comments
Open

fitsio failing to build wheel for pip based install on github. #414

eacharles opened this issue Dec 11, 2024 · 16 comments

Comments

@eacharles
Copy link

It looks like the specific error is:
configure: error: Unable to locate bz2 library needed when enabling bzip2 support; try specifying the path

You can find an example here:
https://github.com/LSSTDESC/rail_pipelines/actions/runs/12282370023/job/34273426914

@esheldon
Copy link
Owner

Can you try installing libbz2 in the container?

@esheldon
Copy link
Owner

esheldon commented Dec 11, 2024

Probably something like apt install libbz2-dev

@esheldon
Copy link
Owner

I can give a little context: pip cannot install the bzip2 library, so it is up to the user to make sure it is available. My guess is the github containers may no longer be including that library as part of the standard set of installations.

@eacharles
Copy link
Author

That does work, but we have something like 60 or so workflows, and I'd rather not have to update them all.

@eacharles
Copy link
Author

That's like 4-5 workflows per package across somethink like 12-15 packages.

@esheldon
Copy link
Owner

This is out of my control. Neither I or the fitsio package are affiliated with github

I think you have a few options:

  1. Complain to github.
  2. edit the workflow to install the dependency
  3. edit the workflow to choose a different container. There are alternative containers out there that may have your dependency

@rmjarvis
Copy link
Contributor

FWIW, I worked around this issue by adding the following to my ci.yml file:

- name: Install libbz2
  if: matrix.os == 'ubuntu-latest'
  run: sudo -H apt-get install -y libbz2-dev

This seems to have worked for me.

@ntessore
Copy link
Contributor

Hi @esheldon, have you thought about providing wheels for fitsio? The process is pretty much automatic with cibuildwheel (here an example of mine)

@esheldon
Copy link
Owner

@beckermr do you have ideas about this proposal?

@esheldon
Copy link
Owner

@ntessore I think this would not fix the issue of bz2, since that is linked as a shared library. The library would still need to be installed, but pip can't do that.

The reason it "just works" for conda is because conda installs its own bz2 as a dependency.

@ntessore
Copy link
Contributor

IIUC cibuildwheel will take care of the shared libraries using auditwheel/delocate

@rmjarvis
Copy link
Contributor

I think that's right. GalSim uses it and it works correctly with the FFTW library.

@rmjarvis
Copy link
Contributor

rmjarvis commented Jan 15, 2025

You can use our wheels.yml as a template if you want:
https://github.com/GalSim-developers/GalSim/blob/releases/2.6/.github/workflows/wheels.yml

@beckermr
Copy link
Collaborator

Yes if people want wheels, we can ship them. We still need to ship the sdist as well. I do not like wheels but lots of folks do. Best to give the people what they want.

@rmjarvis
Copy link
Contributor

You don't like wheels, because you always use conda. Wheels are for people who don't use conda. :) But yes, the last thing.

@beckermr
Copy link
Collaborator

💯 that's correct @rmjarvis :)

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

No branches or pull requests

5 participants