perl swig binding is broken
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'
See also this swig issue: https://github.com/swig/swig/issues/664
Copying /usr/share/swig/3.0.12/r/shared into /usr/share/swig/3.0.12/perl5/ seems to workaround it
This sounds like a bug in swig, not in libdnf... isnt' it?
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
The new dnf5 code base (dnf-5-devel branch) uses a custom WeakPtr implementation that works with perl.
Closing as Perl bindings are available in dnf5 and are compiled by default.