Re: Meson 0.56.2 and Python39 --> dav1d failing

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
dav1d is failing on 10.7 and 10.8 on the configure test for atomic.

it's building on 10.6 with clang 9.0, so probably needs to blacklist clangs older than 10.9's clang.

nothing to do with meson, looks to me...

K
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
sorry, another look, 10.9 fails so blacklist clangs older that 10.10's clang should do it.
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Joshua Root-8
In reply to this post by Ken Cunningham
On 2021-2-3 23:49 , Ken Cunningham wrote:
> dav1d is failing on 10.7 and 10.8 on the configure test for atomic.
>
> it's building on 10.6 with clang 9.0, so probably needs to blacklist clangs older than 10.9's clang.
>
> nothing to do with meson, looks to me...

It's claimed to be written in C99, but requires either C11's stdatomic.h
or GCC extensions. Hmmm.

- Josh
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
That was a very nice fix...good to see how to do it properly now and then!

K

> On Feb 3, 2021, at 6:24 AM, Joshua Root <[hidden email]> wrote:
>
> On 2021-2-3 23:49 , Ken Cunningham wrote:
>> dav1d is failing on 10.7 and 10.8 on the configure test for atomic.
>> it's building on 10.6 with clang 9.0, so probably needs to blacklist clangs older than 10.9's clang.
>> nothing to do with meson, looks to me...
>
> It's claimed to be written in C99, but requires either C11's stdatomic.h or GCC extensions. Hmmm.
>
> - Josh

Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham


> On Feb 3, 2021, at 11:49 AM, Craig Treleaven <[hidden email]> wrote:
>
> But configure still failed on 10.7 and 10.8:

Oh no! It looked so great! I was really learning some things there. Perhaps it can be tweaked still.

If not, I guess we can still use the compiler_blacklist_versions approach and blacklist all the clangs < whatever 10.10 comes with.

Ken


Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Joshua Root-8
On 2021-2-4 12:19 , Ken Cunningham wrote:
>
>
>> On Feb 3, 2021, at 11:49 AM, Craig Treleaven <[hidden email]> wrote:
>>
>> But configure still failed on 10.7 and 10.8:
>
> Oh no! It looked so great! I was really learning some things there. Perhaps it can be tweaked still.
>
> If not, I guess we can still use the compiler_blacklist_versions approach and blacklist all the clangs < whatever 10.10 comes with.

Well now I'm just confused, because the test program builds fine on 10.7
outside of meson. Need to see the meson-log.txt.

- Josh
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

pvr4me
> On Feb 3, 2021, at 10:01 PM, Joshua Root <[hidden email]> wrote:
>
> On 2021-2-4 12:19 , Ken Cunningham wrote:
>>> On Feb 3, 2021, at 11:49 AM, Craig Treleaven <[hidden email]> wrote:
>>>
>>> But configure still failed on 10.7 and 10.8:
>> Oh no! It looked so great! I was really learning some things there. Perhaps it can be tweaked still.
>> If not, I guess we can still use the compiler_blacklist_versions approach and blacklist all the clangs < whatever 10.10 comes with.
>
> Well now I'm just confused, because the test program builds fine on 10.7 outside of meson. Need to see the meson-log.txt.
>
> - Josh

meson-log.txt from a failed configure on a 10.7 VM is at:

https://paste.macports.org/52ea26dc0724

In this case, clang clang-600.0.57 on 10.7 seems to be choking on "-Werror=ignored-optimization-argument”.  I don’t have 10.8 or 10.9 VM’s running at the moment but would suspect that they have the same problem.  Please recall that dav1d used to build OK on these systems before meson was updated to 0.56.2.

One of the devs on the dav1d project spotted that there was a recent commit to meson that appears to be the cause of this dav1d build problem:

https://github.com/mesonbuild/meson/blob/cd94cf8995bcddc40e627e94037e549b7a18b20e/mesonbuild/compilers/mixins/clang.py#L87

This resulted from a commit on Oct. 4, 2020:

https://github.com/mesonbuild/meson/commit/cd59ce98dc88318c6784cfddfe3fadda2495041b

This stuff is all well above my pay grade but it looks to me that it would likely break our builds on older OS X versions for other ports using meson.  Should we reverse this commit in our meson and file a bug upstream?

Craig
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
well don't forget it builds just fine with the current meson on 10.6 using clang-9.0.

so...nothing to do with meson, I would say.

Really, let's just blacklist older clangs and move along....life is short.

Ken

On Feb 4, 2021, at 08:48, Craig Treleaven <[hidden email]> wrote:

>> On Feb 3, 2021, at 10:01 PM, Joshua Root <[hidden email]> wrote:
>>
>> On 2021-2-4 12:19 , Ken Cunningham wrote:
>>>> On Feb 3, 2021, at 11:49 AM, Craig Treleaven <[hidden email]> wrote:
>>>>
>>>> But configure still failed on 10.7 and 10.8:
>>> Oh no! It looked so great! I was really learning some things there. Perhaps it can be tweaked still.
>>> If not, I guess we can still use the compiler_blacklist_versions approach and blacklist all the clangs < whatever 10.10 comes with.
>>
>> Well now I'm just confused, because the test program builds fine on 10.7 outside of meson. Need to see the meson-log.txt.
>>
>> - Josh
>
> meson-log.txt from a failed configure on a 10.7 VM is at:
>
> https://paste.macports.org/52ea26dc0724
>
> In this case, clang clang-600.0.57 on 10.7 seems to be choking on "-Werror=ignored-optimization-argument”.  I don’t have 10.8 or 10.9 VM’s running at the moment but would suspect that they have the same problem.  Please recall that dav1d used to build OK on these systems before meson was updated to 0.56.2.
>
> One of the devs on the dav1d project spotted that there was a recent commit to meson that appears to be the cause of this dav1d build problem:
>
> https://github.com/mesonbuild/meson/blob/cd94cf8995bcddc40e627e94037e549b7a18b20e/mesonbuild/compilers/mixins/clang.py#L87
>
> This resulted from a commit on Oct. 4, 2020:
>
> https://github.com/mesonbuild/meson/commit/cd59ce98dc88318c6784cfddfe3fadda2495041b
>
> This stuff is all well above my pay grade but it looks to me that it would likely break our builds on older OS X versions for other ports using meson.  Should we reverse this commit in our meson and file a bug upstream?
>
> Craig
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
In reply to this post by pvr4me
successful build with current meson on 10.6


On Feb 4, 2021, at 08:48, Craig Treleaven <[hidden email]> wrote:

On Feb 3, 2021, at 10:01 PM, Joshua Root <[hidden email]> wrote:

On 2021-2-4 12:19 , Ken Cunningham wrote:
On Feb 3, 2021, at 11:49 AM, Craig Treleaven <[hidden email]> wrote:

But configure still failed on 10.7 and 10.8:
Oh no! It looked so great! I was really learning some things there. Perhaps it can be tweaked still.
If not, I guess we can still use the compiler_blacklist_versions approach and blacklist all the clangs < whatever 10.10 comes with.

Well now I'm just confused, because the test program builds fine on 10.7 outside of meson. Need to see the meson-log.txt.

- Josh

meson-log.txt from a failed configure on a 10.7 VM is at:

https://paste.macports.org/52ea26dc0724

In this case, clang clang-600.0.57 on 10.7 seems to be choking on "-Werror=ignored-optimization-argument”.  I don’t have 10.8 or 10.9 VM’s running at the moment but would suspect that they have the same problem.  Please recall that dav1d used to build OK on these systems before meson was updated to 0.56.2.

One of the devs on the dav1d project spotted that there was a recent commit to meson that appears to be the cause of this dav1d build problem:

https://github.com/mesonbuild/meson/blob/cd94cf8995bcddc40e627e94037e549b7a18b20e/mesonbuild/compilers/mixins/clang.py#L87

This resulted from a commit on Oct. 4, 2020:

https://github.com/mesonbuild/meson/commit/cd59ce98dc88318c6784cfddfe3fadda2495041b

This stuff is all well above my pay grade but it looks to me that it would likely break our builds on older OS X versions for other ports using meson.  Should we reverse this commit in our meson and file a bug upstream?

Craig
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
In reply to this post by Ken Cunningham
wait, I could have missed the issue...if meson is now adding a default argument to all checks that means it can never build anything with the default compilers on <10.10, that would be something we should consider fixing in meson, even if upstream doesn't want to.

So if testing shows that all builds on 10.7 -10.9 of meson ports are broken, then yeah, that's different, sure.

Ken
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

ryandesign2
Administrator


On Feb 4, 2021, at 11:26, Ken Cunningham wrote:

> wait, I could have missed the issue...if meson is now adding a default argument to all checks that means it can never build anything with the default compilers on <10.10, that would be something we should consider fixing in meson, even if upstream doesn't want to.
>
> So if testing shows that all builds on 10.7 -10.9 of meson ports are broken, then yeah, that's different, sure.

That sounds like what Craig is saying: that meson is now adding a compiler flag that old compilers don't understand. Meson should check whether a compiler supports a flag before it adds it. We should not be responsible for fixing this; the developers of meson should.
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham


> On Feb 5, 2021, at 10:04 PM, Ryan Schmidt <[hidden email]> wrote:
>
> That sounds like what Craig is saying: that meson is now adding a compiler flag that old compilers don't understand. Meson should check whether a compiler supports a flag before it adds it. We should not be responsible for fixing this; the developers of meson should.

I haven’t tested it all to see for myself, but if someone knows for sure it so, then yeah.

Personally I would be happy to hotpatch it rather than have Every Single Meson Build on 10.7 through 10.9 fail until the patch makes it out the door to us in a released version.

K

Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

ryandesign2
Administrator


On Feb 6, 2021, at 02:14, Ken Cunningham wrote:

> On Feb 5, 2021, at 10:04 PM, Ryan Schmidt <[hidden email]> wrote:
>
>> That sounds like what Craig is saying: that meson is now adding a compiler flag that old compilers don't understand. Meson should check whether a compiler supports a flag before it adds it. We should not be responsible for fixing this; the developers of meson should.
>
> I haven’t tested it all to see for myself, but if someone knows for sure it so, then yeah.
>
> Personally I would be happy to hotpatch it rather than have Every Single Meson Build on 10.7 through 10.9 fail until the patch makes it out the door to us in a released version.

Absolutely, if we can figure out a patch, we patch it. Just saying this is a bug in meson. It's not our responsibility or desire to forever maintain a local patch to fix it.

Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

pvr4me

> On Feb 6, 2021, at 4:47 AM, Ryan Schmidt <[hidden email]> wrote:
>
>
>
> On Feb 6, 2021, at 02:14, Ken Cunningham wrote:
>
>> On Feb 5, 2021, at 10:04 PM, Ryan Schmidt <[hidden email]> wrote:
>>
>>> That sounds like what Craig is saying: that meson is now adding a compiler flag that old compilers don't understand. Meson should check whether a compiler supports a flag before it adds it. We should not be responsible for fixing this; the developers of meson should.
>>
>> I haven’t tested it all to see for myself, but if someone knows for sure it so, then yeah.
>>
>> Personally I would be happy to hotpatch it rather than have Every Single Meson Build on 10.7 through 10.9 fail until the patch makes it out the door to us in a released version.
>
> Absolutely, if we can figure out a patch, we patch it. Just saying this is a bug in meson. It's not our responsibility or desire to forever maintain a local patch to fix it.
>

I reported the issue upstream:

https://github.com/mesonbuild/meson/issues/8307

Craig
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham
In reply to this post by Ken Cunningham
as meson was currently broken on older systems I pushed through a fix for this just now.

We can revise it to whatever upstream wants to do when they get around to it, if they want to do anything about it.

I took the opportunity to also add a cross file similar to the ones I added previously for i386 and x86_64, and this should allow cross building of meson ports on BigSur.

I deeply apologize — I stupidly made a tiny typo by leaving in a testing tweak, and only saw it when I looked at the commit afterwards to make sure it was all well. So I had to fix that quickly.

Normally I would have PR’d this, and waited for review but as in one case the systems were broken, and in the other it involved the cross-building I added, I went ahead with it.

My apologies if this is felt to break protocol; just trying to do the right thing here.

Bes;t

Ken


PS — any feedback on the success of the cross building, or any failures encountered, would be much appreciated.  I believe this is the only setup that currently allows meson cross building on BigSur that is available for macOS.
Reply | Threaded
Open this post in threaded view
|

Re: Meson 0.56.2 and Python39 --> dav1d failing

Ken Cunningham


On Feb 9, 2021, at 12:04 AM, Ken Cunningham <[hidden email]> wrote:


PS — any feedback on the success of the cross building, or any failures encountered, would be much appreciated.  I believe this is the only setup that currently allows meson cross building on BigSur that is available for macOS.


Yep, success! meson cross-building to arm64 from BigSur Intel finally works now:

% port -v installed dav1d
The following ports are currently installed:
  dav1d @0.8.1_0+universal (active) platform='darwin 20' archs='arm64 x86_64' date='2021-02-09T01:15:26-0800'

% file /opt/local/lib/libdav1d.5.dylib
/opt/local/lib/libdav1d.5.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
/opt/local/lib/libdav1d.5.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/opt/local/lib/libdav1d.5.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64


and presumably the other way around as well. So that's something new.


dav1d needs a couple of minor tweaks to get it to build universal, but they are minor.

K