Orange Forum • View topic - rpm-ify for Fedora and RHEL

rpm-ify for Fedora and RHEL

A place to ask questions about methods in Orange and how they are used and other general support.

rpm-ify for Fedora and RHEL

Postby besser82 » Thu Aug 22, 2013 12:32

Hello Developers of Orange,

my name is Björn Esser and I'm a Fedora packager. I want to package Orange 2.7 for Fedora and RHEL, but stumbled upon some issues:

there are bundled libs inside Orange:

  • blas ---> can be substituted by system's libblas
  • linpack ---> can be substituted by system's libR
  • liblinear ---> Does this really need to be liblinear == 1.8 ? Why? (liblinear 1.93 segfaults)
  • libsvm ---> segfaults with system's libsvm 3.17
  • qhull ---> can be substituted by system's qhull

Unfortunately it's not allowed to ship bundled-libs within Fedora/RHEL-rpms.

Are there any ways we can start some coop to get this solved and get Orange into Fedora / RHEL?

Cheers,
Björn

Re: rpm-ify for Fedora and RHEL

Postby Ales » Thu Aug 22, 2013 16:40

besser82 wrote:there are bundled libs inside Orange:

    ...
  • liblinear ---> Does this really need to be liblinear == 1.8 ? Why? (liblinear 1.93 segfaults)
  • libsvm ---> segfaults with system's libsvm 3.17


liblinear 1.8 and 1.9 are not binary (or source) compatible. However updating the interface code on the orange side should be fairly straightforward.

Similary based on a diff of libsvm's code the 'struct model' gained a new member (int *sv_indices) which is not initialized by orange in it's deserialization routine. This should also be an easy fix.

besser82 wrote:Unfortunately it's not allowed to ship bundled-libs within Fedora/RHEL-rpms.

There is some rudimentary support for linking to external versions of the mentioned libraries through setup-site.cfg configuration file, but it's not very well tested (or flexible).

Re: rpm-ify for Fedora and RHEL

Postby besser82 » Thu Aug 22, 2013 17:49

Ales wrote:liblinear 1.8 and 1.9 are not binary (or source) compatible. However updating the interface code on the orange side should be fairly straightforward.


Can you give me any clues in which files to look and add changes ?

Ales wrote:Similary based on a diff of libsvm's code the 'struct model' gained a new member (int *sv_indices) which is not initialized by orange in it's deserialization routine. This should also be an easy fix.


So just initializing this data member should be enough, I suppose?

Ales wrote:There is some rudimentary support for linking to external versions of the mentioned libraries through setup-site.cfg configuration file, but it's not very well tested (or flexible).


Thanks, I've already seen this. And used it for qhull, R and cblas :)

Would appreciate to get some diff/patches from me to have them merged into Orange 2.X?

Re: rpm-ify for Fedora and RHEL

Postby Ales » Thu Aug 22, 2013 18:48

besser82 wrote:Can you give me any clues in which files to look and add changes ?

liblinear interface is implemented in source/orange/liblinear_interface.cpp. I think that is the only file that needs changing (problemFromExamples function and all uses of liblinear's predict* functions)

besser82 wrote:
Ales wrote:Similary based on a diff of libsvm's code the 'struct model' gained a new member (int *sv_indices) which is not initialized by orange in it's deserialization routine. This should also be an easy fix.


So just initializing this data member should be enough, I suppose?

Actually I had this patch in my patch queue for quite a while (I forgot about it, but the diff of the libsvm header file reminded me). I will commit it and push it to the repository.

Ales wrote:Would appreciate to get some diff/patches from me to have them merged into Orange 2.X?
Sure.

Re: rpm-ify for Fedora and RHEL

Postby besser82 » Thu Aug 22, 2013 22:45

Ales wrote:liblinear interface is implemented in source/orange/liblinear_interface.cpp. I think that is the only file that needs changing (problemFromExamples function and all uses of liblinear's predict* functions)


Did as you suggested, but it still segfaults :( You can find my changes here. Ouput of Valgrind is here.
I hope you can give me some further assistance. :)

Re: rpm-ify for Fedora and RHEL

Postby Ales » Fri Aug 23, 2013 11:53

Try replacing
Code: Select all
*ptrY = (double) (*iter).getClass();

with
Code: Select all
*ptrY = (double) (*iter).getClass().intV;


The TValue (returned by getClass() call) overloads the 'operator (float)' to return a NaN if the value itself is discrete (and here it is always discrete).

Also the return value from TLinearClassifier::operator() should be
Code: Select all
TValue((int) predict_label)

Re: rpm-ify for Fedora and RHEL

Postby besser82 » Fri Aug 23, 2013 15:49

Thanks! Segfaults are gone. :D But there's now some new output from unittests differing from the output before :shock:

Output before changes with liblinear-1.8
Output after changes with liblinear-1.93
Output with liblinear-1.93 and libsvm-3.17 (rebased my changes onto your commit)

Can you please have a look at them and confirm whether it's false positive or serious regression? So we can have this fixed-up before I file a pull-request and go on to libsvm-update. For me the new output look like values changed because of liblinear now uses double instead of int for prediction and inside struct problem...

Thanks in advance.

  • 2013-08-23 - 18:10 UTC: Added output of unittest with ll-1.93 and ls-3.17

Re: rpm-ify for Fedora and RHEL

Postby besser82 » Sun Aug 25, 2013 21:48

Hi Ales!

You can actually forget about the failures from testsuite, that was my fault. There's currently only two tests failing, like they did before the updates / changes.

unittest.log

Some tests are skipped can you please tell me which ones and why?

I've updated my pull-request and introduces a few small changes:

  • replaced copyrighted Times-Roman.ttf with GPL'ed FreeSerif.ttf ---> It looks nearly identical.
  • some minor edit to make it possible to have the python-based part of Orange installed in a "noarch"-location and the libs in an arched one.

During tomorow I'll do another minor tweaks and update my pull-request again (if it's not already merged then) or file a new one.

Cheers,
    Björn


Return to Questions & Support



cron