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