The docs in libvirt-perl.git refer still to Makefile.PL.
In the buildlog I noticed that somehow /usr/local is used, nothing uses the relevant flags
from libvirt.pc:
cc -shared -L/usr/local/lib64 -fstack-protector -o blib/arch/auto/Sys/Virt/Virt.so
lib/Sys/Virt.o -lvirt
But even the patch below just appends -L %{_libdir} to that command. Any idea how to
suppress -L/usr/local/lib64? It happens to work for me, likely because the toolchain has
/usr/lib64 in a default path.
Olaf
--- Sys-Virt-20180703T160550.57299b4.orig/Build.PL
+++ Sys-Virt-20180703T160550.57299b4/Build.PL
@@ -24,6 +24,7 @@ die "libvirt >= $libvirtver is required\
my $LIBVIRT_LIBS = `pkg-config --libs libvirt`;
my $LIBVIRT_CFLAGS = `pkg-config --cflags libvirt`;
+my $LIBVIRT_LIBDIR = `pkg-config --variable=libdir libvirt`;
my $GCC_CFLAGS = "";
if ($ENV{TEST_MAINTAINER}) {
@@ -76,7 +77,7 @@ my $b = Module::Build->new(
'perl' => '5.8.0',
},
extra_compiler_flags => $GCC_CFLAGS . $LIBVIRT_CFLAGS,
- extra_linker_flags => $LIBVIRT_LIBS,
+ extra_linker_flags => "-L" . $LIBVIRT_LIBDIR . $LIBVIRT_LIBS ,
build_requires => {
'ExtUtils::CBuilder' => 0,
'Sys::Hostname' => 0,