[libvirt] libvirt on mingw: undefined reference to htonl/ntohl

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

 



Hi,
Some time passed by and I thought I'd have another go at compiling libvirt for win32 using MinGW/MSYS again. I tried to compile libvirt-0.4.3 and I got around most obstacles. Now it just seems I am stuck when it is trying to link.
My search on google showed me that I am not the first one to see this issue.
Usually i means -lws2_32 is in the wrong place. However I tried moving it around without luck. Also it doesn't make sense to me that only htonl and ntohl are missing. It appears anything else used from the winsock library is found during linking. I feel we're very close to getting libvirt compiled on win32. Or do you know if anyone already succeeded?
Regards
   Brecht Sanders

gcc -shared .libs/libvirt_la-libvirt.o .libs/libvirt_la-memory.o .libs/libvirt_la-hash.o .libs/libvirt_la-test.o .libs/libvirt_la-buf.o .libs/libvirt_la-qparams.o .libs/libvirt_la-capabilities.o .libs/libvirt_la-xml.o .libs/libvirt_la-event.o .libs/libvirt_la-xen_unified.o .libs/libvirt_la-xen_internal.o .libs/libvirt_la-xs_internal.o .libs/libvirt_la-xend_internal.o .libs/libvirt_la-stats_linux.o .libs/libvirt_la-sexpr.o .libs/libvirt_la-virterror.o .libs/libvirt_la-proxy_internal.o .libs/libvirt_la-conf.o .libs/libvirt_la-xm_internal.o .libs/libvirt_la-remote_internal.o .libs/libvirt_la-bridge.o .libs/libvirt_la-iptables.o .libs/libvirt_la-uuid.o .libs/libvirt_la-qemu_driver.o .libs/libvirt_la-qemu_conf.o .libs/libvirt_la-openvz_conf.o .libs/libvirt_la-openvz_driver.o .libs/libvirt_la-lxc_driver.o .libs/libvirt_la-lxc_conf.o .libs/libvirt_la-lxc_container.o .libs/libvirt_la-nodeinfo.o .libs/libvirt_la-util.o .libs/libvirt_la-remote_protocol.o -Wl,--whole-archive ../gnulib/lib/.libs/libgnu.a -Wl,--no-whole-archive -L/mingw/lib /mingw/lib/libxml2.dll.a /mingw/lib/libgnutls.dll.a -L/home/bsanders/inst_libgcrypt-1.4.1/lib -lintl -lpthread /mingw/lib/libportablexdr.dll.a -lws2_32 -Wl,--version-script=./libvirt_sym.version -o .libs/libvirt-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libvirt.dll.a
Creating library file: .libs/libvirt.dll.a
.libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa46): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa5f): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa78): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa91): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xaaa): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xac3): more undefined references to `htonl' follow .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc5d): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc74): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc8b): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xca2): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xcb9): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xccc): more undefined references to `ntohl' follow
collect2: ld returned 1 exit status
make[2]: *** [libvirt.la] Error 1
make[2]: Leaving directory `/home/bsanders/libvirt-0.4.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bsanders/libvirt-0.4.3'
make: *** [all] Error 2

--
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]