PSA: js/src/configure now reads the top-level .mozconfig

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

PSA: js/src/configure now reads the top-level .mozconfig

Till Schneidereit-2
Greetings Spidermonkeys!

As of bug 1253203, the JS shell's reads in the top-level .mozconfig.

What does that mean?

- Command line flags get overridden if equivalent ac_add_options are
defined in the .mozconfig.
- With a normal .mozconfig, the build is quite simply broken, because that
includes $topsrcdir/browser/config/mozconfig, which sets
--enable-application=browser, which collides with the
--enable-application=js set in js/src/configure.


How can we deal with it?
The simplest way seems to be to just use MOZCONFIG to point to an empty
.mozconfig file. I prepended `MOZCONFIG=../.mozconfig-empty` to my
configure line.


See bug 1254459 for some more details.


Thanks,
Till
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Jason Orendorff-2
Mike,

I'd like to know where we're going with SM's build system.

Until now I've always figured SpiderMonkey's build process should work just
like any other standalone library: `configure --arguments && make`.

But it seems to me that is something the build system maintainers don't
want to support. For a standalone library's configure script to be looking
at mozconfig files would be broken (I hope we agree); I conclude that we
are just not really supporting configure anymore. Am I wrong?

I could be OK with that if there's a way forward, some stable way to build
that we can migrate all to and not expect routine breakage in the future.
Is there?

Thanks for helping out with this - I appreciate your work.

-j


On Thu, Mar 10, 2016 at 7:53 AM, Till Schneidereit <
[hidden email]> wrote:

> Greetings Spidermonkeys!
>
> As of bug 1253203, the JS shell's reads in the top-level .mozconfig.
>
> What does that mean?
>
> - Command line flags get overridden if equivalent ac_add_options are
> defined in the .mozconfig.
> - With a normal .mozconfig, the build is quite simply broken, because that
> includes $topsrcdir/browser/config/mozconfig, which sets
> --enable-application=browser, which collides with the
> --enable-application=js set in js/src/configure.
>
>
> How can we deal with it?
> The simplest way seems to be to just use MOZCONFIG to point to an empty
> .mozconfig file. I prepended `MOZCONFIG=../.mozconfig-empty` to my
> configure line.
>
>
> See bug 1254459 for some more details.
>
>
> Thanks,
> Till
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Till Schneidereit-2
This actually brings up an important point: we need to be able to support
SpiderMonkey as a standalone library. Even if we were to just disregard the
other embedders (which I don't think we should), Servo absolutely needs a
standalone version that's extracted from mozilla-central.

We have a packaging script that collects all the relevant parts of the tree
into an archive and spits out something that works in the way Jason
describes:
https://dxr.mozilla.org/mozilla-central/source/js/src/make-source-package.sh

I don't think it's necessarily required to keep that exactly the same, but
we do need to keep the ability to extract such a package and build it
without having too many onerous dependencies. Python is obviously fine, and
if we have to bundles some sort of default mozconfig file, that seems ok,
too, but I don't know how much other stuff we need beyond that.


Thanks,
Till

On Thu, Mar 10, 2016 at 3:48 PM, Jason Orendorff <[hidden email]>
wrote:

> Mike,
>
> I'd like to know where we're going with SM's build system.
>
> Until now I've always figured SpiderMonkey's build process should work
> just like any other standalone library: `configure --arguments && make`.
>
> But it seems to me that is something the build system maintainers don't
> want to support. For a standalone library's configure script to be looking
> at mozconfig files would be broken (I hope we agree); I conclude that we
> are just not really supporting configure anymore. Am I wrong?
>
> I could be OK with that if there's a way forward, some stable way to build
> that we can migrate all to and not expect routine breakage in the future.
> Is there?
>
> Thanks for helping out with this - I appreciate your work.
>
> -j
>
>
> On Thu, Mar 10, 2016 at 7:53 AM, Till Schneidereit <
> [hidden email]> wrote:
>
>> Greetings Spidermonkeys!
>>
>> As of bug 1253203, the JS shell's reads in the top-level .mozconfig.
>>
>> What does that mean?
>>
>> - Command line flags get overridden if equivalent ac_add_options are
>> defined in the .mozconfig.
>> - With a normal .mozconfig, the build is quite simply broken, because that
>> includes $topsrcdir/browser/config/mozconfig, which sets
>> --enable-application=browser, which collides with the
>> --enable-application=js set in js/src/configure.
>>
>>
>> How can we deal with it?
>> The simplest way seems to be to just use MOZCONFIG to point to an empty
>> .mozconfig file. I prepended `MOZCONFIG=../.mozconfig-empty` to my
>> configure line.
>>
>>
>> See bug 1254459 for some more details.
>>
>>
>> Thanks,
>> Till
>> _______________________________________________
>> dev-tech-js-engine mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>>
>
>
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Till Schneidereit-2
On Fri, Mar 11, 2016 at 12:11 AM, Mike Hommey <[hidden email]> wrote:

> > > On Thu, Mar 10, 2016 at 7:53 AM, Till Schneidereit <
> > > [hidden email]> wrote:
> > >
> > >> Greetings Spidermonkeys!
> > >>
> > >> As of bug 1253203, the JS shell's reads in the top-level .mozconfig.
> > >>
> > >> What does that mean?
> > >>
> > >> - Command line flags get overridden if equivalent ac_add_options are
> > >> defined in the .mozconfig.
> > >> - With a normal .mozconfig, the build is quite simply broken, because
> that
> > >> includes $topsrcdir/browser/config/mozconfig, which sets
>
> A normal mozconfig shouldn't even include
> $topsrcdir/browser/config/mozconfig ; granted, it might
> --enable-application=mobile/android if it's a fennec mozconfig.
>

I vaguely remember following some guide when I did this. That was three or
four years ago though, so I can't really remember. Anyway, great that
that's unlikely to be an issue for other people.

> We have a packaging script that collects all the relevant parts of the
tree
> into an archive and spits out something that works in the way Jason
> describes:
>
https://dxr.mozilla.org/mozilla-central/source/js/src/make-source-package.sh
>
> I don't think it's necessarily required to keep that exactly the same, but
> we do need to keep the ability to extract such a package and build it
> without having too many onerous dependencies. Python is obviously fine,
and
> if we have to bundles some sort of default mozconfig file, that seems ok,
> too, but I don't know how much other stuff we need beyond that.

There is no dependency change. Python has been required for the build
for a long while. The only change is that some additional files are now
required that are not listed in make-source-package.sh. That would be a
bug to file.

Ok, great. Adding a few additional files is fine. I'll start working on
this for Servo in the next few days, and will file a bug, either with a
patch or with a description of where I got stuck.

Till

Mike
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Jason Orendorff-2
In reply to this post by Till Schneidereit-2
On Thu, Mar 10, 2016 at 5:11 PM, Mike Hommey <[hidden email]> wrote:

> > > For a standalone library's configure script to be looking
> > > at mozconfig files would be broken (I hope we agree);
>
> I guess that is where we disagree. This is not broken. This is how it
> has worked for Firefox for as long as I remember. That spidermonkey uses
> a separate configure that doesn't read a mozconfig is, to me, a glitch
> of history.
>

Are there a lot of standalone libraries that silently look up and honor a
build-config file for a downstream client application? I would expect the
principle of least astonishment to rule this out.

The JS engine is way more standalone than most of the in-tree stuff we have.

I think a reasonable way out of this would be for configure to error out
> if mozconfig and command line/environment try to do conflicting things.
>
> But the immediate fix is probably to make js/src/configure not read a
> mozconfig until we sort these things out.
>

Yes, that sounds great.

Thanks again.

-j
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Jason Orendorff-2
On Fri, Mar 11, 2016 at 7:08 AM, Jason Orendorff <[hidden email]>
wrote:

> The JS engine is way more standalone than most of the in-tree stuff we
> have.
>

This is not very well said. I meant: more standalone than most of the code
we actively maintain, that our build system builds directly.

-j
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: PSA: js/src/configure now reads the top-level .mozconfig

Jason Orendorff-2
In reply to this post by Jason Orendorff-2
On Fri, Mar 11, 2016 at 7:28 AM, Mike Hommey <[hidden email]> wrote:

> The problem you are facing is not that this "standalone library" is
> honoring a build-config file. The problem you are facing is that you are
> building a "standalone library" from a source tree containing Firefox
> *and* a build-config file to build Firefox.
>

Yeah, but code shouldn't change behavior based on what directory tree you
put it in. Come on, admit it, this is super weird. :-P

-j
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine