mozilla

Compare Revisions

Building Firefox OS

Change Revisions

Revision 335279:

Revision 335279 by Gerv on

Revision 340735:

Revision 340735 by asasaki on

Title:
Building Boot to Gecko
Building Boot to Gecko
Slug:
Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko
Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko
Tags:
"B2G", "Firefox OS", "Build documentation"
"B2G", "Firefox OS", "Build documentation"
Content:

Revision 335279
Revision 340735
n89    <h2 id="Known_errors">n89    <h3 id="Building_multilocale">
90      Known errors90      Building multilocale
91    </h2>91    </h3>
92    <p>
93      To create a multilocale build, do the following:
94    </p>
95    <h4>
96      Gaia
97    </h4>
92    <ul>98    <ol>
99      <li>Determine which Gaia languages file to use. We're curre
 >ntly using <a href="http://hg.mozilla.org/integration/gaia-nightl
 >y/file/e2eed5263e77/shared/resources/languages-dev.json"><code>sh
 >ared/resources/languages-dev.json</code></a> and <a href="http://
 >hg.mozilla.org/integration/gaia-nightly/file/e2eed5263e77/shared/
 >resources/languages-all.json"><code>shared/resources/languages-al
 >l.json</code></a> as our Gaia languages files.
100      </li>
101      <li>Clone the appropriate locales from <a href="http://hg.m
 >ozilla.org/gaia-l10n">http://hg.mozilla.org/gaia-l10n</a> into a 
 >directory; we use <code>gaia-l10n/</code> . You'll need to clone 
 >a repo for each locale listed in the languages file.
102      </li>
103      <li>In your environment, set <code>LOCALE_BASEDIR</code> to
 > the absolute path of the directory in step 2. Set <code>LOCALES_
 >FILE</code> to the absolute path of the file in step 1.
104      </li>
105    </ol>For instance,
106    <pre>
107export LOCALE_BASEDIR=$PWD/gaia-l10n
108export LOCALES_FILE=gecko/gaia/shared/resources/languages-dev.jso
 >n
109</pre>
110    <h4>
111      Gecko
112    </h4>
113    <ol>
114      <li>Determine which Gecko languages file to use. We're curr
 >ently using <a href="http://hg.mozilla.org/releases/mozilla-b2g18
 >/file/default/b2g/locales/all-locales">b2g/locales/all-locales</a
 >> as our Gecko languages file.
115      </li>
116      <li>Clone the appropriate locales into a directory; this ca
 >n be <code>gecko-l10n/</code> .
117        <ul>
118          <li>For mozilla-central, use <a href="http://hg.mozilla
 >.org/l10n-central/">http://hg.mozilla.org/l10n-central/</a>
119          </li>
120          <li>For mozilla-aurora, use <a href="http://hg.mozilla.
 >org/releases/l10n/mozilla-aurora/">http://hg.mozilla.org/releases
 >/l10n/mozilla-aurora/</a>
121          </li>
122          <li>For mozilla-beta or mozilla-b2g18, use <a href="htt
 >p://hg.mozilla.org/releases/l10n/mozilla-beta/">http://hg.mozilla
 >.org/releases/l10n/mozilla-beta/</a>
123          </li>
124        </ul>
125      </li>
126      <li>Clone <a href="http://hg.mozilla.org/build/compare-loca
 >les">compare-locales</a>.
127      </li>
nn129        <p>
130          In your environment, set <code>L10NBASEDIR</code> to th
 >e absolute path of the directory in step 2. Set <code>MOZ_CHROME_
 >MULTILOCALE</code> to a string of space-delimited locales from st
 >ep 1.
131        </p>
132        <p>
133          Add the <code>compare-locales/scripts</code> dir to you
 >r <code>PATH</code>, and <code>compare-locales/lib</code> to your
 > <code>PYTHONPATH</code>.
134        </p>For instance,
135        <pre>
136export L10NBASEDIR=$PWD/gecko-l10n
137export MOZ_CHROME_MULTILOCALE="ja zh-TW"
138export PATH="$PATH:$PWD/compare-locales/scripts"
139export PYTHONPATH="$PWD/compare-locales/lib"
140</pre>
141        <p>
142          Once you have the above set up, you can run build.sh .
143        </p>
144        <p>
145          It looks like you can <a href="https://bugzilla.mozilla
 >.org/show_bug.cgi?id=818560#c9/">use .userconfig</a> as well.
146        </p>
147        <p>
148          These instructions may change as we smooth things out.
149        </p>
150        <h2 id="Known_errors">
151          Known errors
152        </h2>
153        <ul>
154          <li>
94        <h3 id="KeyedVector.h.3A193.3A31.3A_error.3A_indexOfKey_w155            <h3 id="KeyedVector.h.3A193.3A31.3A_error.3A_indexOfK
>as_not_declared_in_this_scope">>ey_was_not_declared_in_this_scope">
95          KeyedVector.h:193:31: error: indexOfKey was not declare156              KeyedVector.h:193:31: error: indexOfKey was not dec
>d in this scope>lared in this scope
96        </h3>157            </h3>
97      </li>158          </li>
98    </ul>159        </ul>
99    <p>160        <p>
100      This error appears when your gcc version is too recent. Ins161          This error appears when your gcc version is too recent.
>tall gcc/g++/g++-multilib 4.6.x versions.> Install gcc/g++/g++-multilib 4.6.x versions.
101    </p>162        </p>
102    <p>163        <p>
103      See <a href="/en-US/docs/Mozilla/Boot_to_Gecko/B2G_build_pr164          See <a href="/en-US/docs/Mozilla/Boot_to_Gecko/B2G_buil
>erequisites" title="en-US/docs/Mozilla/Boot_to_Gecko/B2G_build_pr>d_prerequisites" title="en-US/docs/Mozilla/Boot_to_Gecko/B2G_buil
>erequisites">set up your build system</a> for more information.>d_prerequisites">set up your build system</a> for more informatio
 >n.
104    </p>165        </p>
105    <div class="note">166        <div class="note">
106      <p>167          <p>
107        <strong>Community Note:</strong> It is possible to use gc168            <strong>Community Note:</strong> It is possible to us
>c 4.7.x with slight modifications to the B2G code (gcc will guide>e gcc 4.7.x with slight modifications to the B2G code (gcc will g
> you) but you won't get any help! Neither with modifying the code>uide you) but you won't get any help! Neither with modifying the 
> nor with bugs you encounter.>code nor with bugs you encounter.
108      </p>169          </p>
109    </div>170        </div>
110    <ul>171        <ul>
111      <li>172          <li>
112        <h3 id="arm-linux-androideabi-g.2B.2B.3A_Internal_error.3173            <h3 id="arm-linux-androideabi-g.2B.2B.3A_Internal_err
>A_Killed_(program_cc1plus)">>or.3A_Killed_(program_cc1plus)">
113          arm-linux-androideabi-g++: Internal error: Killed (prog174              arm-linux-androideabi-g++: Internal error: Killed (
>ram cc1plus)>program cc1plus)
114        </h3>175            </h3>
115      </li>176          </li>
116    </ul>177        </ul>
117    <p>178        <p>
118      If you see this message, it most likely means that are lack179          If you see this message, it most likely means that are 
>ing of free memory. Ensure having enough free memory before runni>lacking of free memory. Ensure having enough free memory before r
>ng <code>./build.sh</code>. It should run fine if you system has >unning <code>./build.sh</code>. It should run fine if you system 
>4GB of ram.>has 4GB of ram.
119    </p>180        </p>
120    <ul>181        <ul>
121      <li>182          <li>
122        <h3 id="If_you_get_build_errors_while_the_build_system_is183            <h3 id="If_you_get_build_errors_while_the_build_syste
>_running_tests">>m_is_running_tests">
123          If you get build errors while the build system is runni184              If you get build errors while the build system is r
>ng tests>unning tests
124        </h3>185            </h3>
125      </li>186          </li>
126    </ul>187        </ul>
127    <p>188        <p>
128      Sometimes (especially after build tool or operating system 189          Sometimes (especially after build tool or operating sys
>updates) you'll get weird errors like this when the build system >tem updates) you'll get weird errors like this when the build sys
>runs its post-build tests:>tem runs its post-build tests:
129    </p>190        </p>
130    <pre>191        <pre>
n140    <p>n201        <p>
141      In this situation, try deleting the <code>gaia/xulrunner-sd202          In this situation, try deleting the <code>gaia/xulrunne
>k</code> directory and re-pulling the code:>r-sdk</code> directory and re-pulling the code:
142    </p>203        </p>
143    <pre>204        <pre>
t146    <p>t207        <p>
147      This deletes the downloaded, precompiled copy of <a href="/208          This deletes the downloaded, precompiled copy of <a hre
>en-US/docs/XULRunner" title="/en-US/docs/XULRunner">XULRunner</a>>f="/en-US/docs/XULRunner" title="/en-US/docs/XULRunner">XULRunner
> that the build system retrieves automatically; on your next buil></a> that the build system retrieves automatically; on your next 
>d, a new copy of XULRunner will be automatically retrieved.>build, a new copy of XULRunner will be automatically retrieved.
148    </p>209        </p>
149    <h2 id="Next_steps">210        <h2 id="Next_steps">
150      Next steps211          Next steps
151    </h2>212        </h2>
152    <p>213        <p>
153      After building, your next step depends on whether you built214          After building, your next step depends on whether you b
> Boot to Gecko for the emulator or for a real mobile device; see >uilt Boot to Gecko for the emulator or for a real mobile device; 
>the following articles for details:>see the following articles for details:
154    </p>215        </p>
155    <ul>216        <ul>
156      <li>217          <li>
157        <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_218            <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_
>emulators" title="en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_>B2G_emulators" title="en-US/docs/Mozilla/Boot_to_Gecko/Using_the_
>emulators">Using the B2G emulators</a>>B2G_emulators">Using the B2G emulators</a>
158      </li>219          </li>
159      <li>220          <li>
160        <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_221            <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_
>desktop_client" title="en-US/docs/Mozilla/Boot_to_Gecko/Using_the>B2G_desktop_client" title="en-US/docs/Mozilla/Boot_to_Gecko/Using
>_B2G_desktop_client">Using the B2G desktop client</a>>_the_B2G_desktop_client">Using the B2G desktop client</a>
161      </li>222          </li>
162      <li>223          <li>
163        <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Installing_Boo224            <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Installing
>t_to_Gecko_on_a_mobile_device" title="en-US/docs/Mozilla/Boot_to_>_Boot_to_Gecko_on_a_mobile_device" title="en-US/docs/Mozilla/Boot
>Gecko/Installing_Boot_to_Gecko_on_a_mobile_device">Installing Boo>_to_Gecko/Installing_Boot_to_Gecko_on_a_mobile_device">Installing
>t to Gecko on a mobile device</a>> Boot to Gecko on a mobile device</a>
164      </li>225          </li>
165      <li>226          <li>
166        <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard" ti227            <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard
>tle="en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard">Installing Boot>" title="en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard">Installing 
> to Gecko on a pandaboard</a>>Boot to Gecko on a pandaboard</a>
167      </li>228          </li>
229        </ul>
230      </li>
168    </ul>231    </ol>

Back to History