FS#52851 - [vagrant-substrate] wrong prefix in pkg-config configuration files

Attached to Project: Community Packages
Opened by Nicolas I. (IooNag) - Saturday, 04 February 2017, 21:22 GMT
Last edited by Jonathan Steel (jsteel) - Wednesday, 22 February 2017, 16:14 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jonathan Steel (jsteel)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

The pkg-config files installed in /opt/vagrant/embedded/lib/pkgconfig/ defines "prefix=/build/vagrant-substrate/src/vagrant-installers/vagrant-substrate/staging/embedded" instead of "prefix=/opt/vagrant/embedded". This makes pkg-config give non-existent paths when using these files.

For example:

$ PKG_CONFIG_PATH=/opt/vagrant/embedded/lib/pkgconfig pkg-config --cflags libxml-2.0
-I/build/vagrant-substrate/src/vagrant-installers/vagrant-substrate/staging/embedded/include/libxml2

instead of "-I/opt/vagrant/embedded/include/libxml2 ..."

Additional info:
* package version: vagrant-substrate 575.af28386-1
This task depends upon

Closed by  Jonathan Steel (jsteel)
Wednesday, 22 February 2017, 16:14 GMT
Reason for closing:  No response
Additional comments about closing:  Feel free to re-open or contact me on IRC/email if you want to pick this up again.
Comment by Jonathan Steel (jsteel) - Sunday, 05 February 2017, 18:32 GMT
I'm interested to know why you are working with vagrant-substrate directly, can you explain what you are trying to do? As far as I am concerned, vagrant-substrate is for vagrant only.
Comment by Nicolas I. (IooNag) - Sunday, 05 February 2017, 19:21 GMT
I am trying to use the libvirt backend of vagrant. In order to do so, there is a vagrant plugin which uses ruby-libvirt, which builds a native extension to handle the interface between Ruby and libvirt.so. The command "vagrant plugin install libvirt" builds all the required gems but when linking ruby-libvirt's extension, it needs to use libvirt.so from /usr/lib and libruby.so from /opt/vagrant/embedded/lib.

Currently, using instructions from the wiki (https://wiki.archlinux.org/index.php/Vagrant#vagrant-libvirt) or the AUR package (https://aur.archlinux.org/packages/vagrant-libvirt/) result in a ruby-libvirt library (/opt/vagrant/embedded/gems/extensions/x86_64-linux/2.2.0/ruby-libvirt-0.7.0/_libvirt.so) which is linked with the system libruby.so instead of vagrant's one (because in the linked command line, -L/usr/lib appears before -L/opt/vagrant/embedded/lib and "-lruby" is used without specifying a version number). This makes the extension broken because the Ruby version differs (Vagrant uses Ruby 2.2 and Arch Linux uses Ruby 2.4).

Therefore I am trying to build libvirt library (libvirt.so) with the libraries in /opt/vagrant/embedded, which leads me to using vagrant-substrate pkg-config files.
How would you install the libvirt plugin?
Comment by Jonathan Steel (jsteel) - Monday, 06 February 2017, 17:55 GMT
I don't use that plugin. I'm open to reviewing the vagrant-substrate PKGBUILD or patches if you find a fix, but I don't have interest to get this AUR package/3rd party plugin working myself. You might find either of the upstream projects more helpful.

To confirm, I'm happy to try and get this working, but I'm not taking the lead.

Loading...