Closed Bug 990086 Opened 10 years ago Closed 10 years ago

Local simulator builds fail on Mac

Categories

(Firefox OS Graveyard :: Simulator, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S1 (9may)

People

(Reporter: jryans, Assigned: jryans)

Details

Attachments

(2 files)

It's possible this is a Mac-only issue, but when I build the Simulator, I typically do the following:

mach build && mach package

However, the resulting XPI does not include "b2g-bin" after this sequence.  However, if I run "mach package" a second time, then it does appear.
I think it has been fixed by bug 920198.
Can you confirm?
Flags: needinfo?(jryans)
Attached file Log after mach package
Now packaging b2g-desktop fails completely for me, but I'm not sure if it's related to the Simulator.

I've attached the log output.  Should I bisect or something? :(
Flags: needinfo?(jryans)
This error persists after another attempt at "mach package".  I'll try it without FXOS_SIMULATOR enabled.
I don't see "mach package" errors when FXOS_SIMUALATOR is disabled, so somehow it's related to the Simulator.
I am able to successfully build a simulator afterwards by manually running build_xpi.py.
The problem seems to be that two instances of "make-package" are running simultaneously, each trying to write to "b2g-31.0a1.en-US.mac64.dmg", but the second fails since the file exists, or possibly because it is still open by the first instance.

Mike, any idea how we could work around this?
Flags: needinfo?(mh+mozilla)
Summary: Local builds require double packaging → Local simulator builds fail on Mac
It sounds related to this:
http://mxr.mozilla.org/mozilla-central/source/b2g/installer/Makefile.in#85
simulator: make-package
	@echo 'Building simulator addon...'
	$(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM)
 
default:: simulator

But my Makefile knowledges are too limited to tell why...
Try this:

diff --git a/b2g/installer/Makefile.in b/b2g/installer/Makefile.in
--- a/b2g/installer/Makefile.in
+++ b/b2g/installer/Makefile.in
@@ -81,13 +81,13 @@ GARBAGE += $(MOZ_PKG_MANIFEST)
 endif
 
 ifdef FXOS_SIMULATOR
 .PHONY: simulator
 simulator: make-package
        @echo 'Building simulator addon...'
        $(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM)
 
-default:: simulator
+libs:: simulator
 
 # Ensure copying Simulator xpi to ftp
 UPLOAD_EXTRA_FILES += fxos-simulator-*-*.xpi
 endif
Flags: needinfo?(mh+mozilla)
Yay, it works!  I tried both a cobber and incremental build, and seems fine in both cases.
Comment on attachment 8415351 [details] [diff] [review]
Fix local simulator builds on Mac. r=glandium

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

Mike, want to review your own patch? ;)

Try: https://tbpl.mozilla.org/?tree=Try&rev=92c1b43b3825
Attachment #8415351 - Flags: review?(mh+mozilla)
Comment on attachment 8415351 [details] [diff] [review]
Fix local simulator builds on Mac. r=glandium

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

> Mike, want to review your own patch? ;)

Obviously not
Attachment #8415351 - Flags: review?(mh+mozilla) → review?(mshal)
Comment on attachment 8415351 [details] [diff] [review]
Fix local simulator builds on Mac. r=glandium

Looks fine, though I haven't actually tried to run it myself :)
Attachment #8415351 - Flags: review?(mshal) → review+
https://hg.mozilla.org/mozilla-central/rev/129a4a310c8e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
You need to log in before you can comment on or make changes to this bug.