Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1130799 > unrolled thread

Bug#1027335: pairtools -- FTBFS in unstable

Started byNilesh Patra <nilesh@debian.org>
First post2022-12-30 15:40 +0100
Last post2023-01-08 20:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1027335: pairtools -- FTBFS in unstable Nilesh Patra <nilesh@debian.org> - 2022-12-30 15:40 +0100
    Bug#1027335: pairtools -- FTBFS in unstable Nilesh Patra <nilesh@debian.org> - 2022-12-30 16:00 +0100
    Bug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable Nilesh Patra <nilesh@debian.org> - 2022-12-31 20:00 +0100
      Bug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable Étienne Mollier <emollier@emlwks999.eu> - 2023-01-08 20:10 +0100

#1130799 — Bug#1027335: pairtools -- FTBFS in unstable

FromNilesh Patra <nilesh@debian.org>
Date2022-12-30 15:40 +0100
SubjectBug#1027335: pairtools -- FTBFS in unstable
Message-ID<FIoIa-elx5-9@gated-at.bofh.it>
Source: pairtools
Version: 0.3.0-3.2
Severity: serious

Pairtools FTBFS with pysam related error. Looks like
something is off.

dh_auto_clean
I: pybuild base:240: python3.11 setup.py clean 
Traceback (most recent call last):                                                                                                                                                                                
  File "/<<PKGBUILDDIR>>/setup.py", line 130, in <module>
    ext_modules=get_ext_modules(),
                ^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/setup.py", line 81, in get_ext_modules
    extra_link_args=pysam.get_libraries(),
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in get_libraries
    return [os.path.join(dirname, x + so) for x in pysam_libs]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in <listcomp>
    return [os.path.join(dirname, x + so) for x in pysam_libs]
                                  ~~^~~~
TypeError: can only concatenate str (not "NoneType") to str

Thanks,
Nilesh

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

[toc] | [next] | [standalone]


#1130803

FromNilesh Patra <nilesh@debian.org>
Date2022-12-30 16:00 +0100
Message-ID<FIp1v-elDX-7@gated-at.bofh.it>
In reply to#1130799

[Multipart message — attachments visible in raw view] — view raw

On Fri, 30 Dec 2022 20:05:32 +0530 Nilesh Patra <nilesh@debian.org> wrote:
> Source: pairtools
> Version: 0.3.0-3.2
> Severity: serious
> 
> Pairtools FTBFS with pysam related error. Looks like
> something is off.
> 
> dh_auto_clean
> I: pybuild base:240: python3.11 setup.py clean 
> Traceback (most recent call last):                                                                                                                                                                                
>   File "/<<PKGBUILDDIR>>/setup.py", line 130, in <module>
>     ext_modules=get_ext_modules(),
>                 ^^^^^^^^^^^^^^^^^
>   File "/<<PKGBUILDDIR>>/setup.py", line 81, in get_ext_modules
>     extra_link_args=pysam.get_libraries(),
>                     ^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in get_libraries
>     return [os.path.join(dirname, x + so) for x in pysam_libs]
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in <listcomp>
>     return [os.path.join(dirname, x + so) for x in pysam_libs]
>                                   ~~^~~~
> TypeError: can only concatenate str (not "NoneType") to str

This patch in pysam gets the build in pairtools going beyond this point, but now the build chokes with:

| pairtools.cli (unittest.loader._FailedTest.pairtools.cli) ... ERROR                                                                                                                                               
| pairtools.lib (unittest.loader._FailedTest.pairtools.lib) ... ERROR
|
| ======================================================================
| ERROR: pairtools.cli (unittest.loader._FailedTest.pairtools.cli)
| ----------------------------------------------------------------------
| ImportError: Failed to import test module: pairtools.cli
| Traceback (most recent call last):
|  File "/usr/lib/python3.11/unittest/loader.py", line 440, in _find_test_path
|    package = self._get_module_from_name(name)
|              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|  File "/usr/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
|    __import__(name)
|  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/pairtools/cli/__init__.py", line 188, in <module>
|    from . import (
|  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/pairtools/cli/dedup.py", line 12, in <module>
|    from ..lib import fileio, pairsam_format, headerops
|  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/pairtools/lib/__init__.py", line 7, in <module>
|    from . import parse
|  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/pairtools/lib/parse.py", line 38, in <module>
|    from .parse_pysam import get_mismatches_c
| ImportError: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/pairtools/lib/parse_pysam.cpython-311-x86_64-linux-gnu.so: undefined symbol: bam_dup1


Description: Add patch to return proper sysconf so for current python
Author: Nilesh Patra <nilesh@debian.org>
Last-Update: 2022-12-30
--- a/pysam/__init__.py
+++ b/pysam/__init__.py
@@ -96,5 +96,7 @@
     if pysam.config.HTSLIB == "builtin":
         pysam_libs.append('libchtslib')
 
-    so = sysconfig.get_config_var('SO')
+    so = sysconfig.get_config_var('EXT_SUFFIX')
+    if not so: 
+        so = sysconfig.get_config_var('SO')
     return [os.path.join(dirname, x + so) for x in pysam_libs]

[toc] | [prev] | [next] | [standalone]


#1130979 — Bug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable

FromNilesh Patra <nilesh@debian.org>
Date2022-12-31 20:00 +0100
SubjectBug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable
Message-ID<FIPfj-eEmB-9@gated-at.bofh.it>
In reply to#1130799

[Multipart message — attachments visible in raw view] — view raw

Hi Etienne,

On Fri, 30 Dec 2022 16:01:00 +0100 =?utf-8?Q?=C3=89tienne?= Mollier <emollier@emlwks999.eu> wrote: 
> Nilesh Patra, on 2022-12-30:
> >   File "/<<PKGBUILDDIR>>/setup.py", line 130, in <module>
> >     ext_modules=get_ext_modules(),
> >                 ^^^^^^^^^^^^^^^^^
> >   File "/<<PKGBUILDDIR>>/setup.py", line 81, in get_ext_modules
> >     extra_link_args=pysam.get_libraries(),
> >                     ^^^^^^^^^^^^^^^^^^^^^
> >   File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in get_libraries
> >     return [os.path.join(dirname, x + so) for x in pysam_libs]
> >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >   File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in <listcomp>
> >     return [os.path.join(dirname, x + so) for x in pysam_libs]
> >                                   ~~^~~~
> > TypeError: can only concatenate str (not "NoneType") to str
> 
> Thanks for catching this, I confirm I can reproduce the error
> without pairtools in the loop.  Given the reproducer.py below:
> 
> 	import pysam
> 	for lib in pysam.get_libraries():
> 	    print(lib)
> 
> I do get the error with python3.11:
> 
> 	$ python3.11 reproducer.py
> 	Traceback (most recent call last):
> 	  File "/home/emollier/tmp/reproducer.py", line 2, in <module>
> 	    for lib in pysam.get_libraries():
> 	               ^^^^^^^^^^^^^^^^^^^^^
> 	  File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in get_libraries
> 	    return [os.path.join(dirname, x + so) for x in pysam_libs]
> 	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 	  File "/usr/lib/python3/dist-packages/pysam/__init__.py", line 100, in <listcomp>
> 	    return [os.path.join(dirname, x + so) for x in pysam_libs]
> 	                                  ~~^~~~
> 	TypeError: can only concatenate str (not "NoneType") to str
> 
> Besides, the error looks genuine since in python3.10, the output
> seems to return the expected result:

I believe I have fixed this particular problem in next pysam upload. However, the issue
with bam_dup1 and a bunch of other functions in pysam still remains.
I had to hack around by applying this patch in pairtools

	https://salsa.debian.org/med-team/pairtools/-/blob/master/debian/patches/fix-pysam-ftbfs.patch

IMHO this really is un-called for, as pysam should resolve these things. In particular,
pysam declared in pysam/libchtslib.pxd and there are also a bunch of htslib imports in
htslib_util.h but probably those function defs have been removed in those htslib headers.

In particular we are likely bitten by htslib vers moving async with what pysam is expecting.
These should be fixed prior to release I guess :)

> 	$ python3.10 reproducer.py

Curious -- what script is this? :)

-- 
Best,
Nilesh

[toc] | [prev] | [next] | [standalone]


#1132324 — Bug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable

FromÉtienne Mollier <emollier@emlwks999.eu>
Date2023-01-08 20:10 +0100
SubjectBug#1027386: [Debian-med-packaging] Bug#1027335: pairtools -- FTBFS in unstable
Message-ID<FLJdn-gwcO-1@gated-at.bofh.it>
In reply to#1130979

[Multipart message — attachments visible in raw view] — view raw

Hi Nilesh,

[I noticed this answer in my drafts quite late, sorry for the
 delay answering.]

Nilesh Patra, on 2023-01-01:
> On Fri, 30 Dec 2022 16:01:00 +0100 =?utf-8?Q?=C3=89tienne?= Mollier <emollier@emlwks999.eu> wrote: 
> > 	$ python3.10 reproducer.py
> 
> Curious -- what script is this? :)

This one, sorry my wording made it confusing:

	$ cat reproducer.py 
	import pysam
	for lib in pysam.get_libraries():
	    print(lib)

Have a nice day,  :)
-- 
Étienne Mollier <emollier@emlwks999.eu>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/4, please excuse my verbosity.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web