[libvirt] Compile libvirt V1.0.1 error

Hi all, When i compiled libvirt like following 1. git clone git://libvirt.org/libvirt.git;cd libvirt 2. git reset --hard v1.0.1 3. wget http://cloudxy.googlecode.com/svn/branches/hlfs/person/harry/hlfs/patches/hl... 4. wget http://cloudxy.googlecode.com/svn/branches/hlfs/person/harry/hlfs/patches/hl... 5. git apply hlfs_driver_for_libvirt_network_disk.patch 6. git apply hlfs_driver_for_libvirt_add_classpath.patch 7. ./autogen.sh 8. ./configure 9. make i got following errors. [...] cc1: error: AVA_HOME/include: No such file or directory [-Werror] cc1: error: AVA_HOME/include/linux: No such file or directory [-Werror] cc1: all warnings being treated as errors make[3]: *** [libvirt_driver_storage_impl_la-storage_driver.lo] Error 1 make[3]: Leaving directory `/home/jiawei/workshop1/libvirt/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/jiawei/workshop1/libvirt/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/jiawei/workshop1/libvirt' make: *** [all] Error 2 It seems that the errors have no relationship with HLFS(the patches i patched) but AVA_HOME. Could anyone give me some suggestions? Thanks in advance ;-) -- Thanks Harry Wei

On 02/26/2013 06:32 PM, harryxiyou wrote:
Hi all,
i got following errors.
[...] cc1: error: AVA_HOME/include: No such file or directory [-Werror] cc1: error: AVA_HOME/include/linux: No such file or directory [-Werror] cc1: all warnings being treated as errors make[3]: *** [libvirt_driver_storage_impl_la-storage_driver.lo] Error 1
You trimmed too much of your make line to tell us what was happening. It might also help to run 'make V=1' to get the full command line being attempted. I have to wonder if you have an unexpanded '$JAVA_HOME' injected somewhere into your configure output, where make is trying to compute $J (empty) followed by literal 'AVA_HOME'; maybe you should figure out what in your build setup is providing that bad variable value (correct would likely be '${JAVA_HOME}'). But I cannot reproduce your build failure, so it is something in your environment and not in libvirt itself that is causing you grief. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Wed, Feb 27, 2013 at 11:04 AM, Eric Blake <eblake@redhat.com> wrote: [...]
You trimmed too much of your make line to tell us what was happening. It might also help to run 'make V=1' to get the full command line being attempted. I have to wonder if you have an unexpanded '$JAVA_HOME' injected somewhere into your configure output, where make is trying to compute $J (empty) followed by literal 'AVA_HOME'; maybe you should figure out what in your build setup is providing that bad variable value (correct would likely be '${JAVA_HOME}'). But I cannot reproduce your build failure, so it is something in your environment and not in libvirt itself that is causing you grief.
Eric, i was dizzy. Actually, i don't know why automake recognized $JAVA_HOME as $AVA_HOME. However, i solved the problem like following. JVM_DIR=${shell echo ${JAVA_HOME}} It works well for me. Thanks for your help ;-) -- Thanks Harry Wei

On 02/26/2013 11:36 PM, harryxiyou wrote:
On Wed, Feb 27, 2013 at 11:04 AM, Eric Blake <eblake@redhat.com> wrote: [...]
You trimmed too much of your make line to tell us what was happening. It might also help to run 'make V=1' to get the full command line being attempted. I have to wonder if you have an unexpanded '$JAVA_HOME' injected somewhere into your configure output, where make is trying to compute $J (empty) followed by literal 'AVA_HOME'; maybe you should figure out what in your build setup is providing that bad variable value (correct would likely be '${JAVA_HOME}'). But I cannot reproduce your build failure, so it is something in your environment and not in libvirt itself that is causing you grief.
Eric, i was dizzy. Actually, i don't know why automake recognized $JAVA_HOME as $AVA_HOME.
Make is not like shell. In shell, {} is optional, required only if characters after the variable name being expanded could be part of a variable name. In make, {} (or ()) is mandatory for any variable whose name is longer than one byte. Thus, in make, $JAVA_HOME is the same as ${J}AVA_HOME; while in shell, it is the same as ${JAVA_HOME} - quite different. At any rate, since you didn't define $J in your makefile, make was expanding ${J} to the empty string, which explains why your error message then mentions AVA_HOME.
However, i solved the problem like following.
JVM_DIR=${shell echo ${JAVA_HOME}}
What a waste of resources - that forks a shell to do an echo every time that you use ${JVM_DIR}. Much simpler to write as: JVM_DIR=${JAVA_HOME} I'm still not even sure why you need ${JVM_DIR}, and can't just use ${JAVA_HOME} directly, nor why you are trying to add pieces of Java into libvirt (libvirt itself is written in C, not Java, for a reason). I guess I'll just have to wait until I see a patch to understand what this is all about. Good luck. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Thu, Feb 28, 2013 at 12:47 AM, Eric Blake <eblake@redhat.com> wrote: [...]
What a waste of resources - that forks a shell to do an echo every time that you use ${JVM_DIR}. Much simpler to write as:
JVM_DIR=${JAVA_HOME}
I am not familiar with automake so i just use shell to finish this job. I will test the way, 'JVM_DIR=${JAVA_HOME}', you said above.
I'm still not even sure why you need ${JVM_DIR}, and can't just use ${JAVA_HOME} directly, nor why you are trying to add pieces of Java into libvirt (libvirt itself is written in C, not Java, for a reason).
HLFS is HDFS-based Log-Structured File System in user space. We call some interfaces from HDFS(libhdfs.so) which is written by JAVA. See http://code.google.com/p/cloudxy/wiki/WHAT_IS_CLOUDXY for details ;-)
I guess I'll just have to wait until I see a patch to understand what this is all about. Good luck.
We will submit HLFS driver patches to Libvirt community. Actually, before submitting HLFS driver patches to Libvirt community, we have to sumbit HLFS driver patches to QEMU community. I split our HLFS driver patches into two pieces which one is for Online storage stuffs and the other one is for Offline storage stuffs. Online patches: http://cloudxy.googlecode.com/svn/branches/hlfs/person/harry/hlfs/patches/hl... Offline patches: http://cloudxy.googlecode.com/svn/branches/hlfs/person/harry/hlfs/patches/hl... Eric, could you please give me some suggestions about merging our HLFS patches into Libvirt community. Thanks in advance ;-) -- Thanks Harry Wei
participants (2)
-
Eric Blake
-
harryxiyou