[libvirt] gem install ruby-libvirt fails on FreeBSD 10.2

Hi, Installing the ruby-libvirt gem fails on FreeBSD 10.2 since it can't locate the lib and include dir. Installing with: gem install ruby-libvirt -- --with-libvirt-include=/usr/local/include/libvirt --with-libvirt-lib=/usr/local/lib/libvirt.so works fine. It would be great if this worked out of the box, e.g. detects that it is building on BSD and applies the above settings as default, or at least it could be provided as a hint if running make fails to guide ruby noobs, like me. Regards, Rickard von Essen

Rickard von Essen wrote:
Hi,
Installing the ruby-libvirt gem fails on FreeBSD 10.2 since it can't locate the lib and include dir. Installing with: gem install ruby-libvirt -- --with-libvirt-include=/usr/local/include/libvirt --with-libvirt-lib=/usr/local/lib/libvirt.so works fine.
It would be great if this worked out of the box, e.g. detects that it is building on BSD and applies the above settings as default, or at least it could be provided as a hint if running make fails to guide ruby noobs, like me.
Hi Rickard, I tried it on my system and it seems to work fine without manually providing include and lib paths.
From what I can see, it uses pkg-config to detect CFLAGS and LDFLAGS (I could be wrong here though because I'm not familiar with Ruby).
Could you please check if you have this working: $ pkg-config --libs --cflags libvirt -I/usr/local/include -L/usr/local/lib -lvirt $ If that does not work, could you please describe how did you do the libvirt installation on your system? Thanks, Roman Bogorodskiy

Turns out it works fine out of the box if you have pkgconf installed. root@freebsd-10:/ # pkg install -y pkgconf Updating FreeBSD repository catalogue... FreeBSD repository is up-to-date. All repositories are up-to-date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: pkgconf: 0.9.12 The process will require 56 KiB more space. [1/1] Installing pkgconf-0.9.12... [1/1] Extracting pkgconf-0.9.12: 100% root@freebsd-10:/ # gem install ruby-libvirt Fetching: ruby-libvirt-0.5.2.gem (100%) Building native extensions. This could take a while... Successfully installed ruby-libvirt-0.5.2 Parsing documentation for ruby-libvirt-0.5.2 Installing ri documentation for ruby-libvirt-0.5.2 Done installing documentation for ruby-libvirt after 0 seconds 1 gem installed On Tue, Oct 20, 2015 at 12:49 PM, Roman Bogorodskiy <bogorodskiy@gmail.com> wrote:
Rickard von Essen wrote:
Hi,
Installing the ruby-libvirt gem fails on FreeBSD 10.2 since it can't locate the lib and include dir. Installing with: gem install ruby-libvirt -- --with-libvirt-include=/usr/local/include/libvirt --with-libvirt-lib=/usr/local/lib/libvirt.so works fine.
It would be great if this worked out of the box, e.g. detects that it is building on BSD and applies the above settings as default, or at least it could be provided as a hint if running make fails to guide ruby noobs, like me.
Hi Rickard,
I tried it on my system and it seems to work fine without manually providing include and lib paths.
From what I can see, it uses pkg-config to detect CFLAGS and LDFLAGS (I could be wrong here though because I'm not familiar with Ruby).
Could you please check if you have this working:
$ pkg-config --libs --cflags libvirt -I/usr/local/include -L/usr/local/lib -lvirt $
If that does not work, could you please describe how did you do the libvirt installation on your system?
Thanks,
Roman Bogorodskiy
participants (2)
-
Rickard von Essen
-
Roman Bogorodskiy