libdnf icon indicating copy to clipboard operation
libdnf copied to clipboard

perl swig binding is broken

Open soig opened this issue 7 years ago • 5 comments

Hi perl swig binding is broken, which prevents using libdnf in perl-URPM + urpmi Please fix it & enable it by default so that breakages are detected earlier. The bug is present since at least 0.16.0 until 0.19.1. Same errors: BUILD/libdnf-0.19.1/bindings/swig/utils.i:8: Error: Unable to find 'std_shared_ptr.i' BUILD/libdnf-0.19.1/bindings/swig/transaction.i:9: Error: Unable to find 'std_shared_ptr.i'

soig avatar Sep 11 '18 11:09 soig

See also this swig issue: https://github.com/swig/swig/issues/664

soig avatar Sep 11 '18 13:09 soig

Copying /usr/share/swig/3.0.12/r/shared into /usr/share/swig/3.0.12/perl5/ seems to workaround it

soig avatar Sep 11 '18 13:09 soig

This sounds like a bug in swig, not in libdnf... isnt' it?

igor-raits avatar Sep 11 '18 14:09 igor-raits

I wouldn't call it a bug in swig, it's more lack of support for shared pointers in swig/perl bindings. We need to evaluate possible options which includes

  • workaround suggested in previous comment
  • avoiding shared_ptr in perl bindings
  • submitting a patch to swig that adds shared_ptr support

dmach avatar Sep 13 '18 07:09 dmach

The new dnf5 code base (dnf-5-devel branch) uses a custom WeakPtr implementation that works with perl.

dmach avatar Jan 20 '21 12:01 dmach

Closing as Perl bindings are available in dnf5 and are compiled by default.

jan-kolarik avatar Feb 12 '24 15:02 jan-kolarik