Laurent Léonard wrote:
Le lundi 19 octobre 2009 à 15:21, Cole Robinson a écrit :
> On 10/19/2009 08:54 AM, Laurent Léonard wrote:
>
>> Hi,
>>
>> I'm trying to package libvirt 0.7.2 for Debian and get some linker issues
>> :
>>
>> make[3]: Entering directory
>> `/home/user/debian/libvirt/libvirt-0.7.2/tools' CC virsh-console.o
>> CC virsh-virsh.o
>> CCLD virsh
>> ../src/.libs/libvirt.so: undefined reference to `security_getenforce'
>> ../src/.libs/libvirt.so: undefined reference to `freecon'
>> ../src/.libs/libvirt.so: undefined reference to `setexeccon'
>> ../src/.libs/libvirt.so: undefined reference to
>> `selinux_virtual_domain_context_path'
>> ../src/.libs/libvirt.so: undefined reference to `context_str'
>> ../src/.libs/libvirt.so: undefined reference to `context_range_set'
>> ../src/.libs/libvirt.so: undefined reference to `is_selinux_enabled'
>> ../src/.libs/libvirt.so: undefined reference to `setfilecon'
>> ../src/.libs/libvirt.so: undefined reference to `context_new'
>> ../src/.libs/libvirt.so: undefined reference to `getfilecon'
>> ../src/.libs/libvirt.so: undefined reference to `getpidcon'
>> ../src/.libs/libvirt.so: undefined reference to `context_free'
>> ../src/.libs/libvirt.so: undefined reference to `context_range_get'
>> ../src/.libs/libvirt.so: undefined reference to `matchpathcon'
>> ../src/.libs/libvirt.so: undefined reference to
>> `selinux_virtual_image_context_path'
>> ../src/.libs/libvirt.so: undefined reference to `security_check_context'
>> collect2: ld returned 1 exit status
>> make[3]: *** [virsh] Error 1
>> make[3]: Leaving directory
>> `/home/user/debian/libvirt/libvirt-0.7.2/tools' make[2]: *** [all] Error
>> 2
>> make[2]: Leaving directory
>> `/home/user/debian/libvirt/libvirt-0.7.2/tools' make[1]: ***
>> [all-recursive] Error 1
>> make[1]: Leaving directory `/home/user/debian/libvirt/libvirt-0.7.2'
>> make: *** [all] Error 2
>>
>> Any idea what's wrong ?
>>
>> Thank you,
>>
> Libvirt questions should go to libvirt-list(a)redhat.com (cc'd now).
>
Oops, sorry for that.
> You should pass --with-selinux=no to configure, since those are all
> libselinux functions. Do you have libselinux installed? If not, there's
> probably an error in configure.in selinux autodetection.
>
libselinux (headers and binaries) are correctly installed and I have no
problem to build libvirt 0.7.1. Something wrong with the following refactoring
(2009-09-20) ?
* src/Makefile.am: Add -Isrc/conf to the individual build targets
which need to use XML config APIs. Remove LIBXML_CFLAGS, LIBSSH2_CFLAGS
and SELINUX_CFLAGS from global INCLUDES and only have them in build
targets which actually need them. Create a libvirt_conf.la
convenience library for all config parsers
I'm seeing the same issue. Attached patch fixes it for me.
Regards,
Jim