{"id":418,"date":"2012-04-10T01:03:46","date_gmt":"2012-04-09T17:03:46","guid":{"rendered":"http:\/\/guoh.ai\/lifelog\/?p=418"},"modified":"2012-04-12T09:37:19","modified_gmt":"2012-04-12T01:37:19","slug":"build-android-on-ubuntu-11-10-x64","status":"publish","type":"post","link":"https:\/\/guoh.ai\/lifelog\/2012\/04\/build-android-on-ubuntu-11-10-x64\/","title":{"rendered":"\u5728Ubuntu 11.10 X64\u4e0a\u7f16\u8bd1Android\u6e90\u7801"},"content":{"rendered":"<p>\u521d\u6b21\u5728Ubuntu 11.10 X64\u4e0a\u7f16\u8bd1ICS\u7684\u6e90\u7801\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u7f16\u8bd1\u9519\u8bef\uff0c\u4e0d\u8fc7\u89e3\u51b3\u65b9\u6cd5\u4e5f\u4e0d\u662f\u5f88\u96be\u3002<br \/>\n\u9996\u5148\u8981\u6e05\u695aAndroid\u5b98\u65b9\u662f\u652f\u6301\u5728\u8fd9\u4e2a\u7cfb\u7edf\u4e0a\u7f16\u8bd1Android\u7684\u6e90\u7801\u7684\uff0c\u6240\u4ee5\u53ea\u8981\u8bbe\u7f6e\u6b63\u786e\u90fd\u662f\u80fd\u7f16\u8bd1\u6210\u529f\u7684\u3002<br \/>\n\u5177\u4f53\u7684\u53c2\u8003\u6b64\u5904<a href=\"http:\/\/source.android.com\/source\/initializing.html\" target=\"_blank\">http:\/\/source.android.com\/source\/initializing.html<\/a><\/p>\n<p>\u6709\u4e2a\u4f9d\u8d56\u5305lib32readline5-dev\u5df2\u7ecf\u88ab\u5e9f\u5f03\u4e86\uff0c\u4f46\u662f\u53ef\u4ee5\u7528lib32readline-gplv2-dev\u66ff\u4ee3\u3002<br \/>\n\u5982\u679c\u7f3a\u5c11\u4ec0\u4e48\u4f9d\u8d56\u5305\u7684\u8bdd\u4e00\u822c\u5b89\u88c5\u4e00\u4e0b\u5c31\u53ef\u4ee5\u4e86\uff0c\u5927\u591a\u90fd\u662f\u6bd4\u8f83\u7b80\u5355\u7684<\/p>\n<p>\u56e0\u4e3a\u5386\u53f2\u539f\u56e0\u6709\u4e9b\u4ee3\u7801\u53ea\u80fd\u7528\u8001\u7248\u672c\u7684gcc(g++)\u7f16\u8bd1\uff0c\u800c11.10\u4e0a\u9ed8\u8ba4\u7684\u7248\u672c\u53c8\u662f\u6bd4\u8f83\u65b0\u76844.6\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5b89\u88c5\u8001\u7248\u672c\u7684gcc(g++)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo apt-get install gcc-4.4\r\nsudo apt-get install g++-4.4<\/pre>\n<p>\u7f51\u7edc\u4e0a\u6709\u4e9b\u8d44\u6599\u5199\u7684\u662f\u53ef\u4ee5\u901a\u8fc7update-alternatives\u6765\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u7684gcc(g++)\uff0c\u901a\u8fc7\u8bbe\u7f6e4.4\u7248\u672c\u4e3a\u9ed8\u8ba4\u503c\uff0c\u6765\u8fbe\u5230\u9ed8\u8ba4\u542f\u75284.4\u6765\u7f16\u8bd1\u3002<br \/>\n\u4e5f\u6709\u901a\u8fc7\u624b\u52a8\u4fee\u6539\u7b26\u53f7\u94fe\u63a5\u6307\u5411gcc(g++)\u6765\u542f\u75284.4\u7684\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\u6211\u4eec\u5728\u8fd9\u91cc\u4e0d\u9700\u8981\u8fd9\u4e48\u9ebb\u70e6\uff0c\u53ea\u8981\u673a\u5668\u4e0a\u67094.4\u7684\u7f16\u8bd1\u5668\uff0c\u5e76\u4e14\u5728PATH\u76ee\u5f55\u4e2d<br \/>\n\u53ea\u9700\u8981\u7b80\u5355\u7684\u6307\u5b9amake\u7684\u53c2\u6570\u5c31\u53ef\u4ee5\u4f7f\u7528\u6307\u5b9a\u7248\u672c\u7684\u7f16\u8bd1\u5668\u4e86<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ . build\/envsetup.sh<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ lunch full-eng<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ make CC=gcc-4.4 CXX=g++-4.4 -j4<\/pre>\n<p>\u5c31\u6bd4<a href=\"http:\/\/source.android.com\/source\/building.html\" target=\"_blank\">http:\/\/source.android.com\/source\/building.html<\/a>\u4e0a\u7684\u7f16\u8bd1\u6307\u4ee4\u591a\u4e86\u4e24\u4e2a\u53c2\u6570<br \/>\n<strong>CC=gcc-4.4 CXX=g++-4.4<\/strong><br \/>\n\u662f\u4e0d\u662f\u5f88\u7b80\u5355\uff1f<\/p>\n<p>\u7f16\u8bd1\u7684\u65f6\u5019\u53ef\u80fd\u4f1a\u51fa\u4e9b\u9519\u8bef\uff0c\u6bd4\u5982<br \/>\ng++-4.4: selected multilib &#8217;32&#8217; not installed<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo apt-get install g++-4.4-multilib<\/pre>\n<p>fatal error: GL\/glx.h: No such file or directory<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo apt-get install libgl1-mesa-dev<\/pre>\n<p>\u5e38\u89c1\u7684\u9519\u8bef\u53ef\u4ee5\u53c2\u8003<a href=\"http:\/\/blog.csdn.net\/sunboy_2050\/article\/details\/6977386\" target=\"_blank\">http:\/\/blog.csdn.net\/sunboy_2050\/article\/details\/6977386<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u6b21\u5728Ubuntu 11.10 X64\u4e0a\u7f16\u8bd1ICS\u7684\u6e90\u7801\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u7f16\u8bd1\u9519\u8bef\uff0c\u4e0d\u8fc7\u89e3\u51b3\u65b9\u6cd5\u4e5f\u4e0d\u662f\u5f88\u96be\u3002 \u9996\u5148\u8981\u6e05\u695aAndroid\u5b98\u65b9\u662f\u652f\u6301\u5728\u8fd9\u4e2a\u7cfb\u7edf\u4e0a\u7f16\u8bd1Android\u7684\u6e90\u7801\u7684\uff0c\u6240\u4ee5\u53ea\u8981\u8bbe\u7f6e\u6b63\u786e\u90fd\u662f\u80fd\u7f16\u8bd1\u6210\u529f\u7684\u3002 \u5177\u4f53\u7684\u53c2\u8003\u6b64\u5904http:\/\/source.android.com\/source\/initializing.html \u6709\u4e2a\u4f9d\u8d56\u5305lib32readline5-dev\u5df2\u7ecf\u88ab\u5e9f\u5f03\u4e86\uff0c\u4f46\u662f\u53ef\u4ee5\u7528lib32readline-gplv2-dev\u66ff\u4ee3\u3002 \u5982\u679c\u7f3a\u5c11\u4ec0\u4e48\u4f9d\u8d56\u5305\u7684\u8bdd\u4e00\u822c\u5b89\u88c5\u4e00\u4e0b\u5c31\u53ef\u4ee5\u4e86\uff0c\u5927\u591a\u90fd\u662f\u6bd4\u8f83\u7b80\u5355\u7684 \u56e0\u4e3a\u5386\u53f2\u539f\u56e0\u6709\u4e9b\u4ee3\u7801\u53ea\u80fd\u7528\u8001\u7248\u672c\u7684gcc(g++)\u7f16\u8bd1\uff0c\u800c11.10\u4e0a\u9ed8\u8ba4\u7684\u7248\u672c\u53c8\u662f\u6bd4\u8f83\u65b0\u76844.6\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5b89\u88c5\u8001\u7248\u672c\u7684gcc(g++) sudo apt-get install gcc-4.4 sudo apt-get install g++-4.4 \u7f51\u7edc\u4e0a\u6709\u4e9b\u8d44\u6599\u5199\u7684\u662f\u53ef\u4ee5\u901a\u8fc7update-alternatives\u6765\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u7684gcc(g++)\uff0c\u901a\u8fc7\u8bbe\u7f6e4.4\u7248\u672c\u4e3a\u9ed8\u8ba4\u503c\uff0c\u6765\u8fbe\u5230\u9ed8\u8ba4\u542f\u75284.4\u6765\u7f16\u8bd1\u3002 \u4e5f\u6709\u901a\u8fc7\u624b\u52a8\u4fee\u6539\u7b26\u53f7\u94fe\u63a5\u6307\u5411gcc(g++)\u6765\u542f\u75284.4\u7684\u3002 \u5b9e\u9645\u4e0a\u6211\u4eec\u5728\u8fd9\u91cc\u4e0d\u9700\u8981\u8fd9\u4e48\u9ebb\u70e6\uff0c\u53ea\u8981\u673a\u5668\u4e0a\u67094.4\u7684\u7f16\u8bd1\u5668\uff0c\u5e76\u4e14\u5728PATH\u76ee\u5f55\u4e2d \u53ea\u9700\u8981\u7b80\u5355\u7684\u6307\u5b9amake\u7684\u53c2\u6570\u5c31\u53ef\u4ee5\u4f7f\u7528\u6307\u5b9a\u7248\u672c\u7684\u7f16\u8bd1\u5668\u4e86 $ . build\/envsetup.sh $ lunch full-eng $ make CC=gcc-4.4 CXX=g++-4.4 -j4 \u5c31\u6bd4http:\/\/source.android.com\/source\/building.html\u4e0a\u7684\u7f16\u8bd1\u6307\u4ee4\u591a\u4e86\u4e24\u4e2a\u53c2\u6570 CC=gcc-4.4 CXX=g++-4.4 \u662f\u4e0d\u662f\u5f88\u7b80\u5355\uff1f \u7f16\u8bd1\u7684\u65f6\u5019\u53ef\u80fd\u4f1a\u51fa\u4e9b\u9519\u8bef\uff0c\u6bd4\u5982 g++-4.4: selected multilib &#8217;32&#8217; not installed sudo apt-get install g++-4.4-multilib fatal error: GL\/glx.h: No such file or directory sudo &hellip; <a href=\"https:\/\/guoh.ai\/lifelog\/2012\/04\/build-android-on-ubuntu-11-10-x64\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u5728Ubuntu 11.10 X64\u4e0a\u7f16\u8bd1Android\u6e90\u7801<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gfmr_meta_descriptions":[],"_gfmr_multilingual_taxonomy_terms":[],"footnotes":""},"categories":[7,6],"tags":[],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-android","category-linux"],"_links":{"self":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":5,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":424,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/418\/revisions\/424"}],"wp:attachment":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}