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

pysam build fails for python 3.11 + macOS 12.6.7 #1205

Closed
tedil opened this issue Jul 24, 2023 · 1 comment · Fixed by #1207
Closed

pysam build fails for python 3.11 + macOS 12.6.7 #1205

tedil opened this issue Jul 24, 2023 · 1 comment · Fixed by #1207

Comments

@tedil
Copy link

tedil commented Jul 24, 2023

(This is on a github action runner)
When installing dependencies in our testing environments, the build for pysam 0.21.0 fails for macOS 12.6.7 with python 3.11, but succeeds for python 3.10, as well as for python 3.11 with an Ubuntu 22.04.2 image.

Even though it finds lzma.h, configure reports that no liblzma development files are found:

  python -m pip install --upgrade pip
  python -m pip install poetry black flake8
  poetry install --no-interaction
  [...]
  # pysam: cython is available - using cythonize if necessary
  # pysam: htslib mode is shared
  # pysam: HTSLIB_CONFIGURE_OPTIONS=None
  # pysam: (sysconfig) CC=clang
  # pysam: (sysconfig) CFLAGS=-Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g 
  # pysam: (sysconfig) LDFLAGS=-arch arm64 -arch x86_64 -g
  [...]
  checking for lzma.h... yes
  checking for lzma_easy_buffer_encode in -llzma... no
  configure: error: liblzma development files not found
  
  The CRAM format may use LZMA2 compression, which is implemented in HTSlib
  by using compression routines from liblzma <http://tukaani.org/xz/>.
  
  Building HTSlib requires liblzma development files to be installed on the
  build machine; you may need to ensure a package such as liblzma-dev (on Debian
  or Ubuntu Linux), xz-devel (on RPM-based Linux distributions or Cygwin), or
  xz (via Homebrew on macOS) is installed; or build XZ Utils from source.
  
  Either configure with --disable-lzma (which will make some CRAM files
  produced elsewhere unreadable) or resolve this error to build HTSlib.
  [...]
  checking for lzma.h... yes
  checking for lzma_easy_buffer_encode in -llzma... no
  configure: error: liblzma development files not found
  
  The CRAM format may use LZMA2 compression, which is implemented in HTSlib
  by using compression routines from liblzma <http://tukaani.org/xz/>.
  
  Building HTSlib requires liblzma development files to be installed on the
  build machine; you may need to ensure a package such as liblzma-dev (on Debian
  or Ubuntu Linux), xz-devel (on RPM-based Linux distributions or Cygwin), or
  xz (via Homebrew on macOS) is installed; or build XZ Utils from source.
  
  Either configure with --disable-lzma (which will make some CRAM files
  produced elsewhere unreadable) or resolve this error to build HTSlib.
  Makefile:137: htscodecs.mk: No such file or directory
  config.mk:2: *** Resolve configure error first.  Stop.
  # pysam: htslib configure options: None
@jmarshall
Copy link
Member

This is the problem encountered in #1142 (comment) but you are quite right that it is about time we got to the bottom of this problem. Thanks for the reminder.

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 a pull request may close this issue.

2 participants