Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#3341 closed defect (fixed)

libvirt 0.9.11 does not build under LFS 7.1 64bit

Reported by: Wayne Blaszczyk Owned by: blfs-book@…
Priority: normal Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

First, there is a missing required dependency, libgcrypt, otherwise make will fail.

Secondly, The following error occurs during configure:
checking for xdrmem_create in -lportablexdr... no
checking for library containing xdrmem_create... no
configure: error: Cannot find a XDR library

If libtirpc is installed, then the above error goes away but the following error occurs during make:

./remote/remote_protocol.c: In function 'xdr_remote_vcpu_info':
./remote/remote_protocol.c:257:10: warning: implicit declaration of function 'xdr_u_int64_t' [-Wimplicit-function-declaration]
./remote/remote_protocol.c:257:10: warning: nested extern declaration of 'xdr_u_int64_t' [-Wnested-externs]
./remote/remote_protocol.c: In function 'xdr_remote_node_get_cells_free_memory_ret':
./remote/remote_protocol.c:623:48: error: 'xdr_u_int64_t' undeclared (first use in this function)
./remote/remote_protocol.c:623:48: note: each undeclared identifier is reported only once for each function it appears in
make[3]: * [libvirt_driver_remote_la-remote_protocol.lo] Error 1
make[3]: Leaving directory `/sources/libvirt-0.9.11/src'
make[2]:
* [all] Error 2
make[2]: Leaving directory `/sources/libvirt-0.9.11/src'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/sources/libvirt-0.9.11'
make:
* [all] Error 2

Change History (9)

comment:1 by Armin K, 12 years ago

Hello and thanks for the report. I still use glibc 2.13 so I don't face any of the RPC issues. But I've seen somewhere that they were using

XDRCFLAGS="-I/usr/include/tirpc" ./configure ...

Would you mind trying that one? Also, I've put libgcrypt as required dependency, must have missed that one.

comment:2 by Armin K, 12 years ago

Sorry, that was from some distro's build script. Use CPPFLAGS instead of XDRCFLAGS ...

comment:3 by Wayne Blaszczyk, 12 years ago

I've tried CPPFLAGS="-I/usr/include/tirpc" ./configure... and that has fixed the make error, but now, during make install, the following error occurs:

/usr/bin/ld: /usr/lib/libtirpc.a(libtirpc_la-xdr.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

/usr/lib/libtirpc.a: could not read symbols: Bad value collect2: ld returned 1 exit status

libtool: install: error: relink `libvirt-qemu.la' with the above command before installing it

make[3]: * [install-libLTLIBRARIES] Error 1

make[3]: Leaving directory `/sources/libvirt-0.9.11/src'

make[2]: * [install-am] Error 2

make[2]: Leaving directory `/sources/libvirt-0.9.11/src'

make[1]: * [install] Error 2

make[1]: Leaving directory `/sources/libvirt-0.9.11/src'

make: * [install-recursive] Error 1

comment:4 by andy@…, 12 years ago

Have you tried CPPFLAGS="-I/usr/include/tirpc -fPIC" or CPPFLAGS="-I/usr/include/tirpc" CFLAGS="-fPIC -O2 -g" (I'm just guessing about the -O2 -g, use whatever are the default CFLAGS)

comment:5 by Wayne Blaszczyk, 12 years ago

Tried both. Neither worked.

comment:6 by DJ Lucas, 12 years ago

Rebuild tirpc with -fPIC?

comment:7 by Wayne Blaszczyk, 12 years ago

That worked!

libvirt built with CPPFLAGS="-I/usr/include/tirpc"

libtirpc buit with CFLAGS="-fPIC"

Thanks to all.

One more thing, curl is not a required dependency, libvirt builds fine without it.

comment:8 by Armin K, 12 years ago

Resolution: fixed
Status: newclosed

I have modified libvirt and libtirpc and added necesary CFLAGS and CPPFLAGS. Thank you for reporting the issue. Fixed in r10007

comment:9 by bdubbs@…, 10 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.