Gaia build failed to create the l10n file on MinGW.

RESOLVED FIXED

Status

Firefox OS
Gaia::Build
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mantaroh, Assigned: mantaroh)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
Created attachment 8720631 [details]
build.log

The custom built gaia(tv) can't launch on windows. When I removed the bug 1131516 patch, I can launch gaia.

Perhaps something wrong on my environment.(e.g. nodejs version / build options..)
However, There aren't document for windows tool note.

Step to reproduce:
 1) Build firefox as Mulet.
   (I used to http://hg.mozilla.org/mozilla-central/rev/0629918a09ae)
 2) Build gaia.
    Build option is 'GAIA_DEVICE_TYPE=tv DEBUG=0'
 3) Launch Mulet.
    Launch command is as follow.
    <built>/<to>/<path>/firefox.exe -no-remote -chrome chrome://b2g/contentshell.html -screen 1280x1090 -profile <path>/<to>/<Profile>/profile

Actually result
 I can't launch simulator.
 The log is attachment.

Expected result
 We can launch simulator.

Additional Information:
 - OSX / Ubuntu can launch simulator
(Assignee)

Comment 1

2 years ago
Hi Ricky.

The custom built gaia can't launch on windows.
(I used 'mozilla-build' tool. )

When I remove the patch of bug 1131516, I can launch on simulator.
Do you happen to have any knowledge about this phenomenon?
Flags: needinfo?(rchien)
Hi Mantaroh, 

Would you like to try latest master to see what's going on? Otherwise you could try to enable RUN_ON_NODE=1. (make sure you have already run `npm install` before running `make` on node.js)

As you can see there is a NS_ERROR_FILE_NOT_FOUND error on your build.log but
Flags: needinfo?(rchien)
(Assignee)

Comment 3

2 years ago
Thanks Ricky.

(In reply to Ricky Chien [:rickychien] from comment #2)
> Hi Mantaroh, 
> 
> Would you like to try latest master to see what's going on? Otherwise you
> could try to enable RUN_ON_NODE=1. (make sure you have already run `npm
> install` before running `make` on node.js)
> 
> As you can see there is a NS_ERROR_FILE_NOT_FOUND error on your build.log but
Umm...
I tried latest master and running on nodejs. However result is same. I investigated build environment on windows.

The cause of this problem is not found localized string, and occurred l10n.check assertion.[1] We can avoid this problem by taking as follow:
  - make with GAIA_PRETRANSLATE option.
  - remove l10n check.[1]

[1] https://github.com/mozilla-b2g/gaia/blob/master/build/webapp-optimize.js#L562

In either case, above is bad solution. We should resolve the root causes..
Summary: The custom-build tv simulator can't launch on windows. → The custom-build tv simulator can't launch on MinGW.
According your error messages in build.log:

[utils-xpc] writeContent error, file.path: c:\work\Stingray\FirefoxSimulator\gaia\build_stage\smart-system\locales-obj\fxa\fxa_module.en-US.json
[utils-xpc] parent file object exists: false

I guess that root cause would be in utils.writeContent() [1] since it doesn't create corresponded folder for the given path.

I don't have a proper Windows environment currently but you could give it a try by modifying writeContent() for utils-node.js at [2] and replacing it with fs.outputFileSync(file.path, content); directly. Try to run `make RUN_ON_NODE=1` again.

If it works for you, a patch is welcome!

[1] https://github.com/mozilla-b2g/gaia/blob/99eb3b3f7a07c7152f63fe2c1da01b5092efd90c/build/utils-xpc.js#L123-L124

[2] https://github.com/mozilla-b2g/gaia/blob/99eb3b3f7a07c7152f63fe2c1da01b5092efd90c/build/utils-node.js#L483
Flags: needinfo?(mantaroh)
(Assignee)

Comment 5

2 years ago
Thanks Ricky.

I found the cause of this phenomenon. It is wrong replacement of locales path.[1]
The build was succeed when modified those replacement.

[1] https://github.com/mozilla-b2g/gaia/blob/99eb3b3f7a07c7152f63fe2c1da01b5092efd90c/build/webapp-optimize.js#L664

Thanks.
Assignee: nobody → mantaroh
Status: NEW → ASSIGNED
Flags: needinfo?(mantaroh)
Summary: The custom-build tv simulator can't launch on MinGW. → Gaia build failed to create the l10n file on MinGW.
Created attachment 8722231 [details] [review]
[gaia] mantaroh:master > mozilla-b2g:master
(Assignee)

Updated

2 years ago
Attachment #8722231 - Flags: review?(rchien)
Comment on attachment 8722231 [details] [review]
[gaia] mantaroh:master > mozilla-b2g:master

I haven't test it on Windows but it works on OS X. I believe that you've fixed the issue on MinGW. LGTM and Thank you Mantaroh :)
Attachment #8722231 - Flags: review?(rchien) → review+
Remember to fix the nit I've commented on Github.
(Assignee)

Comment 9

2 years ago
Thanks Ricky.

(In reply to Ricky Chien [:rickychien] from comment #8)
> Remember to fix the nit I've commented on Github.
Fixed comment #8.
Keywords: checkin-needed
(Assignee)

Comment 10

2 years ago
Hi Ricky.

I don't have a check-in privilege for Gaia. Could you please land it?
Flags: needinfo?(rchien)
Sure!

Landed in master:

https://github.com/mozilla-b2g/gaia/commit/70a1dec55ce9fcb9c52918ac51dff8ccaf21f7a9
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(rchien)
Resolution: --- → FIXED
(Assignee)

Comment 12

2 years ago
Thank you!!
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.