Re: [libvirt] Re: [virt-tools-list] libvirt 0.7.2 linker issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx (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

commit 1e0ec790a0f1f8b8d54c862db42050a51f62ba61
Author: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date:   Mon Oct 19 11:45:19 2009 -0600

    Add selinux CFLAGS and linker flags to security driver

diff --git a/src/Makefile.am b/src/Makefile.am
index d0ef7d1..8e27ea7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \
 libvirt_driver_security_la_LDFLAGS =
 if WITH_SECDRIVER_SELINUX
 libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES)
+libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS)
+libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS)
 endif
 if WITH_SECDRIVER_APPARMOR
 libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]