[libvirt] building libvirt 1.0.2 without quite a few features - undefined reference to `curl_global_init'

Daniel P. Berrange berrange at redhat.com
Tue Feb 19 15:55:25 UTC 2013


On Tue, Feb 19, 2013 at 04:28:48PM +0100, Thierry Parmentelat wrote:
> Hi there
> 
> I'm trying to rebuild libvirt 1.0.2 on various targets - mostyl f16 and f18 for now
> 
> I've started from the specfile that I found in this source rpm here
> http://libvirt.org/sources/libvirt-1.0.2-1.fc17.src.rpm
> 
> in which I've mostly added without clauses :
> 
> %define _without_storage_disk	true
> %define _without_storage_iscsi	true
> %define _without_storage_fs	true
> %define _without_storage_lvm	true
> %define _without_polkit		true
> %define _without_sasl		true
> %define _without_audit		true
> %define _without_netcf		true
> %define _without_avahi		true
> %define _without_sanlock	true
> %define _without_xen		true
> %define _without_qemu		true
> %define _without_hyperv		true
> %define _without_phyp		true
> %define _without_esx		true
> %define _without_libxl		true
> 
> 
> when building with these settings though, I'm facing this undefined error below; this happened on both f16 and f18
> I take it there must be something slightly broken in the specfile logic, if anybody had a hint on how to address this is would be much appreciated
> For one thing I don't know how to get the real sentence behind this 'CCLD' thing, so I could check if libcurl (which I believe should provide that symbol) is mentioned or not..
> 
>  CCLD   libvirtd
> /longbuildroot/BUILD/libvirt-1.0.2/src/.libs/libvirt.so: undefined reference to `curl_global_init'

You need this fix

commit 514b93061c11a4a61454458bcb2980a482185959
Author: Jiri Denemark <jdenemar at redhat.com>
Date:   Fri Feb 1 13:36:06 2013 +0100

    build: Add libcurl dependency to libvirt_driver.la
    
    libvirt.c calls curl_global_init() if WITH_CURL is defined and thus it
    should be linked with libcurl. This fixes link failure in case neither
    xenapi nor esx driver is enabled (they are the only users of libcurl).


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list