Closed Bug 1383578 Opened 7 years ago Closed 7 years ago

Build failed from "ERROR: Cannot find makecab"

Categories

(Firefox Build System :: MozillaBuild, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xidorn, Assigned: general)

References

Details

Attachments

(1 file)

After upgrading to MozillaBuild 3.0, I hit "ERROR: Cannot find makecab" during configuration.
This is because at start-shell.bat line 42
>   SET PATH="%PATH%;!LLVMDIR!\bin"
the quotes are harmful, which changes the PATH to something like
> ...:/usr/local/bin:/mingw/bin:/bin:"C:/WINDOWS/System32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program Files/LLVM/bin"
and thus executables of Windows itself cannot be found.
I'm seeing this error as well.
This is a regression from bug 1260823. I wouldn't object to ripping that LLVM path setting code out entirely, but I got some pushback to doing so during the MozillaBuild 3.0 development cycle.

Anyway, ownership of MozillaBuild is now on coop's team, so I'm going to defer to them on further investigation. Sorry for the hassle :(. As a short-term fix, you can probably just revert that one-line change or remove the entire LLVM block in start-shell.bat.
Flags: needinfo?(coop)
(In reply to Ryan VanderMeulen [:RyanVM] from comment #3)
> As a
> short-term fix, you can probably just revert that one-line change or remove
> the entire LLVM block in start-shell.bat.

Confirmed that so far commenting-out SET PATH="%PATH%;!LLVMDIR!\bin" seems to work for me.
(In reply to Brian Birtles (:birtles) from comment #5)
> (In reply to Ryan VanderMeulen [:RyanVM] from comment #3)
> > As a
> > short-term fix, you can probably just revert that one-line change or remove
> > the entire LLVM block in start-shell.bat.
> 
> Confirmed that so far commenting-out SET PATH="%PATH%;!LLVMDIR!\bin" seems
> to work for me.

You don't necessarily need to commenting out... you can just remove the pair of quotes.
(In reply to Xidorn Quan [:xidorn] UTC+10 from comment #6)
> (In reply to Brian Birtles (:birtles) from comment #5)
> > (In reply to Ryan VanderMeulen [:RyanVM] from comment #3)
> > > As a
> > > short-term fix, you can probably just revert that one-line change or remove
> > > the entire LLVM block in start-shell.bat.
> > 
> > Confirmed that so far commenting-out SET PATH="%PATH%;!LLVMDIR!\bin" seems
> > to work for me.
> 
> You don't necessarily need to commenting out... you can just remove the pair
> of quotes.

I have spaces in my path. Without the quotes it breaks (or it did, hence why I filed bug 1260823).
(In reply to Ryan VanderMeulen [:RyanVM] from comment #3)
> This is a regression from bug 1260823. I wouldn't object to ripping that
> LLVM path setting code out entirely, but I got some pushback to doing so
> during the MozillaBuild 3.0 development cycle.
> 
> Anyway, ownership of MozillaBuild is now on coop's team, so I'm going to
> defer to them on further investigation. Sorry for the hassle :(. As a
> short-term fix, you can probably just revert that one-line change or remove
> the entire LLVM block in start-shell.bat.

Ryan: as a procedural question, with what frequency did you update MozillaBuild in the past? Did you roll new versions often, or wait for some threshold of required changes?
Flags: needinfo?(coop) → needinfo?(ryanvm)
No set schedule, typically was more of a push model of something in particular needing updating which then led to a new release. For an issue like this, spinning an updated release probably isn't a bad idea.
Flags: needinfo?(ryanvm)
As mentioned on bug 1398552, this is a slight error in the SET command.

As others have mentioned, not having quotes will cause problems if there are any paths with spaces.  However, having the quotes where they are (SET PATH="...") will place literal quotes in the PATH.

The correct way to do this is SET "PATH=...".  That will preserve any spaces, but won't tack on the quotes.  I've tested with this tweak on Windows 10 and it does resolve the issue.

I'll likely submit a patch tomorrow; I just need to make sure things are okay with my employer first regarding OSS code contributions.  Or if someone else wants to go ahead, feel free.
Comment on attachment 8907425 [details] [diff] [review]
Fixed quoting of PATH variable modification

Patch submitted.  Ryan, could you take a look at this when you get a chance?
Attachment #8907425 - Flags: review?(ryanvm)
Comment on attachment 8907425 [details] [diff] [review]
Fixed quoting of PATH variable modification

Thanks for the patch, Paul! Offhand, this looks fine to me, but I've handed off ownership of MozillaBuild at this point, so redirecting the review request to Ted.
Attachment #8907425 - Flags: review?(ryanvm) → review?(ted)
Comment on attachment 8907425 [details] [diff] [review]
Fixed quoting of PATH variable modification

Review of attachment 8907425 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the patch! Unfortunately I don't have a timeframe for when we'll get a new release out with this.
Attachment #8907425 - Flags: review?(ted) → review+
Assignee: nobody → general
Pushed by tmielczarek@mozilla.com:
https://hg.mozilla.org/mozilla-build/rev/115a88792b1a
Fixed quoting of PATH variable modification.  r=ryanvm,ted
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: