{"id":426,"date":"2015-09-12T16:20:46","date_gmt":"2015-09-12T14:20:46","guid":{"rendered":"http:\/\/paguilar.org\/?p=426"},"modified":"2015-09-12T16:20:46","modified_gmt":"2015-09-12T14:20:46","slug":"missing-requirements-when-building-with-buildroot","status":"publish","type":"post","link":"https:\/\/paguilar.org\/?p=426","title":{"rendered":"Missing requirements when building with Buildroot"},"content":{"rendered":"<p><a href=\"http:\/\/buildroot.uclibc.org\" target=\"_blank\">Buildroot<\/a> is a quite useful tool when working with small-to-medium embedded systems. It helps you to create the toolchain, the rootfs and, of course, building the kernel and hundreds of packages normally found in standard Linux distributions.<\/p>\n<p>For using Buildroot you need several mandatory and optional requirements in your host machine. They&#8217;re listed in the <a href=\"http:\/\/buildroot.uclibc.org\/downloads\/manual\/manual.html#requirement\" target=\"_blank\">Buildroot manual<\/a>. However, there are some sub-requirements that aren&#8217;t mentioned since they belong to a <em>global<\/em> requirement. For example the package <em>Thread\/Queue.pm<\/em> is a Perl module that belongs to the global requirement Perl.<\/p>\n<p>The lack of one of these packages can cause building errors that can confuse new users since it could not be clear if it&#8217;s an issue with the package that it&#8217;s been built or if it&#8217;s an issue with the host machine that is missing something.<\/p>\n<p>Normally, when you see an error like the following, you can be sure that there is a missing Perl module in your host machine:<\/p>\n<pre lang=bash>\r\nCan't locate Thread\/Queue.pm in @INC (you may need to install the Thread::Queue module) (@INC contains: \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/share\/automake-1.15 \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/lib\/perl \/usr\/local\/lib64\/perl5 \/usr\/local\/share\/perl5 \/usr\/lib64\/perl5\/vendor_perl \/usr\/share\/perl5\/vendor_perl \/usr\/lib64\/perl5 \/usr\/share\/perl5 .) at \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/bin\/automake line 55.\r\nBEGIN failed--compilation aborted at \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/bin\/automake line 58.\r\nautoreconf: \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/bin\/automake failed with exit status: 2\r\npackage\/pkg-generic.mk:146: recipe for target '\/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/build\/alsa-lib-1.0.29\/.stamp_configured' failed\r\nmake[1]: *** [\/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/build\/alsa-lib-1.0.29\/.stamp_configured] Error 2\r\nMakefile:36: recipe for target '_all' failed\r\nmake: *** [_all] Error 2\r\n<\/pre>\n<p>In this example, Buildroot fails to build the ALSA lib since it requires the Perl module <em>Thread\/Queue.pm<\/em> that is missing.<br \/>\nYou can easily install it, assuming that you already installed the CPAN module, by typing:<\/p>\n<pre lang=bash>\r\n$ cpan\r\ncpan shell -- CPAN exploration and modules installation (v2.00)\r\nEnter 'h' for help.\r\n\r\ncpan[1]> install Thread\/Queue.pm\r\n<\/pre>\n<p>This kind of issues can also be present with other requirements, such as Python that can be installed with the <em>pip<\/em> utility.<\/p>\n<p>Generally speaking, when you see a message like this one, there&#8217;s a good chance that the problem is a missing requirement:<\/p>\n<pre lang=bash>\r\nautoreconf: \/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/host\/usr\/bin\/automake failed with exit status: 2\r\npackage\/pkg-generic.mk:146: recipe for target '\/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/build\/alsa-lib-1.0.29\/.stamp_configured' failed\r\nmake[1]: *** [\/home\/projects\/sunxi\/buildroot-2015.08.1\/output\/build\/alsa-lib-1.0.29\/.stamp_configured] Error 2\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Buildroot is a quite useful tool when working with small-to-medium embedded systems. It helps you to create the toolchain, the rootfs and, of course, building the kernel and hundreds of packages normally found in standard Linux distributions. For using Buildroot you need several mandatory and optional requirements in your host machine. They&#8217;re listed in the\u2026 <span class=\"read-more\"><a href=\"https:\/\/paguilar.org\/?p=426\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,6,45],"tags":[],"class_list":["post-426","post","type-post","status-publish","format-standard","hentry","category-buildroot","category-compiling","category-linux"],"_links":{"self":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=426"}],"version-history":[{"count":6,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/426\/revisions"}],"predecessor-version":[{"id":432,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/426\/revisions\/432"}],"wp:attachment":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}