{"id":178,"date":"2015-04-23T08:50:10","date_gmt":"2015-04-23T14:50:10","guid":{"rendered":"http:\/\/blogs.gentoo.org\/calchan\/?p=178"},"modified":"2021-03-03T03:08:24","modified_gmt":"2021-03-03T10:08:24","slug":"the-answer-to-the-ultimate-question-of-qemu-chroots-argument-pages-and-binutils","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/calchan\/2015\/04\/23\/the-answer-to-the-ultimate-question-of-qemu-chroots-argument-pages-and-binutils\/","title":{"rendered":"The Answer to the Ultimate Question of QEMU chroots, argument pages, and binutils"},"content":{"rendered":"<p>is 46.<\/p>\n<p>In <a href=\"http:\/\/blogs.gentoo.org\/calchan\/2015\/03\/11\/binsh-argument-list-too-long\/\" title=\"\/bin\/sh: Argument list too long\" target=\"_blank\" rel=\"noopener noreferrer\">a previous post<\/a> I described how to patch QEMU to allow building binutils in a cross chroot. In there I increased the maximal number of argument pages to 64 because I was just after a quick fix. Today I finally bisected that, and the result is you need at least 46 for MAX_ARG_PAGES in order for binutils to build.<\/p>\n<p>In <a href=\"https:\/\/bugs.gentoo.org\/show_bug.cgi?id=533882\" title=\"Gentoo bug #533882\" target=\"_blank\" rel=\"noopener noreferrer\">bug 533882<\/a> it is discussed that LibreOffice requires an even larger number of pages. It is possible other packages also require such a large limit. Note that it may not be a good idea to increase the MAX_ARG_PAGES limit to an absurdly high number and leave it at that. A large amount of memory will be allocated in the target&#8217;s memory space and that may be a problem.<\/p>\n<p>Hopefully QEMU switches to a dynamic limit someday like the kernel. In the meantime, my upcoming <code>crossroot<\/code> tool will offer a way to more easily deal with that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>is 46. In a previous post I described how to patch QEMU to allow building binutils in a cross chroot. In there I increased the maximal number of argument pages to 64 because I was just after a quick fix. Today I finally bisected that, and the result is you need at least 46 for &hellip; <a href=\"https:\/\/blogs.gentoo.org\/calchan\/2015\/04\/23\/the-answer-to-the-ultimate-question-of-qemu-chroots-argument-pages-and-binutils\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Answer to the Ultimate Question of QEMU chroots, argument pages, and binutils<\/span><\/a><\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/posts\/178"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":9,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/posts\/178\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/calchan\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}