#22232 closed defect (fixed)
nasm-3.01
| Reported by: | zeckma | Owned by: | Bruce Dubbs |
|---|---|---|---|
| Priority: | normal | Milestone: | 13.0 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description
NASM-3.00 has changed operand order for TEST by forcing them to be in an order according to the spec. dav1d is a case where the order of the operands weren't in the proper order. Thus, it now fails to build from source.
A merge request has already been made to the project:
The resulting patch works as expected, but upstream has not responded to the MR yet.
Change History (21)
comment:1 by , 12 months ago
comment:2 by , 12 months ago
| Summary: | dav1d FTBFS with NASM-3.00 → issues with NASM-3.00 (at least dav1d, x264, and libaom affected) |
|---|
follow-up: 4 comment:3 by , 12 months ago
x264 problem reported upstream: https://code.videolan.org/videolan/x264/-/issues/80 But seems the maintainer does not understand what the problem is... Not tried but seems yasm can be used instead.
follow-up: 6 comment:4 by , 12 months ago
Replying to pierre:
x264 problem reported upstream: https://code.videolan.org/videolan/x264/-/issues/80 But seems the maintainer does not understand what the problem is... Not tried but seems yasm can be used instead.
Looking at './configure --help' I did not see a way to use yasm for x264, but I did see --disable-asm and that works. I do not know how much difference that would make for the performance. My experince is that gcc does a pretty good job.
follow-up: 7 comment:5 by , 12 months ago
Looks like the x264 issue might be a bug in nasm actually: https://github.com/netwide-assembler/nasm/issues/121
comment:6 by , 12 months ago
Replying to Bruce Dubbs:
Replying to pierre:
x264 problem reported upstream: https://code.videolan.org/videolan/x264/-/issues/80 But seems the maintainer does not understand what the problem is... Not tried but seems yasm can be used instead.
Looking at './configure --help' I did not see a way to use yasm for x264, but I did see --disable-asm and that works. I do not know how much difference that would make for the performance. My experince is that gcc does a pretty good job.
Yes, yasm cannot be used. I thought it was possible to pass AS=yasm to configure, but this fails...
comment:7 by , 12 months ago
Replying to pierre:
Looks like the x264 issue might be a bug in nasm actually: https://github.com/netwide-assembler/nasm/issues/121
nasm-3.01rc1 released. It fixes the builds of x264, x265, and libaom.
follow-up: 9 comment:8 by , 12 months ago
I can validate that it fixes x265 and x265. dav1d still fails though.
follow-up: 10 comment:9 by , 12 months ago
Replying to Bruce Dubbs:
I can validate that it fixes x265 and x265. dav1d still fails though.
https://github.com/videolan/dav1d/commit/0bc6bd93417179cd0c30fac40d2fd11aa29c8523
comment:10 by , 12 months ago
Replying to Joe Locash:
https://github.com/videolan/dav1d/commit/0bc6bd93417179cd0c30fac40d2fd11aa29c8523
I got that as a patch. I may be able to fix it as a sed.
comment:11 by , 12 months ago
This works:
sed -e '/r7b,/s/r7b.*$/[fg_dataq+FGData.overlap_flag], r7b/' \
-i src/x86/filmgrain16_avx{2,512}.asm
follow-up: 15 comment:12 by , 12 months ago
Since dav1d is now in the book, for firefox add:
ac_add_options --with-system-av1
to mozconfig and make dav1d recommended otherwise, Firefox's internal copy of dav1d needs to be patched.
Thunderbird will need the same change.
comment:13 by , 12 months ago
Seems nasm-3.01-rc3 should even fix dav1d without the sed: https://github.com/netwide-assembler/nasm/commit/b3358fe63e48983cc9c9b30142d5a945ce077459
comment:15 by , 12 months ago
Replying to Joe Locash:
Since dav1d is now in the book, for firefox add:
ac_add_options --with-system-av1to mozconfig and make dav1d recommended
Done for firefox at r12.4-281-gb16421b7db. For some reason it wants both dav1d and libaom.
comment:17 by , 12 months ago
| Owner: | changed from to |
|---|---|
| Summary: | issues with NASM-3.00 (at least dav1d, x264, and libaom affected) → nasm-3.01 |
Now nasm 3.01 has been released.
comment:18 by , 12 months ago
| Status: | new → assigned |
|---|
comment:19 by , 12 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed at commit a3c4ce2273.
Tested by building libaom, x254, x265. and dav1d. All built without complaint.
comment:20 by , 12 months ago
Changes for version 3.01 are at https://www.nasm.us/docs/3.01/nasmac.html#section-C.1.1

libaom fails to configure as multipass optimization is not supported. In aom's case, yasm can be used instead. Either way, this is a problem and other packages may be affected as well, perhaps libjpeg-turbo. We should consider downgrading NASM until these issues have been fixed.