Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nasm will soon become a build dependency

245 views
Skip to first unread message

Thomas Daede

unread,
Oct 26, 2018, 3:57:47 PM10/26/18
to
Firefox is switching its AV1 implementation to dav1d, a new,
multithreaded AV1 decoder. dav1d requires nasm >= 2.10, which means that
it will become a build-time dependency of Firefox.

mach bootstrap will automatically install nasm, and it is also available
in most package managers. Building without nasm will still be possible,
but will require disabling av1 or dav1d.

We also plan to switch our remaining usage of yasm to nasm, dropping our
yasm dependency.

Thomas

https://bugzilla.mozilla.org/show_bug.cgi?id=1501796

Thomas Daede

unread,
Nov 27, 2018, 4:50:57 PM11/27/18
to
nasm is now preferred over yasm if it's detected at configure time.

Note that compilation will currently fail if a very old nasm is
installed. If this happens, either update nasm (such as via mach
bootstrap), or remove it, and then rerun mach configure.

Thomas

Thomas Daede

unread,
Dec 20, 2018, 7:03:19 PM12/20/18
to
nasm is now required for building on Linux.

A configure check was missed, so if you are missing nasm, you will see
this error:

make[4]: *** No rule to make target '../../media/libdav1d/asm/config.o',
needed by 'libxul.so'. Stop.

This bug tracks adding the configure check:
https://bugzilla.mozilla.org/show_bug.cgi?id=1515641

Cameron McCormack

unread,
Dec 20, 2018, 11:01:22 PM12/20/18
to dev-pl...@lists.mozilla.org, Thomas Daede
On Fri, Dec 21, 2018, at 11:05 AM, Thomas Daede wrote:
> nasm is now required for building on Linux.

Is there a minimum version required? I am getting errors like this building:

/z/moz/g/third_party/dav1d/src/x86/ipred_ssse3.asm:42: error: operand 1: expression is not simple or relocatable

$ nasm -v
NASM version 2.11.08

Martin Thomson

unread,
Dec 20, 2018, 11:17:30 PM12/20/18
to Cameron McCormack, dev-platform, Thomas Daede
On Fri, Dec 21, 2018 at 3:01 PM Cameron McCormack <c...@mcc.id.au> wrote:

> On Fri, Dec 21, 2018, at 11:05 AM, Thomas Daede wrote:
> > nasm is now required for building on Linux.
>
> Is there a minimum version required? I am getting errors like this
> building:
>

The OP said >= 2.10. But you appear to have that.

Cameron McCormack

unread,
Dec 20, 2018, 11:46:44 PM12/20/18
to Martin Thomson, dev-platform, Thomas Daede
On Fri, Dec 21, 2018, at 3:17 PM, Martin Thomson wrote:
> The OP said >= 2.10. But you appear to have that.

Oh, missed that.

I just tried building some other versions of nasm from source (since 2.11 is the latest packaged in my distribution) and 2.13 was the earliest that I could build with.

Thomas Daede

unread,
Dec 20, 2018, 11:58:04 PM12/20/18
to
On 12/20/18 8:17 PM, Martin Thomson wrote:
> The OP said >= 2.10. But you appear to have that.

At the time of writing it was, but we now need 2.13. The configure
script doesn't check for that either, I will make a note of it in the
bug to fix this detection.

Kartikaya Gupta

unread,
Dec 21, 2018, 11:08:27 AM12/21/18
to Thomas Daede, dev-platform
Looks like the default nasm in the Ubuntu 16.04 repositories is 2.11.
Are there plans to make `./mach bootstrap` find a 2.13 version from
somewhere, instead of just installing via `apt-get` and assuming it's
the right version?
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

Thomas Daede

unread,
Dec 21, 2018, 4:07:02 PM12/21/18
to
On 12/21/18 8:08 AM, Kartikaya Gupta wrote:
> Looks like the default nasm in the Ubuntu 16.04 repositories is 2.11.
> Are there plans to make `./mach bootstrap` find a 2.13 version from
> somewhere, instead of just installing via `apt-get` and assuming it's
> the right version?

There is a toolchain build for nasm for windows:
https://bugzilla.mozilla.org/show_bug.cgi?id=1511224

If getting a newer nasm version is inconvenient for a majority of linux
users, the toolchain build could be used to produce nasm binaries for
mach bootstrap as well.

(I forgot to mention, you can also --disable-av1 as a temporary workaround)

Kartikaya Gupta

unread,
Dec 21, 2018, 4:21:24 PM12/21/18
to Thomas Daede, dev-platform
On Fri, Dec 21, 2018 at 4:10 PM Thomas Daede <tda...@mozilla.com> wrote:
> There is a toolchain build for nasm for windows:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1511224
>
> If getting a newer nasm version is inconvenient for a majority of linux
> users, the toolchain build could be used to produce nasm binaries for
> mach bootstrap as well.

I would certainly prefer this, and having this work smoothly would
also be good for new contributors. Having to build and install extra
packages is always a hassle.

> (I forgot to mention, you can also --disable-av1 as a temporary workaround)

Good to know, thanks. Although I already had to get 2.13 to unblock my build.

Mike Hommey

unread,
Dec 21, 2018, 6:09:50 PM12/21/18
to Kartikaya Gupta, Thomas Daede, dev-platform
On Fri, Dec 21, 2018 at 04:21:03PM -0500, Kartikaya Gupta wrote:
> On Fri, Dec 21, 2018 at 4:10 PM Thomas Daede <tda...@mozilla.com> wrote:
> > There is a toolchain build for nasm for windows:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1511224
> >
> > If getting a newer nasm version is inconvenient for a majority of linux
> > users, the toolchain build could be used to produce nasm binaries for
> > mach bootstrap as well.
>
> I would certainly prefer this, and having this work smoothly would
> also be good for new contributors. Having to build and install extra
> packages is always a hassle.

It's a hassle downstream too.

Mike

Thomas Daede

unread,
Dec 21, 2018, 6:27:01 PM12/21/18
to
Not sure what I can do for downstream though - afaik most Linux distros
don't use any of our toolchain builds?

Botond Ballo

unread,
Dec 28, 2018, 3:19:48 PM12/28/18
to Kartikaya Gupta, Thomas Daede, dev-platform
On Fri, Dec 21, 2018 at 4:21 PM Kartikaya Gupta <kgu...@mozilla.com> wrote:
>
> On Fri, Dec 21, 2018 at 4:10 PM Thomas Daede <tda...@mozilla.com> wrote:
> > There is a toolchain build for nasm for windows:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1511224
> >
> > If getting a newer nasm version is inconvenient for a majority of linux
> > users, the toolchain build could be used to produce nasm binaries for
> > mach bootstrap as well.
>
> I would certainly prefer this, and having this work smoothly would
> also be good for new contributors. Having to build and install extra
> packages is always a hassle.

+1

Debian stable is in this boat as well - the latest nasm version in its
package repositories is 2.12.

This is the first time, as far as I'm aware, that building Firefox
requires manually building another package - everything else is taken
care of by |mach bootstrap|.

Thanks,
Botond

Andi-Bogdan Postelnicu

unread,
Dec 28, 2018, 3:28:57 PM12/28/18
to Botond Ballo, Kartikaya Gupta, dev-platform, Thomas Daede
I can confirm that we are having the same problem on Debian stretch and before manually building nasm we had to disable av1 in order to be able to move further with the static analysis builds for coverity.

> On 28 Dec 2018, at 22:19, Botond Ballo <bba...@mozilla.com> wrote:
>
>> On Fri, Dec 21, 2018 at 4:21 PM Kartikaya Gupta <kgu...@mozilla.com> wrote:
>>
>>> On Fri, Dec 21, 2018 at 4:10 PM Thomas Daede <tda...@mozilla.com> wrote:
>>> There is a toolchain build for nasm for windows:
>>> https://bugzilla.mozilla.org/show_bug.cgi?id=1511224
>>>
>>> If getting a newer nasm version is inconvenient for a majority of linux
>>> users, the toolchain build could be used to produce nasm binaries for
>>> mach bootstrap as well.
>>
>> I would certainly prefer this, and having this work smoothly would
>> also be good for new contributors. Having to build and install extra
>> packages is always a hassle.
>
> +1
>
> Debian stable is in this boat as well - the latest nasm version in its
> package repositories is 2.12.
>
> This is the first time, as far as I'm aware, that building Firefox
> requires manually building another package - everything else is taken
> care of by |mach bootstrap|.
>
> Thanks,
> Botond

Kartikaya Gupta

unread,
Jan 18, 2019, 2:21:07 PM1/18/19
to Thomas Daede, Botond Ballo, Andi-Bogdan Postelnicu, dev-platform
Any update here? Is there a bug on file for making bootstrap install a
usable nasm?

On Fri, Dec 28, 2018 at 3:28 PM Andi-Bogdan Postelnicu <an...@mozilla.com> wrote:
>
> I can confirm that we are having the same problem on Debian stretch and before manually building nasm we had to disable av1 in order to be able to move further with the static analysis builds for coverity.
>
> > On 28 Dec 2018, at 22:19, Botond Ballo <bba...@mozilla.com> wrote:
> >
> >> On Fri, Dec 21, 2018 at 4:21 PM Kartikaya Gupta <kgu...@mozilla.com> wrote:
> >>
> >>> On Fri, Dec 21, 2018 at 4:10 PM Thomas Daede <tda...@mozilla.com> wrote:
> >>> There is a toolchain build for nasm for windows:
> >>> https://bugzilla.mozilla.org/show_bug.cgi?id=1511224
> >>>
> >>> If getting a newer nasm version is inconvenient for a majority of linux
> >>> users, the toolchain build could be used to produce nasm binaries for
> >>> mach bootstrap as well.
> >>
> >> I would certainly prefer this, and having this work smoothly would
> >> also be good for new contributors. Having to build and install extra
> >> packages is always a hassle.
> >
> > +1
> >
> > Debian stable is in this boat as well - the latest nasm version in its
> > package repositories is 2.12.
> >
> > This is the first time, as far as I'm aware, that building Firefox
> > requires manually building another package - everything else is taken
> > care of by |mach bootstrap|.
> >
> > Thanks,
> > Botond

Thomas Daede

unread,
Jan 18, 2019, 4:08:28 PM1/18/19
to
On 1/18/19 11:20 AM, Kartikaya Gupta wrote:
> Any update here? Is there a bug on file for making bootstrap install a
> usable nasm?

I just made one:

https://bugzilla.mozilla.org/show_bug.cgi?id=1521186

It has two deps, on making the actual toolchain scripts.
0 new messages