Closed Bug 1749306 Opened 2 years ago Closed 2 years ago

Mozglue Dllservices is not copied in tarball by make-source-package.py

Categories

(Firefox Build System :: General, defect)

Firefox 91
defect

Tracking

(firefox-esr91 fixed)

RESOLVED FIXED
Tracking Status
firefox-esr91 --- fixed

People

(Reporter: stanislas.dolcini, Assigned: sfink)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62

Steps to reproduce:

When generating the source tarball for 0 A.D. by running make-source-package.py we noticed the compilation failed on windows.

I fixed it by copying the file manually.

Actual results:

Traceback (most recent call last):
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\sandbox.py", line 159, in exec_file
    source = six.ensure_text(self._finder.get(path).read())
AttributeError: 'NoneType' object has no attribute 'read'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1097, in read_mozbuild
    path, config, descend=descend, metadata=metadata
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1168, in _read_mozbuild
    sandbox.exec_file(path)
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 239, in exec_file
    Sandbox.exec_file(self, path)
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\sandbox.py", line 162, in exec_file
    self._context.source_stack, sys.exc_info()[2], read_error=path
mozbuild.frontend.sandbox.SandboxLoadError: ([], <traceback object at 0x0000017C314C3A88>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../js/src/../../configure.py", line 231, in <module>
    sys.exit(main(sys.argv))
  File "../js/src/../../configure.py", line 85, in main
    return config_status(config)
  File "../js/src/../../configure.py", line 226, in config_status
    return config_status(args=[], **sanitized_config)
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\config_status.py", line 174, in config_status
    definitions = list(definitions)
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\emitter.py", line 155, in emit
    for out in output:
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 924, in read_topsrcdir
    for r in self.read_mozbuild(path, self.config):
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1102, in read_mozbuild
    raise bre
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1097, in read_mozbuild
    path, config, descend=descend, metadata=metadata
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1261, in _read_mozbuild
    child_path, context.config, metadata=child_metadata
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1102, in read_mozbuild
    raise bre
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1097, in read_mozbuild
    path, config, descend=descend, metadata=metadata
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1261, in _read_mozbuild
    child_path, context.config, metadata=child_metadata
  File "c:\Dev\Perso\0ad-git\libraries\source\spidermonkey\mozjs-91.5.0\python\mozbuild\mozbuild\frontend\reader.py", line 1116, in read_mozbuild
    list(self._execution_stack), sys.exc_info()[2], sandbox_load_error=sle
mozbuild.frontend.reader.BuildReaderError:
==============================
FATAL ERROR PROCESSING MOZBUILD FILE
==============================

The error occurred while processing the following file:

    c:/Dev/Perso/0ad-git/libraries/source/spidermonkey/mozjs-91.5.0/mozglue/moz.build

The underlying problem is we referenced a path that does not exist. That path is:

    c:/Dev/Perso/0ad-git/libraries/source/spidermonkey/mozjs-91.5.0/mozglue/dllservices/moz.build

Either create the file if it needs to exist or do not reference it.

Expected results:

The files should have been copied.

Output tarball https://github.com/wraitii/spidermonkey-tarballs/releases/download/mozjs-91.5.0/mozjs-91.5.0.tar.xz

This seems to have changed further since then. mozglue/dllservices appears to have been mostly moved to toolkit/xre/dllservices. So this will likely require a very different patches for esr91 and trunk. (And I'm not even sure what parts of this are needed for spidermonkey.)

If it started working when you only copied that file, then I suspect the right fix might be to make the inclusion of that file conditional in mozglue/moz.build.

Note that we do not test (manually or in continuous integration) creating the spidermonkey tarball on Windows, only on Linux.

I actually copied the entire folder.

The tarball was created on macOS I believe. It worked for him so he did not look further.

I'd be interested to know if the patch I uploaded fixes this. I think that config setting will work, but I'm not sure.

The patch is for esr91 only; something different would be needed, if anything is needed at all, for the current trunk.

Applying the patch, I'm able to compile with no extra folder to copy.

Assignee: nobody → sphink

(In reply to stanislas.dolcini from comment #5)

Applying the patch, I'm able to compile with no extra folder to copy.

Thank you for checking. I've sent it over to the build team for review.

Comment on attachment 9258414 [details]
Bug 1749306 - Fix spidermonkey source packaging for Windows

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is only relevant for non-Gecko embedders and does not change any behavior otherwise.
  • User impact if declined: spidermonkey source packages will (continue to) fail to build on Windows.
  • Fix Landed on Version: (this is for esr91 only)
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This only affects JS_STANDALONE builds, which we do not ship.

Note that this patch is for esr91 only. Things have moved around since then. I haven't checked whether a different version of this might be needed for later versions.

Attachment #9258414 - Flags: approval-mozilla-esr91?

(In reply to Steve Fink [:sfink] [:s:] from comment #7)

I haven't checked whether a different version of this might be needed for later versions.

I'd appreciate an answer on this before taking the ESR patch.

Flags: needinfo?(sphink)

Sorry, I'm trying to repair my Windows setup enough to check this out. It would be ok to land this esr91-only, but it's true that that may result in the same complaint being brought up again. We could also explicitly not support this, but that seems a bit obnoxious.

This patch is not needed in 93+.

(Windows builds of the standalone package are currently broken for other reasons, but they make it past this problem.)

Flags: needinfo?(sphink)

Comment on attachment 9258414 [details]
Bug 1749306 - Fix spidermonkey source packaging for Windows

Thanks for checking and confirming. Approved for 91.6esr.

Attachment #9258414 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: