On 04/29/2016 12:29 PM, Eduardo Lima (Etrunko) wrote: > On 04/28/2016 08:45 AM, Pavel Grunt wrote: >> Hi, >> >> On Thu, 2016-04-28 at 14:09 +0800, Chen yu wrote: >>> Thank you for taking time out of your busy schedule to see this letter. >>> I am trying to compile spice downloaded from github, but the versions of these >>> are 'UNKNOWN'. when I compiled QEMU with these spice, there have some errors >>> in the process of 'make'. >>> Could I modify the version of spice (spice-server and spice-gtk) temporarily >>> for testing and how should I do? >> >> >> Please, use repos from freedesktop https://cgit.freedesktop.org/spice/ >> The github repos are mirrored, but they don't have tags, so they cannot generate >> version. >> > > Hmm, this should be fixed anyway, by pushing the tags to the github > repositories and also implement some fallback method in git-version-gen. > > So, as far as I understand, there are two issues. 1) We should have specified --fallback in AC_INIT line 2) git-version-gen has a bug, or actually is meant to be used only in with the git source code repository itself, because it will still output 'UNKNOWN' even with --fallback. This happens because of this block on the script: ... elif test "x$fallback" = x || git --version >/dev/null 2>&1; then v=UNKNOWN else v=$fallback fi ... Which means that v will use the fallback only if $fallback is not empty *or* the result of 'git --version' command is not 0. This is why I think this script is actually meant to be used with git source code repository. The only reason I can think of git --version failing is when you don't have git installed. By removing the conditional it works every time. With or without git installed. @@ -187,7 +188,7 @@ then # Remove the "g" in git describe's output string, to save a byte. v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v_from_git=1 -elif test "x$fallback" = x || git --version >/dev/null 2>&1; then +elif test "x$fallback" = x; then v=UNKNOWN else v=$fallback -- Eduardo de Barros Lima (Etrunko) Software Engineer - RedHat etrunko@xxxxxxxxxx _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel