Psortb has errors in Perl testsuite

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Psortb has errors in Perl testsuite

Andreas Tille-5
Hi,

I'd like to package psortb[1] which contains some Perl modules.
Unfortunately the Build-Time test fails.  My poor Perl knowledge tells
me that this might be a path issue but my be I'm asking here for a hint
how to solve this:

...
Result: PASS
make[2]: Leaving directory '/build/psortb-3.0.4+dfsg/algorithm-hmm'
make[2]: Entering directory '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc'
Manifying 1 pod document
make[2]: Leaving directory '/build/psortb-3.0.4+dfsg/bio-tools-psort-modhmm'
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, '../blib/lib', '../blib/arch')" t/*.t

#   Failed test 'use Bio::Tools::PSort::SVMLoc;'
#   at t/svmloc.t line 11.
#     Tried to use 'Bio::Tools::PSort::SVMLoc'.
#     Error:  Can't load '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so' for module Bio::Tools::PSort::SVMLoc: /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so: undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.
#  at t/svmloc.t line 11.
# Compilation failed in require at t/svmloc.t line 11.
# BEGIN failed--compilation aborted at t/svmloc.t line 11.

#   Failed test 'use Bio::Tools::PSort::SVMLoc::DataSet;'
#   at t/svmloc.t line 12.
#     Tried to use 'Bio::Tools::PSort::SVMLoc::DataSet'.
#     Error:  Attempt to reload Bio/Tools/PSort/SVMLoc.pm aborted.
# Compilation failed in require at /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/lib/Bio/Tools/PSort/SVMLoc/DataSet.pm line 7.
# BEGIN failed--compilation aborted at /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/lib/Bio/Tools/PSort/SVMLoc/DataSet.pm line 7.
# Compilation failed in require at t/svmloc.t line 12.
# BEGIN failed--compilation aborted at t/svmloc.t line 12.
& not defined at t/svmloc.t line 22.
        (in cleanup) & not defined at /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/lib/Bio/Tools/PSort/SVMLoc.pm line 46.
        Bio::Tools::PSort::SVMLoc::AUTOLOAD("DESTROY", Bio::Tools::PSort::SVMLoc=HASH(0x55d74896cc70)) called at /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/lib/Bio/Tools/PSort/SVMLoc.pm line 47
        Bio::Tools::PSort::SVMLoc::AUTOLOAD(Bio::Tools::PSort::SVMLoc=HASH(0x55d74896cc70)) called at /usr/share/perl/5.24/Carp.pm line 167
        eval {...} called at /usr/share/perl/5.24/Carp.pm line 167
        Bio::Tools::PSort::SVMLoc::new("Bio::Tools::PSort::SVMLoc", "Model", "sample.model", "FreqPatt", "fre_patterns.txt") called at t/svmloc.t line 22
# Looks like you planned 15 tests but ran 3.
# Looks like you failed 2 tests of 3 run.
# Looks like your test exited with 255 just after 3.
t/svmloc.t ..
1..15
not ok 1 - use Bio::Tools::PSort::SVMLoc;
not ok 2 - use Bio::Tools::PSort::SVMLoc::DataSet;
ok 3 - Loaded SVMLoc
Creating new Bio::Tools::PSort::SVMLoc
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 14/15 subtests
...


Line 11 of bio-tools-psort-svmloc/t/svmloc.t is

   BEGIN { use_ok('Bio::Tools::PSort::SVMLoc'); }


and the dynamic library that can not be loaded exists:

# ls -l /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so
-rwxr-xr-x 1 pbuilder pbuilder 170824 Apr 19 08:48 /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so


Any idea how to get this test working properly?

Kind regards

       Andreas.

PS: To build psortb you need to enable experimental in
    sources.list to get libsquid-dev (>= 1.9g+cvs20050121-9~)
    and libhmmer2-dev (>= 2.3.2+dfsg-2~) [the latter was just
    uploaded - may be there is some delay]


[1] https://anonscm.debian.org/git/debian-med/psortb.git

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

gregor herrmann-3
On Wed, 19 Apr 2017 11:13:46 +0200, Andreas Tille wrote:

> I'd like to package psortb[1] which contains some Perl modules.
> Unfortunately the Build-Time test fails.  My poor Perl knowledge tells
> me that this might be a path issue but my be I'm asking here for a hint
> how to solve this:

I don't think so. A path issue would lead to an error about a file
not found, something like

% perl -MBio::Tools::PSort::SVMLoc
Can't locate Bio/Tools/PSort/SVMLoc.pm in @INC (you may need to install the Bio::Tools::PSort::SVMLoc module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base).
BEGIN failed--compilation aborted.

but what we have here is:
 
> #   Failed test 'use Bio::Tools::PSort::SVMLoc;'
> #   at t/svmloc.t line 11.
> #     Tried to use 'Bio::Tools::PSort::SVMLoc'.
> #     Error:  Can't load '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so' for module Bio::Tools::PSort::SVMLoc: /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so: undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.
> #  at t/svmloc.t line 11.
> # Compilation failed in require at t/svmloc.t line 11.
> # BEGIN failed--compilation aborted at t/svmloc.t line 11.

"… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."


Cheers,
gregor

--
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   BOFH excuse #378:  Operators killed by year 2000 bug bite.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-5
Hi Gregor,

On Wed, Apr 19, 2017 at 12:01:34PM +0200, gregor herrmann wrote:

> On Wed, 19 Apr 2017 11:13:46 +0200, Andreas Tille wrote:
>
> > #   Failed test 'use Bio::Tools::PSort::SVMLoc;'
> > #   at t/svmloc.t line 11.
> > #     Tried to use 'Bio::Tools::PSort::SVMLoc'.
> > #     Error:  Can't load '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so' for module Bio::Tools::PSort::SVMLoc: /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so: undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.
> > #  at t/svmloc.t line 11.
> > # Compilation failed in require at t/svmloc.t line 11.
> > # BEGIN failed--compilation aborted at t/svmloc.t line 11.
>
> "… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."

Ahh, makes sense.  Hmmm, but what now.  How can I know were this symbol
comes from?  I greped the code and the linkes libs but failed.

Kind regards

       Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Sebastiaan Couwenberg
On 2017-04-19 12:30, Andreas Tille wrote:

> On Wed, Apr 19, 2017 at 12:01:34PM +0200, gregor herrmann wrote:
>> On Wed, 19 Apr 2017 11:13:46 +0200, Andreas Tille wrote:
>>
>> > #   Failed test 'use Bio::Tools::PSort::SVMLoc;'
>> > #   at t/svmloc.t line 11.
>> > #     Tried to use 'Bio::Tools::PSort::SVMLoc'.
>> > #     Error:  Can't load '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so' for module Bio::Tools::PSort::SVMLoc: /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so: undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.
>> > #  at t/svmloc.t line 11.
>> > # Compilation failed in require at t/svmloc.t line 11.
>> > # BEGIN failed--compilation aborted at t/svmloc.t line 11.
>>
>> "… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at
>> /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."
>
> Ahh, makes sense.  Hmmm, but what now.  How can I know were this symbol
> comes from?  I greped the code and the linkes libs but failed.

Did you run it through c++filt first to decode the symbol?

  $ echo _ZN7DataSet12getAttributeEi | c++filt
  DataSet::getAttribute(int)

Kind Regards,

Bas

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-2
On Wed, Apr 19, 2017 at 12:37:48PM +0200, Bas Couwenberg wrote:

> >>"… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at
> >>/usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."
> >
> >Ahh, makes sense.  Hmmm, but what now.  How can I know were this symbol
> >comes from?  I greped the code and the linkes libs but failed.
>
> Did you run it through c++filt first to decode the symbol?
>
>  $ echo _ZN7DataSet12getAttributeEi | c++filt
>  DataSet::getAttribute(int)

I did not - but also this does not ring a bell what lib might be
missing.

Kind regards

       Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-2
Hi again,

On Wed, Apr 19, 2017 at 12:44:06PM +0200, Andreas Tille wrote:

> On Wed, Apr 19, 2017 at 12:37:48PM +0200, Bas Couwenberg wrote:
> > >>"… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at
> > >>/usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."
> > >
> > >Ahh, makes sense.  Hmmm, but what now.  How can I know were this symbol
> > >comes from?  I greped the code and the linkes libs but failed.
> >
> > Did you run it through c++filt first to decode the symbol?
> >
> >  $ echo _ZN7DataSet12getAttributeEi | c++filt
> >  DataSet::getAttribute(int)
>
> I did not - but also this does not ring a bell what lib might be
> missing.

I think I found the problem.  DataSet::getAttribute(int) is defined in
bio-tools-psort-svmloc/libsvm.cpp.  While
bio-tools-psort-svmloc/Makefile.PL does not mention libsvm the file
bio-tools-psort-svmloc/Makefile that is created inside the pbuilder
chroot does contain

# Handy lists of source code files:
XS_FILES = SVMLoc.xs
C_FILES  = SVMLoc.c \
i libsvm.cpp
O_FILES  = SVMLoc.o \
        libsvm.o
H_FILES  = bindings.h \
        libsvm.h

(no idea what magic is used to let this happen - I never used
Makefile.PL myself).  However, in the build log libsvm.cpp is neither
compiled nor linked::

...
make[2]: Entering directory '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc'
"/usr/bin/perl" "/usr/share/perl/5.24.1/ExtUtils/xsubpp"  -C++ -typemap "/usr/share/perl/5.24/ExtUtils/typemap" -typemap "typemap"  SVMLoc.xs > SVMLoc.xsc && mv SVMLoc.xsc SVMLoc.c
Running Mkbootstrap for Bio::Tools::PSort::SVMLoc ()
chmod 644 "SVMLoc.bs"
cp lib/Bio/Tools/PSort/SVMLoc/DataSet.pm ../blib/lib/Bio/Tools/PSort/SVMLoc/DataSet.pm
cp lib/Bio/Tools/PSort/SVMLoc.pm ../blib/lib/Bio/Tools/PSort/SVMLoc.pm
AutoSplitting ../blib/lib/Bio/Tools/PSort/SVMLoc.pm (../blib/lib/auto/Bio/Tools/PSort/SVMLoc)
Please specify prototyping behavior for SVMLoc.xs (see perlxs manual)
g++ -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fdebug-prefix-map=/build/psortb-3.0.4+dfsg=. -fstack-     protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.24/CORE"   SVMLoc.c
rm -f ../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so
x86_64-linux-gnu-gcc -g -O2 -fdebug-prefix-map=/build/psortb-3.0.4+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro  -shared -L/usr/local/lib -fstack-protector-strong SVMLoc.o  -   o ../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so  \
   -lm -lstdc++         \
...


and I suspect this explains why DataSet::getAttribute is missing.

Any idea how to fix Makefile.PL (or whatever needs fixing) to get the
code linked?

Kind regards

       Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Carnë Draug
On 19 April 2017 at 15:19, Andreas Tille <[hidden email]> wrote:

> Hi again,
>
> On Wed, Apr 19, 2017 at 12:44:06PM +0200, Andreas Tille wrote:
>> On Wed, Apr 19, 2017 at 12:37:48PM +0200, Bas Couwenberg wrote:
>> > >>"… SVMLoc.so: … undefined symbol: _ZN7DataSet12getAttributeEi at
>> > >>/usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187."
>> > >
>> > >Ahh, makes sense.  Hmmm, but what now.  How can I know were this symbol
>> > >comes from?  I greped the code and the linkes libs but failed.
>> >
>> > Did you run it through c++filt first to decode the symbol?
>> >
>> >  $ echo _ZN7DataSet12getAttributeEi | c++filt
>> >  DataSet::getAttribute(int)
>>
>> I did not - but also this does not ring a bell what lib might be
>> missing.
>
> I think I found the problem.  DataSet::getAttribute(int) is defined in
> bio-tools-psort-svmloc/libsvm.cpp.  While
> [...]

The filename rang a bell and seems like they are vendorising libsvm
[1].  This is confirmed on the README file inside the
bio-tools-psort-svmloc directory:

  Algorithm::SVM is based on the libsvm 2.8 library written by
  Chih-Chung Chang and Chih-Jen Lin.

Turns out that psortb is actually vendorising Algorithm::SVM [2] (they
just moved it out of the Algorithm::SVM namespace and into
Bio::Tools::PSort::SVMLoc) which in turn is vendorising libsvm.  My
understanding of Debian packaging is that such things should be
removed, packaged as separate, and made as dependencies.

Carnë

[1] https://www.csie.ntu.edu.tw/~cjlin/libsvm/
[2] https://metacpan.org/pod/Algorithm::SVM
[3] https://wiki.debian.org/UpstreamGuide#No_inclusion_of_third_party_code

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-2
Hi Carnë,

On Wed, Apr 19, 2017 at 03:52:30PM +0100, Carnë Draug wrote:

> >
> > I think I found the problem.  DataSet::getAttribute(int) is defined in
> > bio-tools-psort-svmloc/libsvm.cpp.  While
> > [...]
>
> The filename rang a bell and seems like they are vendorising libsvm
> [1].  This is confirmed on the README file inside the
> bio-tools-psort-svmloc directory:
>
>   Algorithm::SVM is based on the libsvm 2.8 library written by
>   Chih-Chung Chang and Chih-Jen Lin.
>
> Turns out that psortb is actually vendorising Algorithm::SVM [2] (they
> just moved it out of the Algorithm::SVM namespace and into
> Bio::Tools::PSort::SVMLoc) which in turn is vendorising libsvm.  My
> understanding of Debian packaging is that such things should be
> removed, packaged as separate, and made as dependencies.

I confirm that I noticed that this is a code copy of libsvm but Debian
has libsvm-3.21 and when I checked the package source of libsvm I came
to the conclusion that the code copy is different enough from what
Debian is distributing to get into even more trouble than I'm currently
observing.

I can confirm that I understood [3] and try to do my best (and thus
removing code copies of biosquid and hmmer2) but I in this case I do not
see any advantage of separate packaging.

Kind regards and thanks for the hint anyway

      Andreas.
 
> [1] https://www.csie.ntu.edu.tw/~cjlin/libsvm/
> [2] https://metacpan.org/pod/Algorithm::SVM
> [3] https://wiki.debian.org/UpstreamGuide#No_inclusion_of_third_party_code

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Carnë Draug
On 19 April 2017 at 16:06, Andreas Tille <[hidden email]> wrote:

> Hi Carnė,
>
> On Wed, Apr 19, 2017 at 03:52:30PM +0100, Carnė Draug wrote:
>> >
>> > I think I found the problem.  DataSet::getAttribute(int) is defined in
>> > bio-tools-psort-svmloc/libsvm.cpp.  While
>> > [...]
>>
>> The filename rang a bell and seems like they are vendorising libsvm
>> [1].  This is confirmed on the README file inside the
>> bio-tools-psort-svmloc directory:
>>
>>   Algorithm::SVM is based on the libsvm 2.8 library written by
>>   Chih-Chung Chang and Chih-Jen Lin.
>>
>> Turns out that psortb is actually vendorising Algorithm::SVM [2] (they
>> just moved it out of the Algorithm::SVM namespace and into
>> Bio::Tools::PSort::SVMLoc) which in turn is vendorising libsvm.  My
>> understanding of Debian packaging is that such things should be
>> removed, packaged as separate, and made as dependencies.
>
> I confirm that I noticed that this is a code copy of libsvm but Debian
> has libsvm-3.21 and when I checked the package source of libsvm I came
> to the conclusion that the code copy is different enough from what
> Debian is distributing to get into even more trouble than I'm currently
> observing.
>
> I can confirm that I understood [3] and try to do my best (and thus
> removing code copies of biosquid and hmmer2) but I in this case I do not
> see any advantage of separate packaging.
>
> Kind regards and thanks for the hint anyway
>
>       Andreas.
>
>> [1] https://www.csie.ntu.edu.tw/~cjlin/libsvm/
>> [2] https://metacpan.org/pod/Algorithm::SVM
>> [3] https://wiki.debian.org/UpstreamGuide#No_inclusion_of_third_party_code
>

Seems like some people from Fedora have faced the same issue and
already solved it for you.  They sent their patch upstream [4]
although it seems like the current maintainer does not reply to bugs,
or at least not the ones reported on RT [5].  There was one other
issue that may be important too about being able to build for 32 bit
with recent versions of perl [6].

Carnë

[4] https://rt.cpan.org/Public/Bug/Display.html?id=79106
[5] https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-SVM
[6] https://rt.cpan.org/Public/Bug/Display.html?id=79754

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-2
In reply to this post by Carnë Draug
On Wed, Apr 19, 2017 at 03:52:30PM +0100, Carnë Draug wrote:
> Seems like some people from Fedora have faced the same issue and
> already solved it for you.  They sent their patch upstream [4]
> although it seems like the current maintainer does not reply to bugs,
> or at least not the ones reported on RT [5].

I suspect that upstream is not active any more.

> There was one other
> issue that may be important too about being able to build for 32 bit
> with recent versions of perl [6].

I was hoping that this change which I turned into a quilt patch[7] would
solve the issue.  Unfortunately this does not help.  The file libsvm.cpp
is just compiled inside the resulting Makefile and thus the library is
lacking the respective symbols.  Patch [7] does not do the trick
unfortunately.

Any other hints?

Kind regards

       Andreas.

> [4] https://rt.cpan.org/Public/Bug/Display.html?id=79106
> [5] https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-SVM
> [6] https://rt.cpan.org/Public/Bug/Display.html?id=79754

[7] https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches/fix_build_Algorithm-SVM.patch

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Carnë Draug
On 19 April 2017 at 19:37, Andreas Tille <[hidden email]> wrote:

> On Wed, Apr 19, 2017 at 03:52:30PM +0100, Carnė Draug wrote:
> [...]
>> There was one other
>> issue that may be important too about being able to build for 32 bit
>> with recent versions of perl [6].
>
> I was hoping that this change which I turned into a quilt patch[7] would
> solve the issue.  Unfortunately this does not help.  The file libsvm.cpp
> is just compiled inside the resulting Makefile and thus the library is
> lacking the respective symbols.  Patch [7] does not do the trick
> unfortunately.
>
> Any other hints?
>
> Kind regards
>
>        Andreas.
>
>> [4] https://rt.cpan.org/Public/Bug/Display.html?id=79106
>> [5] https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-SVM
>> [6] https://rt.cpan.org/Public/Bug/Display.html?id=79754
>
> [7]
> https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches/fix_build_Algorithm-SVM.patch

To help with this, I have packaged Algorithm::SVM [8], and unbundled
libsvm from it with the patches from Fedora.  The changes seem to make
autopkgtest happy in sid-amd64 (Algorithm::SVM has a test unit).

Note that even if you decide against unbundling Algorithm::SVM out of
psortb, psortb is still dependent on it.  The module
Bio::Tools::SVMLoc, which is part of psortb, uses Algorithm::SVM and
not the bundled version in Bio::Tools::PSort::SVMLoc (I guess the Loc
means local to the psortb?).

Can you check if my attempt at packaging Algorithm::SVM works for you
or if you still have any issue?

Carnë

[8] https://anonscm.debian.org/cgit/pkg-perl/packages/libalgorithm-svm-perl.git/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-6
Hi Carnë,

On Wed, Apr 19, 2017 at 10:12:53PM +0100, Carnë Draug wrote:

> >> [4] https://rt.cpan.org/Public/Bug/Display.html?id=79106
> >> [5] https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-SVM
> >> [6] https://rt.cpan.org/Public/Bug/Display.html?id=79754
> >
> > [7]
> > https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches/fix_build_Algorithm-SVM.patch
>
> To help with this, I have packaged Algorithm::SVM [8], and unbundled
> libsvm from it with the patches from Fedora.  The changes seem to make
> autopkgtest happy in sid-amd64 (Algorithm::SVM has a test unit).

I made some cosmetic changes - please pull.  If you add an ITP bug I'd
sponsor immediately.  Thanks for working on this.
 
> Note that even if you decide against unbundling Algorithm::SVM out of
> psortb, psortb is still dependent on it.  The module
> Bio::Tools::SVMLoc, which is part of psortb, uses Algorithm::SVM and
> not the bundled version in Bio::Tools::PSort::SVMLoc (I guess the Loc
> means local to the psortb?).

I'm afraid I do not understand what you want to tell me here.  I
compared the code of Algorithm::SVM (from your packaging) with
Bio::Tools::SVMLoc from psortb source and there is quite some diff and a
separate name space.  I do not intend to change upstream code to a large
amount to sort this out without even a minor understanding of the
rationale behind this fork of Algorithm::SVM.

If you think I would need Algorithm::SVM as an extra Build-Depends
adding libalgorithm-svm-perl did not helped to change anything.

> Can you check if my attempt at packaging Algorithm::SVM works for you
> or if you still have any issue?

While I can confirm that the packaging of Algorithm::SVM looks fine I
totally fail to see how this would be helpful for psort.  I'd be happy
if you simply commit some change to psortb (or send me some git
format-patch I could apply) to make me better understand in code what
you want to suggest.

Thanks in any case for your help

      Andreas.
 
> [8] https://anonscm.debian.org/cgit/pkg-perl/packages/libalgorithm-svm-perl.git/

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Carnë Draug
On 20 April 2017 at 07:20, Andreas Tille <[hidden email]> wrote:

> Hi Carnė,
>
> On Wed, Apr 19, 2017 at 10:12:53PM +0100, Carnė Draug wrote:
>> >> [4] https://rt.cpan.org/Public/Bug/Display.html?id=79106
>> >> [5] https://rt.cpan.org/Public/Dist/Display.html?Name=Algorithm-SVM
>> >> [6] https://rt.cpan.org/Public/Bug/Display.html?id=79754
>> >
>> > [7]
>> > https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches/fix_build_Algorithm-SVM.patch
>>
>> To help with this, I have packaged Algorithm::SVM [8], and unbundled
>> libsvm from it with the patches from Fedora.  The changes seem to make
>> autopkgtest happy in sid-amd64 (Algorithm::SVM has a test unit).
>
> I made some cosmetic changes - please pull.  If you add an ITP bug I'd
> sponsor immediately.  Thanks for working on this.
>
>> Note that even if you decide against unbundling Algorithm::SVM out of
>> psortb, psortb is still dependent on it.  The module
>> Bio::Tools::SVMLoc, which is part of psortb, uses Algorithm::SVM and
>> not the bundled version in Bio::Tools::PSort::SVMLoc (I guess the Loc
>> means local to the psortb?).
>
> I'm afraid I do not understand what you want to tell me here.  I
> compared the code of Algorithm::SVM (from your packaging) with
> Bio::Tools::SVMLoc from psortb source and there is quite some diff and a
> separate name space.  I do not intend to change upstream code to a large
> amount to sort this out without even a minor understanding of the
> rationale behind this fork of Algorithm::SVM.
>
> If you think I would need Algorithm::SVM as an extra Build-Depends
> adding libalgorithm-svm-perl did not helped to change anything.
>
>> Can you check if my attempt at packaging Algorithm::SVM works for you
>> or if you still have any issue?
>
> While I can confirm that the packaging of Algorithm::SVM looks fine I
> totally fail to see how this would be helpful for psort.  I'd be happy
> if you simply commit some change to psortb (or send me some git
> format-patch I could apply) to make me better understand in code what
> you want to suggest.
>
> Thanks in any case for your help
>
>       Andreas.
>
>> [8] https://anonscm.debian.org/cgit/pkg-perl/packages/libalgorithm-svm-perl.git/
>
> --
> http://fam-tille.de

You are right.  I now looked at all the files (instead of just a few)
between Algorithm::SVM and Bio::Tools::PSort::SVMLoc, and while some
were pretty much the same I see now others have changed a lot.

But despite having Bio::Tools::PSort::SVMLoc, psortb also uses the
'wild type' Algorithm::SVM:

    $ grep -r 'use Algorithm::SVM' psortb
    psortb/lib/Bio/Tools/SVMLoc.pm:use Algorithm::SVM::DataSet;
    psortb/lib/Bio/Tools/SVMLoc.pm:use Algorithm::SVM;

which means that after fixing whatever issues there are in psortb, it
will still need to be dependent on libalgorithm-svm-perl that I just
packaged.

---

I noticed that there is no `bio-tools-psort-svmloc/bindings.cpp` file,
there is only `bio-tools-psort-svmloc/bindings.h`.  I couldn't find
the definitions of the DataSet and SVM classes declared in bindings.h.
Maybe that is part of the issue?

----

While Algorithm::SVM and Bio::Tools::PSort::SVMLoc have diverged quite
a bit, the changes don't seem major to me.  Since psortb already
requires Algorithm::SVM, since psortb is an active project and
Algorithm::SVM is not, and since psortb developers will understand the
divergence between Algorithm::SVM and Bio::Tools::PSort::SVMLoc (while
it is still small), won't the psortb developers be interested in
sorting the divergence between the two things?

And if SVMLoc really is needed as a separate, it makes more sense to
me that it would made use of Algorithm::SVM instead of their current
approach of copying the code and adding a few more methods.

Carnë

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Alex Muntada-3
In reply to this post by Andreas Tille-5
Andreas Tille:

> #     Error:  Can't load '/build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so' for module Bio::Tools::PSort::SVMLoc: /build/psortb-3.0.4+dfsg/bio-tools-psort-svmloc/../blib/arch/auto/Bio/Tools/PSort/SVMLoc/SVMLoc.so: undefined symbol: _ZN7DataSet12getAttributeEi at /usr/lib/x86_64-linux-gnu/perl/5.24/DynaLoader.pm line 187.

I was wondering if you tried to ldd SVMLoc.so and if it maybe
showed anything helpful.

Cheers,
Alex

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

gregor herrmann-3
In reply to this post by Andreas Tille-6
On Thu, 20 Apr 2017 08:20:06 +0200, Andreas Tille wrote:

> > To help with this, I have packaged Algorithm::SVM [8], and unbundled
> > libsvm from it with the patches from Fedora.  The changes seem to make
> > autopkgtest happy in sid-amd64 (Algorithm::SVM has a test unit).
> I made some cosmetic changes - please pull.  If you add an ITP bug I'd
> sponsor immediately.  Thanks for working on this.

Thanks from me as well, and the package looks good. Some remarks:

- There are two patches without a "Forwarded:" header;
  do-not-link-to-libm.patch is probably a candidate for "Forwarded:
  not-needed", but spelling.patch should probably be forwarded
  upstream.
- remove-3rd-party-libsvm.patch removes two files; while this works
  now it can cause problems in the future (when those files change);
  alternatives would be to rm them in debian/rules at the appropriate
  step, or to repackage the whole thing without them [0].
- d/copyright mentions a bundled copy of libsvm without spelling out
  the detailed copyright/license terms for the files (which are still
  present in the source package despite the
  remove-3rd-party-libsvm.patch). I think that's not enough; but
  adding the detailed information is a bit hard since libsvm.{cpp,h}
  don't contain any information …
- Putting the last two issues together, I think that repackaging the
  tarball in order to remove the 2 files would be the best solution;
  if they're just gone we don't have to worry about merge issues with
  the patch or about copyright/license issues with the files.
 
[0] cf. https://pkg-perl.alioth.debian.org/howto/repacking.html
 

Cheers,
gregor

--
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Neil Young: Hey Hey, My My

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Carnë Draug
On 21 April 2017 at 00:02, gregor herrmann <[hidden email]> wrote:

> [...]
> - remove-3rd-party-libsvm.patch removes two files; while this works
>   now it can cause problems in the future (when those files change);
>   alternatives would be to rm them in debian/rules at the appropriate
>   step, or to repackage the whole thing without them [0].
> - d/copyright mentions a bundled copy of libsvm without spelling out
>   the detailed copyright/license terms for the files (which are still
>   present in the source package despite the
>   remove-3rd-party-libsvm.patch). I think that's not enough; but
>   adding the detailed information is a bit hard since libsvm.{cpp,h}
>   don't contain any information …
> - Putting the last two issues together, I think that repackaging the
>   tarball in order to remove the 2 files would be the best solution;
>   if they're just gone we don't have to worry about merge issues with
>   the patch or about copyright/license issues with the files.
>
> [0] cf. https://pkg-perl.alioth.debian.org/howto/repacking.html

The actual license for those files is in section 6 of the README file
named 'libsvm·COPYRIGHT·AND·LICENCE'.  Since lack of license is not an
issue, should I still do the repackaging or should I use debian/rules
to remove them?

Carnë

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

Andreas Tille-5
Hi Carnë,

On Fri, Apr 21, 2017 at 02:40:35PM +0100, Carnë Draug wrote:

> On 21 April 2017 at 00:02, gregor herrmann <[hidden email]> wrote:
> > [...]
> > - Putting the last two issues together, I think that repackaging the
> >   tarball in order to remove the 2 files would be the best solution;
> >   if they're just gone we don't have to worry about merge issues with
> >   the patch or about copyright/license issues with the files.
> >
> > [0] cf. https://pkg-perl.alioth.debian.org/howto/repacking.html
>
> The actual license for those files is in section 6 of the README file
> named 'libsvm·COPYRIGHT·AND·LICENCE'.  Since lack of license is not an
> issue, should I still do the repackaging or should I use debian/rules
> to remove them?

I don't know about Perl team policy but I personally agree with Gregor
that removing those files is the most easy to understand way and I for
myself would prefer this solution.

Kind regards

     Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problems building psortb from source (Re: Psortb has errors in Perl testsuite)

Andreas Tille-5
In reply to this post by Carnë Draug
Hi psortb developers,

I'm writing you on behalf of the Debian Med team which is a group of
Debian developers with the objective to package Free Software in live
sciences and medicine for official Debian.  Since I received a user
request to package psortb.

When trying to build psortb I worked around issues caused by the fact
that there were some incompatibilities with Debian packaged biosquid and
hmmer2 (from the latter also some code seems to be missing in case you
want to avoid linking to external library from hmmer2 I doubt psortb can
be built successfully).  If you are interested in this you can have a
look at the according discussion on the Debian Med development list[1].
To implement this I have applied some patches to the packaging[2].

Unfortunately there is a hurdle remaining we were not able to take since
it seems there is some code missing.  It seems that the file
bio-tools-psort-svmloc/bindings.cpp.  This is discussed in a thread on
the Debian Med developer list[3] - I quoted the most informative mail
below.

We found out that you are using a fork of Algorithm::SVM which somehow
looks to divergent to replace it by the original Algorithm::SVM but some
code parts are missing and it does not build.  It would help if you
would clarify the motivation for this fork and if it is really needed
we somehow need some hints how to build it successfully.

Kind regards

      Andreas.

[1] https://lists.alioth.debian.org/pipermail/debian-med-packaging/2017-April/051686.html
[2] https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches
[3] https://lists.alioth.debian.org/pipermail/debian-med-packaging/2017-April/051746.html
[4] https://metacpan.org/release/Algorithm-SVM

On Thu, Apr 20, 2017 at 08:25:44PM +0100, Carnë Draug wrote:

> On 20 April 2017 at 19:41, Carnë Draug <[hidden email]> wrote:
> > [...]
> > I noticed that there is no `bio-tools-psort-svmloc/bindings.cpp` file,
> > there is only `bio-tools-psort-svmloc/bindings.h`.  I couldn't find
> > the definitions of the DataSet and SVM classes declared in bindings.h.
> > Maybe that is part of the issue?
> >
>
> I have attached a patch that removes the bundled libsvm from psortb.
>
> However, the code was originally using libsvm2 while Debian packages
> libsvm3.  But that libsvm version specific code should have been in
> the bindings.cpp file which is missing in psortb so I can't fix that.
> If the file was there, the fix should be similar to this patch in
> libalgorithm-svm-perl [1].
>
> Carnë
>
> [1] https://anonscm.debian.org/cgit/pkg-perl/packages/libalgorithm-svm-perl.git/tree/debian/patches/update-libsvm3.patch


--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Solved (Was: Problems building psortb from source)

Andreas Tille-5
Hi,

just to let you know.  I think I've found the solution which seems to
be that I also need

   http://www.psort.org/download/libpsortb-1.0.tar.gz

When building this lib I can link psortb against it.  I admit I was
confused since the psortb download has the term 'all' inside the tarball
name and several duplicated files with the lib download.  It might make
sense to express this issue more clearly.

Sorry for the noise

       Andreas.

On Sat, Apr 22, 2017 at 08:08:25AM +0200, Andreas Tille wrote:

> Hi psortb developers,
>
> I'm writing you on behalf of the Debian Med team which is a group of
> Debian developers with the objective to package Free Software in live
> sciences and medicine for official Debian.  Since I received a user
> request to package psortb.
>
> When trying to build psortb I worked around issues caused by the fact
> that there were some incompatibilities with Debian packaged biosquid and
> hmmer2 (from the latter also some code seems to be missing in case you
> want to avoid linking to external library from hmmer2 I doubt psortb can
> be built successfully).  If you are interested in this you can have a
> look at the according discussion on the Debian Med development list[1].
> To implement this I have applied some patches to the packaging[2].
>
> Unfortunately there is a hurdle remaining we were not able to take since
> it seems there is some code missing.  It seems that the file
> bio-tools-psort-svmloc/bindings.cpp.  This is discussed in a thread on
> the Debian Med developer list[3] - I quoted the most informative mail
> below.
>
> We found out that you are using a fork of Algorithm::SVM which somehow
> looks to divergent to replace it by the original Algorithm::SVM but some
> code parts are missing and it does not build.  It would help if you
> would clarify the motivation for this fork and if it is really needed
> we somehow need some hints how to build it successfully.
>
> Kind regards
>
>       Andreas.
>
> [1] https://lists.alioth.debian.org/pipermail/debian-med-packaging/2017-April/051686.html
> [2] https://anonscm.debian.org/cgit/debian-med/psortb.git/tree/debian/patches
> [3] https://lists.alioth.debian.org/pipermail/debian-med-packaging/2017-April/051746.html
> [4] https://metacpan.org/release/Algorithm-SVM
>
> On Thu, Apr 20, 2017 at 08:25:44PM +0100, Carnë Draug wrote:
> > On 20 April 2017 at 19:41, Carnë Draug <[hidden email]> wrote:
> > > [...]
> > > I noticed that there is no `bio-tools-psort-svmloc/bindings.cpp` file,
> > > there is only `bio-tools-psort-svmloc/bindings.h`.  I couldn't find
> > > the definitions of the DataSet and SVM classes declared in bindings.h.
> > > Maybe that is part of the issue?
> > >
> >
> > I have attached a patch that removes the bundled libsvm from psortb.
> >
> > However, the code was originally using libsvm2 while Debian packages
> > libsvm3.  But that libsvm version specific code should have been in
> > the bindings.cpp file which is missing in psortb so I can't fix that.
> > If the file was there, the fix should be similar to this patch in
> > libalgorithm-svm-perl [1].
> >
> > Carnë
> >
> > [1] https://anonscm.debian.org/cgit/pkg-perl/packages/libalgorithm-svm-perl.git/tree/debian/patches/update-libsvm3.patch
>
>
> --
> http://fam-tille.de
>
> _______________________________________________
> Debian-med-packaging mailing list
> [hidden email]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging
>

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Psortb has errors in Perl testsuite

gregor herrmann-3
In reply to this post by Andreas Tille-5
On Fri, 21 Apr 2017 15:50:23 +0200, Andreas Tille wrote:

> On Fri, Apr 21, 2017 at 02:40:35PM +0100, Carnë Draug wrote:
> > On 21 April 2017 at 00:02, gregor herrmann <[hidden email]> wrote:
> > > [...]
> > > - Putting the last two issues together, I think that repackaging the
> > >   tarball in order to remove the 2 files would be the best solution;
> > >   if they're just gone we don't have to worry about merge issues with
> > >   the patch or about copyright/license issues with the files.
> > >
> > > [0] cf. https://pkg-perl.alioth.debian.org/howto/repacking.html
> >
> > The actual license for those files is in section 6 of the README file
> > named 'libsvm·COPYRIGHT·AND·LICENCE'.  Since lack of license is not an
> > issue, should I still do the repackaging or should I use debian/rules
> > to remove them?
Oops, sorry for missing this.

In that case, you could also add it to d/copyright as:

Files: libsvm.*
Copyright: 2000-2002, Chih-Chung Chang and Chih-Jen Lin
License: BSD-3
Comment: The copyright/license information is taken from the
 top-level README file.

License: BSD-3
 …

/*
And remove the comment from the "Files: *" stanza.
The new comment to help the ftp-masters find the data who might miss
it as I did :)
*/
 

> I don't know about Perl team policy but I personally agree with Gregor
> that removing those files is the most easy to understand way and I for
> myself would prefer this solution.

I don't think we have a strict policy for how to handle such cases,
and all options have some pros and cons:
- As mentioned, the remove-via-a-patch can be a bit fragile in the
  future.
- Repackagaging (as +ds in this case) is quite clear but a bit
  heavy-handed.
- Some package use debian/rules to move unwanted files back and forth
  before after build (deleting them is a bit messy when they are in
  git and cause warnings by dpkg-source, although this also works).
  Examples: the perl packages in [0]
- What I'm wondering is if we need any special treatment at all;
  aren't the changes in remove-3rd-party-libsvm.patch (Makefile.PL
  SVM.xs bindings.h) enough to use the system lib? OTOH, it's safer
  if the bundled versions are not around ...

I guess I'd go for the option of backupping+restoring the 2 files in
debian/rules. But repackaging sounds ok to me as well.


Cheers,
gregor

[0]
https://codesearch.debian.net/search?q=mv.*\.save\s+path%3Adebian%2Frules

--
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Led Zeppelin: Stairway to Heaven

signature.asc (981 bytes) Download Attachment
Loading...