qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] configure: Change capstone's default state to d


From: Programmingkid
Subject: Re: [Qemu-devel] [PATCH] configure: Change capstone's default state to disabled
Date: Sat, 11 May 2019 13:21:25 -0400

> On Apr 20, 2019, at 6:40 AM, Thomas Huth <address@hidden> wrote:
> 
> On 19/04/2019 15.44, G 3 wrote:
>> 
>> On Apr 19, 2019, at 3:10 AM, Thomas Huth wrote:
>> 
>>> On 19/04/2019 00.47, John Arbuckle wrote:
>>>> Capstone is not necessary in order to use QEMU. Disable it by default.
>>>> This will save the user the pain of having to figure why QEMU isn't
>>>> building when this library is missing.
>>>> 
>>>> Signed-off-by: John Arbuckle <address@hidden>
>>>> ---
>>>>  configure | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/configure b/configure
>>>> index 1c563a7027..77d7967f92 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -433,7 +433,7 @@ opengl_dmabuf="no"
>>>>  cpuid_h="no"
>>>>  avx2_opt=""
>>>>  zlib="yes"
>>>> -capstone=""
>>>> +capstone="no"
>>>>  lzo=""
>>>>  snappy=""
>>>>  bzip2=""
>>> 
>>> AFAIK we ship capstone as a submodule, so how can this be missing? Also,
>>> our philosophy is to keep everything enabled by default if possible, so
>>> that the code paths don't bitrot. Thus I don't think that disabling this
>>> by default is a good idea. ... so if you've got a problem here, there
>>> must be another solution (e.g. is the system capstone detection not
>>> working right on your system?).
>>> 
>>>  Thomas
>> 
>> Thank you for replying. Capstone comes with QEMU? Every time I try to
>> compile QEMU I see an error relating to Capstone not being on my system.
>> Why do you feel that disabling Capstone by default is not a good idea?
>> 
>> Here is the error message I see when compiling QEMU:
>> 
>> CHK version_gen.h
>> make[1]: *** No rule to make target
>> `/Users/John/qemu-git/capstone/libcapstone.a'.  Stop.
>> make: *** [subdir-capstone] Error 2
> 
> I assume you're using a git checkout here, right? For git checkouts, the
> Makefile should take care of calling the scripts/git-submodule.sh script
> which should initialize the submodule in the capstone directory.
> 
> What's the content of your .git-submodule-status file? What does
> "configure" say about capstone support on your system?
> 
> Thomas

Yes I use a git checkout.

This is the contents of my .git-submodule-status file:
#!/bin/sh
#
# This code is licensed under the GPL version 2 or later.  See
# the COPYING file in the top-level directory.

substat=".git-submodule-status"

command=$1
shift
maybe_modules="$@"

test -z "$GIT" && GIT=git

error() {
    echo "$0: $*"
    echo
    echo "Unable to automatically checkout GIT submodules '$modules'."
    echo "If you require use of an alternative GIT binary (for example to"
    echo "enable use of a transparent proxy), then please specify it by"
    echo "running configure by with the '--with-git' argument. e.g."
    echo
    echo " $ ./configure --with-git='tsocks git'"
    echo
    echo "Alternatively you may disable automatic GIT submodule checkout"
    echo "with:"
    echo
    echo " $ ./configure --disable-git-update"
    echo
    echo "and then manually update submodules prior to running make, with:"
    echo
    echo " $ scripts/git-submodule.sh update $modules"
    echo
    exit 1
}

modules=""
for m in $maybe_modules
do
    $GIT submodule status $m 1> /dev/null 2>&1
    if test $? = 0
    then
        modules="$modules $m"
    else
        echo "warn: ignoring non-existent submodule $m"
    fi
done

if test -n "$maybe_modules" && ! test -e ".git"
then
    echo "$0: unexpectedly called with submodules but no git checkout exists"
    exit 1
fi

case "$command" in
status)
    if test -z "$maybe_modules"
    then
         test -s ${substat} && exit 1 || exit 0
    fi

    test -f "$substat" || exit 1
    CURSTATUS=$($GIT submodule status $modules)
    OLDSTATUS=$(cat $substat)
    test "$CURSTATUS" = "$OLDSTATUS"
    exit $?
    ;;
update)
    if test -z "$maybe_modules"
    then
        test -e $substat || touch $substat
        exit 0
    fi

    $GIT submodule update --init $modules 1>/dev/null
    test $? -ne 0 && error "failed to update modules"

    $GIT submodule status $modules > "${substat}"
    test $? -ne 0 && error "failed to save git submodule status" >&2
    ;;
esac

exit 0



The Configure command says:
capstone          git

I did a 'make clean' followed by a 'make distclean'. Then tried building again 
using this command line:

./configure --target-list=ppc-softmmu,i386-softmmu,x86_64-softmmu
make -j 4

Here is the error message I see:

make[1]: *** No rule to make target 
`/Users/John/Documents/Development/Projects/Qemu/qemu-git/capstone/libcapstone.a'.
  Stop.
make: *** [subdir-capstone] Error 2

I took a look at the capstone folder. There is no 'make' file in this folder. 
Should there be one?

Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]