Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-24 Thread Chad Versace
On Thu 16 Jun 2016, Emil Velikov wrote:
> On 16 June 2016 at 21:14, Haixia Shi  wrote:
> > Emil
> >
> > I looked at commit 3689ef32 which started the problem, and it seems that
> > patch removed the line "touch git_sha1.h.tmp". Previously my workflow was
> > "working" because the touch command ensures there's always going to be an
> > empty header file.
> >
> > Was this intentional? For the new git_sha1.h rules, I wonder if it is ok to
> > add a step for git_sha1.h.tmp that does a "touch git_sha1.h" to ensure the
> > file exists?
> >
> As said earlier - if the proposed workflow solutions don't work,
> please check the earlier suggestions/email [1]. Also [2] might be
> mildly related (joking of course)
> 
> Thanks
> Emil
> 
> [1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/120709.html
> [2] https://xkcd.com/1172/

Haixi,

Here is the command to workaround your problems with a git link. After
you copy the source tree MESA_TOP (the original checkout) to TMP_DIR, do
this:

  echo "gitdir: $MESA_TOP/.git" > $TMP_DIR/.git

Then git will treat $TMP_DIR as a fully working git checkout.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Emil Velikov
On 16 June 2016 at 21:14, Haixia Shi  wrote:
> Emil
>
> I looked at commit 3689ef32 which started the problem, and it seems that
> patch removed the line "touch git_sha1.h.tmp". Previously my workflow was
> "working" because the touch command ensures there's always going to be an
> empty header file.
>
> Was this intentional? For the new git_sha1.h rules, I wonder if it is ok to
> add a step for git_sha1.h.tmp that does a "touch git_sha1.h" to ensure the
> file exists?
>
As said earlier - if the proposed workflow solutions don't work,
please check the earlier suggestions/email [1]. Also [2] might be
mildly related (joking of course)

Thanks
Emil

[1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/120709.html
[2] https://xkcd.com/1172/
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Haixia Shi
Emil

I looked at commit 3689ef32 which started the problem, and it seems that
patch removed the line "touch git_sha1.h.tmp". Previously my workflow was
"working" because the touch command ensures there's always going to be an
empty header file.

Was this intentional? For the new git_sha1.h rules, I wonder if it is ok to
add a step for git_sha1.h.tmp that does a "touch git_sha1.h" to ensure the
file exists?

On Thu, Jun 16, 2016 at 12:48 PM, Emil Velikov 
wrote:

> On 16 June 2016 at 20:47, Emil Velikov  wrote:
> > On 16 June 2016 at 20:42, Haixia Shi  wrote:
> >> Bisect shows the problem started at commit
> >> 3689ef32afdafbb030069e560aac0e563fc29048
> >> Author: Emil Velikov 
> >> Date:   Mon May 30 12:32:05 2016 +0100
> >>
> >> automake: rework the git_sha1.h rule, include in tarball
> >>
> >> As we'll need the file in the release tarball, rework the rule so
> that
> >> the file is regenerated _only_ if we're in a git repository.
> >>
> >> With this in place we can build vulkan (anv) from a release tarball.
> >>
> >> Cc: Jason Ekstrand 
> >> Cc: Kristian Høgsberg Kristensen 
> >> Signed-off-by: Emil Velikov 
> >>
> >> I'm not building from a release tarball, but the workflow first copies
> the
> >> source tree to a tmp directory (without the .git directory), so there's
> no
> >> git_sha1.h file, and the file is not generated either.
> >>
> > Hmmm... I wouldn't have imagine this particular workflow. Have you
> > considered gitlink and/or git worktree ?
> >
> > If neither of these are an option for you see my earlier email.
> >
> The former seems to be missing a manpage so here's a PDF
> https://media.readthedocs.org/pdf/git-link/latest/git-link.pdf
>
> -Emil
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Emil Velikov
On 16 June 2016 at 20:47, Emil Velikov  wrote:
> On 16 June 2016 at 20:42, Haixia Shi  wrote:
>> Bisect shows the problem started at commit
>> 3689ef32afdafbb030069e560aac0e563fc29048
>> Author: Emil Velikov 
>> Date:   Mon May 30 12:32:05 2016 +0100
>>
>> automake: rework the git_sha1.h rule, include in tarball
>>
>> As we'll need the file in the release tarball, rework the rule so that
>> the file is regenerated _only_ if we're in a git repository.
>>
>> With this in place we can build vulkan (anv) from a release tarball.
>>
>> Cc: Jason Ekstrand 
>> Cc: Kristian Høgsberg Kristensen 
>> Signed-off-by: Emil Velikov 
>>
>> I'm not building from a release tarball, but the workflow first copies the
>> source tree to a tmp directory (without the .git directory), so there's no
>> git_sha1.h file, and the file is not generated either.
>>
> Hmmm... I wouldn't have imagine this particular workflow. Have you
> considered gitlink and/or git worktree ?
>
> If neither of these are an option for you see my earlier email.
>
The former seems to be missing a manpage so here's a PDF
https://media.readthedocs.org/pdf/git-link/latest/git-link.pdf

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Emil Velikov
On 16 June 2016 at 20:42, Haixia Shi  wrote:
> Bisect shows the problem started at commit
> 3689ef32afdafbb030069e560aac0e563fc29048
> Author: Emil Velikov 
> Date:   Mon May 30 12:32:05 2016 +0100
>
> automake: rework the git_sha1.h rule, include in tarball
>
> As we'll need the file in the release tarball, rework the rule so that
> the file is regenerated _only_ if we're in a git repository.
>
> With this in place we can build vulkan (anv) from a release tarball.
>
> Cc: Jason Ekstrand 
> Cc: Kristian Høgsberg Kristensen 
> Signed-off-by: Emil Velikov 
>
> I'm not building from a release tarball, but the workflow first copies the
> source tree to a tmp directory (without the .git directory), so there's no
> git_sha1.h file, and the file is not generated either.
>
Hmmm... I wouldn't have imagine this particular workflow. Have you
considered gitlink and/or git worktree ?

If neither of these are an option for you see my earlier email.

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Emil Velikov
Hi Haixia Shi,

On 16 June 2016 at 19:46, Haixia Shi  wrote:
> Posting a question in case someone already know the issue.
>
> I'm observing "missing git_sha1.h" errors sometime after Emil's git_sha1.h
> patches by May 31st. This is not fixed at TOT with the latest patches on
> Makefile.am.
>
> The problem only happens if src/git_sha1.h doesn't exist already. I just
> need to put a dummy git_sha1.h file there to work around the error.
>
> There's a similar bug filed
> (https://bugs.freedesktop.org/show_bug.cgi?id=50976) but the fix for that
> one patches src/Makefile directly, whereas my build flow only requires
> Makefile.am.
>
The bug report in question is ancient and doesn't reflect what we have atm.

I'd imagine that you're using one of the following two:
 - git archive tarballs, or
 - you don't have access to the 'git' executable after the checkout
(using chroot and//or other).

In case of the latter I have a patch that I'm testing atm. Sadly it
won't 'fix' the issue, as that is a deliberate change.

Namely: one should _really_ be using either a proper git checkout
(with the .git folder) or a tarball produced by `make dist' (like the
release ones).

In the case that you use one of the top two, I'd suggest adding the
following or one that produces similar result.

echo '#define MESA_GIT_SHA1 "git-$mesa-checkout-sha1"' > mesa/src/git_sha1.h

Obviously you should already know the actual sha (mesa-checkout-sha1).

Regards,
Emil

P.S. What exactly does TOT mean ?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Haixia Shi
Bisect shows the problem started at commit
3689ef32afdafbb030069e560aac0e563fc29048
Author: Emil Velikov 
Date:   Mon May 30 12:32:05 2016 +0100

automake: rework the git_sha1.h rule, include in tarball

As we'll need the file in the release tarball, rework the rule so that
the file is regenerated _only_ if we're in a git repository.

With this in place we can build vulkan (anv) from a release tarball.

Cc: Jason Ekstrand 
Cc: Kristian Høgsberg Kristensen 
Signed-off-by: Emil Velikov 

I'm not building from a release tarball, but the workflow first copies the
source tree to a tmp directory (without the .git directory), so there's no
git_sha1.h file, and the file is not generated either.

On Thu, Jun 16, 2016 at 11:46 AM, Haixia Shi  wrote:

> Posting a question in case someone already know the issue.
>
> I'm observing "missing git_sha1.h" errors sometime after Emil's git_sha1.h
> patches by May 31st. This is not fixed at TOT with the latest patches on
> Makefile.am.
>
> The problem only happens if src/git_sha1.h doesn't exist already. I just
> need to put a dummy git_sha1.h file there to work around the error.
>
> There's a similar bug filed (
> https://bugs.freedesktop.org/show_bug.cgi?id=50976) but the fix for that
> one patches src/Makefile directly, whereas my build flow only requires
> Makefile.am.
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] Trouble with missing git_sha1.h when building from a fresh tree

2016-06-16 Thread Haixia Shi
Posting a question in case someone already know the issue.

I'm observing "missing git_sha1.h" errors sometime after Emil's git_sha1.h
patches by May 31st. This is not fixed at TOT with the latest patches on
Makefile.am.

The problem only happens if src/git_sha1.h doesn't exist already. I just
need to put a dummy git_sha1.h file there to work around the error.

There's a similar bug filed (
https://bugs.freedesktop.org/show_bug.cgi?id=50976) but the fix for that
one patches src/Makefile directly, whereas my build flow only requires
Makefile.am.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev