Closed Bug 1787628 Opened 2 years ago Closed 2 years ago

Unable to compile js shell on Linux

Categories

(Firefox Build System :: General, defect, P3)

All
Linux
defect

Tracking

(firefox-esr91 unaffected, firefox-esr102 unaffected, firefox104 unaffected, firefox105 wontfix, firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox104 --- unaffected
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: gkw, Assigned: ahochheiden)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

/snip
Traceback (most recent call last):
  File "/home/skygentoo/trees/mozilla-central/js/src/../../configure.py", line 33, in <module>
    from mozbuild.configure import (
  File "/home/skygentoo/trees/mozilla-central/python/mozbuild/mozbuild/configure/__init__.py", line 28, in <module>
    from mozbuild.configure.util import ConfigureOutputHandler, getpreferredencoding, LineIO
  File "/home/skygentoo/trees/mozilla-central/python/mozbuild/mozbuild/configure/util.py", line 17, in <module>
    from looseversion import LooseVersion
ModuleNotFoundError: No module named 'looseversion'

I'm now unable to compile Linux js shell using:

AR=ar sh ./configure --enable-debug --with-ccache --enable-gczeal --enable-debug-symbols --disable-bootstrap --disable-tests

Tested on m-c rev a460318b0814.

The first bad revision is:
changeset:   https://hg.mozilla.org/mozilla-central/rev/a460318b0814
user:        ahochheiden
date:        Fri Aug 26 23:05:25 2022 +0000
summary:     Bug 1777414 - Replace all uses of `distutils.version.LooseVersion` with `looseversion.LooseVersion` r=firefox-build-system-reviewers,glandium

I tried re-running ./mach bootstrap --app=js but it didn't seem to help.

Flags: needinfo?(ahochheiden)

Set release status flags based on info from the regressing bug 1777414

(In reply to Gary Kwong [:gkw] [:nth10sd] (NOT official MoCo now) from comment #0)

I'm now unable to compile Linux js shell using:

AR=ar sh ./configure --enable-debug --with-ccache --enable-gczeal --enable-debug-symbols --disable-bootstrap --disable-tests

Are there any docs for this command (or additional information you could provide)? ./configure doesn't seem to map to anything on my Ubuntu machine and I don't see anything obvious related to this on Building and testing SpiderMonkey.

./mach configure and ./mach build both seem to work fine after bootstrapping to --app=js.

Assignee: nobody → ahochheiden
Severity: -- → S3
Flags: needinfo?(ahochheiden) → needinfo?(nth10sd)
Priority: -- → P3

I create an objdir then point to configure in js/src/. I have done this for decades in my time in the Mozilla community.

The guide that you point to seems to indicate that this method is now deprecated though. "This replaces old guides that advised running the “configure” script directly."

Steve, is this method no longer supported for compiling js builds?

Flags: needinfo?(nth10sd) → needinfo?(sphink)

Okay, I think all you'll need to do to get around this then is to create a mozconfig with this in it:

ac_add_options --enable-application=js
ac_add_options --enable-debug
ac_add_options --with-ccache
ac_add_options --enable-gczeal
ac_add_options --enable-debug-symbols
ac_add_options --disable-bootstrap
ac_add_options --disable-tests

Then run ./mach configure and it should do what you need.

I think the root of the problem you're encountering is that you're not in the mach virtualenv when you invoke configure that way, and all the 'imports' for the mach site aren't done since you're just in the system Python environment. I'm sure you could find a way to make it work, but I think using ./mach configure together with mozconfig will probably be easier in the long run.

configure (without mach) is still supposed to work.

Thanks for pointing me in the right direction @Glandium.

Flags: needinfo?(sphink)
Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5dc125ea32b Add `looseversion` import to `configure.py` r=firefox-build-system-reviewers,glandium
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

The patch landed in nightly and beta is affected.
:ahochheiden, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox105 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahochheiden)
Flags: needinfo?(ahochheiden)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: