Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-25 Thread Dylan Baker
Quoting Emil Velikov (2018-07-24 08:56:55)
> On 24 July 2018 at 11:29, Eric Engestrom  wrote:
> > On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
> >> Until now, the needed bits were wrongly included in linux/memfd.h
> >>
> >> Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
> The definition has moved across libc versions. Initially it was in
> memfd.h these days it's in bits/syscall.h
> 
> > Isn't this a matter of libc version? Isn't the right fix to upgrade the
> > libc in the container instead of faking its files?
> >
> Last time I've looked either a) updated package wasn't available or b)
> it required sudo true (no more container, bring the VM)
> 
> > And if the libc required is quite recent, what we need is a fallback in
> > the code to support older libc (possibly with some features missing),
> > which this build failure rightly reports.
> >
> Keep in mind that Travis uses Ubuntu Trusty, which isn't really a user
> of mesa-git and nearly EOL.
> Since this is a build testing only, I would stick with the "build
> everything" mindset and vote in favour of this workaround.
> 
> Please change the Fixes tag to 3228335b55c - the first user of
> syscall.h. With that
> Reviewed-by: Emil Velikov 
> 
> -Emil

I prefer this approach as well as a short term fix. Perhaps a better long term
solution would be to build our own docker image that contains a more realistic
set of minimum versions for building current mesa than a 4 year old LTS (we
could build off of 16.04 for example).

Dylan


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


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Eric Engestrom
On Tuesday, 2018-07-24 19:44:14 +0300, Andres Gomez wrote:
> On Tue, 2018-07-24 at 09:07 -0700, Dylan Baker wrote:
> > Quoting Emil Velikov (2018-07-24 08:56:55)
> > > On 24 July 2018 at 11:29, Eric Engestrom  wrote:
> > > > On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
> > > > > Until now, the needed bits were wrongly included in linux/memfd.h
> > > > > 
> > > > > Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
> > > 
> > > The definition has moved across libc versions. Initially it was in
> > > memfd.h these days it's in bits/syscall.h
> > > 
> > > > Isn't this a matter of libc version? Isn't the right fix to upgrade the
> > > > libc in the container instead of faking its files?
> > > > 
> > > 
> > > Last time I've looked either a) updated package wasn't available or b)
> > > it required sudo true (no more container, bring the VM)
> > > 
> > > > And if the libc required is quite recent, what we need is a fallback in
> > > > the code to support older libc (possibly with some features missing),
> > > > which this build failure rightly reports.
> > > > 
> > > 
> > > Keep in mind that Travis uses Ubuntu Trusty, which isn't really a user
> > > of mesa-git and nearly EOL.
> > > Since this is a build testing only, I would stick with the "build
> > > everything" mindset and vote in favour of this workaround.
> > > 
> > > Please change the Fixes tag to 3228335b55c - the first user of
> > > syscall.h. With that
> > > Reviewed-by: Emil Velikov 
> > > 
> > > -Emil
> > 
> > I prefer this approach as well as a short term fix. Perhaps a better long 
> > term
> > solution would be to build our own docker image that contains a more 
> > realistic
> > set of minimum versions for building current mesa than a 4 year old LTS (we
> > could build off of 16.04 for example).
> 
> I was going to answer in a similar fashion. Emil and Dylan have been
> faster than me. Thanks, guys ☺ !
> 
> Yes, Trusty is quite old and to "properly" fix this we would have to
> check that the macro exists (basically, check the kernel version
> against which glibc was compiled, ugh!).
> 
> What I could suggest is that, for the Intel driver, which is the
> consumer of memfd_create, they may want to check for the existence of
> the SYS_memfd_create in a way or another in configure.ac and meson ...
> or better, add those bits to this series and land it (CCing Greg V):
> https://patchwork.freedesktop.org/series/35931/
> 
> Specifically:
> https://patchwork.freedesktop.org/patch/200450/
> 
> Additionally, yeah, I think we may have to check whether we want to
> upgrade Travis CI to use Xenial instead of Trusty.
> 
> In any case, I'll go ahead and push this as is (with the comment from
> Emil). We can still revisit afterwards.

I'm convinced :)
Acked-by: Eric Engestrom 

> 
> -- 
> Br,
> 
> Andres
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Andres Gomez
On Tue, 2018-07-24 at 09:07 -0700, Dylan Baker wrote:
> Quoting Emil Velikov (2018-07-24 08:56:55)
> > On 24 July 2018 at 11:29, Eric Engestrom  wrote:
> > > On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
> > > > Until now, the needed bits were wrongly included in linux/memfd.h
> > > > 
> > > > Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
> > 
> > The definition has moved across libc versions. Initially it was in
> > memfd.h these days it's in bits/syscall.h
> > 
> > > Isn't this a matter of libc version? Isn't the right fix to upgrade the
> > > libc in the container instead of faking its files?
> > > 
> > 
> > Last time I've looked either a) updated package wasn't available or b)
> > it required sudo true (no more container, bring the VM)
> > 
> > > And if the libc required is quite recent, what we need is a fallback in
> > > the code to support older libc (possibly with some features missing),
> > > which this build failure rightly reports.
> > > 
> > 
> > Keep in mind that Travis uses Ubuntu Trusty, which isn't really a user
> > of mesa-git and nearly EOL.
> > Since this is a build testing only, I would stick with the "build
> > everything" mindset and vote in favour of this workaround.
> > 
> > Please change the Fixes tag to 3228335b55c - the first user of
> > syscall.h. With that
> > Reviewed-by: Emil Velikov 
> > 
> > -Emil
> 
> I prefer this approach as well as a short term fix. Perhaps a better long term
> solution would be to build our own docker image that contains a more realistic
> set of minimum versions for building current mesa than a 4 year old LTS (we
> could build off of 16.04 for example).

I was going to answer in a similar fashion. Emil and Dylan have been
faster than me. Thanks, guys ☺ !

Yes, Trusty is quite old and to "properly" fix this we would have to
check that the macro exists (basically, check the kernel version
against which glibc was compiled, ugh!).

What I could suggest is that, for the Intel driver, which is the
consumer of memfd_create, they may want to check for the existence of
the SYS_memfd_create in a way or another in configure.ac and meson ...
or better, add those bits to this series and land it (CCing Greg V):
https://patchwork.freedesktop.org/series/35931/

Specifically:
https://patchwork.freedesktop.org/patch/200450/

Additionally, yeah, I think we may have to check whether we want to
upgrade Travis CI to use Xenial instead of Trusty.

In any case, I'll go ahead and push this as is (with the comment from
Emil). We can still revisit afterwards.

-- 
Br,

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


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Emil Velikov
On 24 July 2018 at 17:07, Dylan Baker  wrote:
> Quoting Emil Velikov (2018-07-24 08:56:55)
>> On 24 July 2018 at 11:29, Eric Engestrom  wrote:
>> > On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
>> >> Until now, the needed bits were wrongly included in linux/memfd.h
>> >>
>> >> Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
>> The definition has moved across libc versions. Initially it was in
>> memfd.h these days it's in bits/syscall.h
>>
>> > Isn't this a matter of libc version? Isn't the right fix to upgrade the
>> > libc in the container instead of faking its files?
>> >
>> Last time I've looked either a) updated package wasn't available or b)
>> it required sudo true (no more container, bring the VM)
>>
>> > And if the libc required is quite recent, what we need is a fallback in
>> > the code to support older libc (possibly with some features missing),
>> > which this build failure rightly reports.
>> >
>> Keep in mind that Travis uses Ubuntu Trusty, which isn't really a user
>> of mesa-git and nearly EOL.
>> Since this is a build testing only, I would stick with the "build
>> everything" mindset and vote in favour of this workaround.
>>
>> Please change the Fixes tag to 3228335b55c - the first user of
>> syscall.h. With that
>> Reviewed-by: Emil Velikov 
>>
>> -Emil
>
> I prefer this approach as well as a short term fix. Perhaps a better long term
> solution would be to build our own docker image that contains a more realistic
> set of minimum versions for building current mesa than a 4 year old LTS (we
> could build off of 16.04 for example).
>
Maintaining a docker image requires a bit more time, so I'd suggest
stick with this for now.

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


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Emil Velikov
On 24 July 2018 at 11:29, Eric Engestrom  wrote:
> On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
>> Until now, the needed bits were wrongly included in linux/memfd.h
>>
>> Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
The definition has moved across libc versions. Initially it was in
memfd.h these days it's in bits/syscall.h

> Isn't this a matter of libc version? Isn't the right fix to upgrade the
> libc in the container instead of faking its files?
>
Last time I've looked either a) updated package wasn't available or b)
it required sudo true (no more container, bring the VM)

> And if the libc required is quite recent, what we need is a fallback in
> the code to support older libc (possibly with some features missing),
> which this build failure rightly reports.
>
Keep in mind that Travis uses Ubuntu Trusty, which isn't really a user
of mesa-git and nearly EOL.
Since this is a build testing only, I would stick with the "build
everything" mindset and vote in favour of this workaround.

Please change the Fixes tag to 3228335b55c - the first user of
syscall.h. With that
Reviewed-by: Emil Velikov 

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


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Eric Engestrom
On Thursday, 2018-07-19 15:33:33 +0300, Andres Gomez wrote:
> Until now, the needed bits were wrongly included in linux/memfd.h
> 
> Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we

Isn't this a matter of libc version? Isn't the right fix to upgrade the
libc in the container instead of faking its files?

And if the libc required is quite recent, what we need is a fallback in
the code to support older libc (possibly with some features missing),
which this build failure rightly reports.

> generate that header manually, including the needed bits to avoid
> compilation problems, as the ones observed after:
> 3228335b55c ("intel: aubinator: handle GGTT mappings")
> 
> Fixes: 7e2af374742 ("travis: split the make target to three separate ones")
> 
> Cc: Emil Velikov 
> Cc: Juan A. Suarez Romero 
> Cc: Dylan Baker 
> Cc: Eric Engestrom 
> Signed-off-by: Andres Gomez 
> ---
>  .travis.yml | 27 ---
>  1 file changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 012cc9139e0..8b1730bec69 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -584,13 +584,34 @@ install:
> "#ifndef _LINUX_MEMFD_H" \
> "#define _LINUX_MEMFD_H" \
> "" \
> -   "#define __NR_memfd_create 319" \
> -   "#define SYS_memfd_create __NR_memfd_create" \
> -   "" \
> "#define MFD_CLOEXEC 0x0001U" \
> "#define MFD_ALLOW_SEALING   0x0002U" \
> "" \
> "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
> +
> +  # Generate this header, including the missing SYS_memfd_create
> +  # macro, which is not provided by the header in the Travis
> +  # instance
> +  mkdir -p sys
> +  printf "%s\n" \
> +   "#ifndef _SYSCALL_H" \
> +   "#define _SYSCALL_H  1" \
> +   "" \
> +   "#include " \
> +   "" \
> +   "#ifndef _LIBC" \
> +   "# include " \
> +   "#endif" \
> +   "" \
> +   "#ifndef __NR_memfd_create" \
> +   "# define __NR_memfd_create 319 /* Taken from  
> */" \
> +   "#endif" \
> +   "" \
> +   "#ifndef SYS_memfd_create" \
> +   "# define SYS_memfd_create __NR_memfd_create" \
> +   "#endif" \
> +   "" \
> +   "#endif" > sys/syscall.h
>  fi
>  
>  script:
> -- 
> 2.18.0
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] travis: manually generate sys/syscall.h

2018-07-24 Thread Juan A. Suarez Romero
Reviewed-by: Juan A. Suarez 



On Thu, 2018-07-19 at 15:33 +0300, Andres Gomez wrote:
> Until now, the needed bits were wrongly included in linux/memfd.h
> 
> Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we
> generate that header manually, including the needed bits to avoid
> compilation problems, as the ones observed after:
> 3228335b55c ("intel: aubinator: handle GGTT mappings")
> 
> Fixes: 7e2af374742 ("travis: split the make target to three separate ones")
> 
> Cc: Emil Velikov 
> Cc: Juan A. Suarez Romero 
> Cc: Dylan Baker 
> Cc: Eric Engestrom 
> Signed-off-by: Andres Gomez 
> ---
>  .travis.yml | 27 ---
>  1 file changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 012cc9139e0..8b1730bec69 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -584,13 +584,34 @@ install:
> "#ifndef _LINUX_MEMFD_H" \
> "#define _LINUX_MEMFD_H" \
> "" \
> -   "#define __NR_memfd_create 319" \
> -   "#define SYS_memfd_create __NR_memfd_create" \
> -   "" \
> "#define MFD_CLOEXEC 0x0001U" \
> "#define MFD_ALLOW_SEALING   0x0002U" \
> "" \
> "#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
> +
> +  # Generate this header, including the missing SYS_memfd_create
> +  # macro, which is not provided by the header in the Travis
> +  # instance
> +  mkdir -p sys
> +  printf "%s\n" \
> +   "#ifndef _SYSCALL_H" \
> +   "#define _SYSCALL_H  1" \
> +   "" \
> +   "#include " \
> +   "" \
> +   "#ifndef _LIBC" \
> +   "# include " \
> +   "#endif" \
> +   "" \
> +   "#ifndef __NR_memfd_create" \
> +   "# define __NR_memfd_create 319 /* Taken from  
> */" \
> +   "#endif" \
> +   "" \
> +   "#ifndef SYS_memfd_create" \
> +   "# define SYS_memfd_create __NR_memfd_create" \
> +   "#endif" \
> +   "" \
> +   "#endif" > sys/syscall.h
>  fi
>  
>  script:

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