http://www.openembedded.org/api.php?action=feedcontributions&user=Egwhoi&feedformat=atomOpenembedded.org - User contributions [en]2024-03-28T18:23:07ZUser contributionsMediaWiki 1.29.0http://www.openembedded.org/index.php?title=OEandYourDistro&diff=1203OEandYourDistro2009-04-14T15:25:38Z<p>Egwhoi: Added instructions for fixing more build problems with Ubuntu 8.10</p>
<hr />
<div>See [[Required software]] for the list of the software required by Openembedded.<br />
<br />
= Using OpenEmbedded on Linux systems =<br />
<br />
== deb-based distributions ==<br />
<br />
The easiest way is via [http://blog.leggewie.org/?p=39 apt-get'able Openembedded] which will pull the OE meta-data for you and keep it up-to-date. Plus, it makes sure all necessary software for cross-compilation is installed. Easy as 1-2-3.<br />
<br />
=== Debian ===<br />
<br />
If this is not correct in lenny+ please change this page<br />
<br />
==== Mandatory packages ====<br />
<br />
apt-get install ccache sed wget cvs subversion git-core \<br />
coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \<br />
gawk python-pysqlite2 diffstat help2man<br />
<br />
'''Git'''<br />
<br />
On debian you may have to run <br />
<br />
update-alternatives --config git (as root)<br />
<br />
and select /usr/bin/git-scm to provide git instead of /usr/bin/git.transition. This is not necessary in sid<br />
<br />
==== Supplimentary packages ====<br />
<br />
<pre><nowiki><br />
apt-get install libxml2-utils xmlto python-psyco<br />
</nowiki></pre><br />
<br />
<br />
OPTIONAL: these packages and their dependencies need to be installed in order to build the bitbake documentation (warning: over 160MB of installed packages).<br />
<br />
<pre><nowiki><br />
apt-get install docbook<br />
</nowiki></pre><br />
This package is necessary to build some packages (in particular the esound documentation needs it).<br />
<br />
=== Ubuntu ===<br />
<br />
Ubuntu is based on Debian and instructions above for [[#deb-based distributions|Debian]] apply here as well. Make sure that you have the universe repositories in your apt configuration.<br />
<br />
* Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" -- however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call "''sudo dpkg-reconfigure dash''" and select No when it asks you to install dash as /bin/sh.<br />
* You can also install Psyco Python JIT compiler to speed up BitBake. Psyco works on 32-bit x86 platforms only. "''aptitude install python-psyco''<br />
<br />
Ubuntu 8.10 (Intrepid) introduced a change to the default compiler flags. This is likely to cause build failures. Its possible to fix this behaviour by adding the following line to your local.conf file:<br />
<br />
<pre><nowiki> BUILD_CPPFLAGS += "-Wno-format-security -U_FORTIFY_SOURCE" </nowiki></pre><br />
<br />
You could also add these flags to the BUILD_CPPFLAGS variable in bitbake.conf, but typically you should never edit the bitbake.conf directly.<br />
<br />
If that change doesn't resolve all the build failures, you can use an older version of gcc (4.1). To install and use gcc 4.1, type the following commands in a terminal:<br />
<br />
<pre>sudo apt-get install gcc-4.1 g++-4.1<br />
sudo rm /usr/bin/gcc<br />
sudo rm /usr/bin/g++<br />
sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc<br />
sudo ln -s /usr/bin/g++-4.1 /usr/bin/g++<br />
</pre><br />
<br />
You can switch back to the current version of gcc (4.3 in Ubuntu Intrepid as of 2009/04/13) by issuing the following commands:<br />
<br />
<pre>sudo rm /usr/bin/gcc<br />
sudo rm /usr/bin/g++<br />
sudo ln -s /usr/bin/gcc-4.3 /usr/bin/gcc<br />
sudo ln -s /usr/bin/g++-4.3 /usr/bin/g++<br />
</pre><br />
<br />
If you still get an error in the dbus package, try adding the following to <tt>~/gumstix/gumstix-oe/tmp/work/i686-linux/dbus/dbus-sysdeps-unix.c</tt> after the preexisting includes and macros:<br />
<br />
<pre>struct ucred {<br />
unsigned int pid;<br />
unsigned int uid;<br />
unsigned int gid;<br />
};<br />
</pre><br />
<br />
And, if you still have a problem with sumversion.c, edit (replacing <tt>xxxxxx</tt> with connex, verdex, or basix, as appropriate) <tt>~/gumstix/gumstix-oe/tmp/work/gumstix-custom-xxxxxx-angstrom-linux-gnueabi/gumstix-kernel-2.6.21-r1/linux-2.6.21/scripts/mod/sumversion.c</tt> and add the following line after the other include statements:<br />
<br />
<pre>#include <limits.h></pre><br />
<br />
For more information, check out [http://www.nabble.com/Ubuntu-8.10-and-Open-Embeded-td21136352.html this discussion]. Thanks to Na'Tosha for the above fixes.<br />
<br />
<br />
== rpm-based distributions ==<br />
<br />
=== Mandriva Linux ===<br />
<br />
Follow the Debian instructions, only using `urpmi` instead of `apt-get install`. Also, `ccache` is not an official Mandriva package. You can find it in the contrib section of any Mandriva mirror or seach for it using the Mandriva Club rpm database [http://rpms.mandrakeclub.com]. You may need libpythonV.V-devel for bitbake setup instead of python-dev.<br />
If you're building a 2.6 kernel, you also need the glibc-static-devel package.<br />
<br />
with Mandriva Linux 2006, you need to issue the following command:<br />
<br />
<pre><nowiki><br />
urpmi python python-devel python-psyco ccache patch m4 sed bison make wget bzip2 \<br />
cvs gawk glibc-devel gcc-c++ subversion sharutils coreutils docbook-utils openjade \<br />
quilt pcre-devel unzip glibc-static-devel<br />
</nowiki></pre><br />
<br />
=== openSUSE instructions ===<br />
<br />
Use zypper to install the required packages:<br />
<br />
zypper in subversion git python help2man diffstat wget gcc gcc-c++ libstdc++ glibc-devel<br />
<br />
These packages may be useful as well: ccache, bison and [http://software.opensuse.org/search?baseproject=ALL&p=1&q=gcc33 gcc33] (for faster build using ASSUME_PROVIDED), gtk2-devel (in case your build will fail on missing gdk-pixbuf-csource), bc (for collie kernel), ncurses-devel (if you want to call kernel menuconfig). python psyco package is optional.<br />
<br />
=== Fedora ===<br />
<br />
==== Fedora Core 2/3 ====<br />
Much of the following is probably already installed, but you can check with the following commands. You may want to use the yum.conf located at http://www.fedorafaq.org/. Note, this has not been tested yes as I am in the process of setting up a development environment.<br />
<br />
<pre><nowiki> yum install python patch m4 sed make docbook* openjade glibc-devel xmlto</nowiki></pre><br />
<br />
* `yum install ccache` (not required, also not a FC3 package)<br />
<br />
* psyco: Download psyco-1.4-src.tar.gz (or later) and extract it. Go to the psycho top-level directory and run: `python setup.py install`.<br />
<br />
* patch: FC3 default version should be enough. Optionally, install SuSe 9.1 package of it.<br />
<br />
==== Fedora Core 4 ====<br />
Almost all required packages for Openembedded are available in Fedora Core 4 and the Fedora Extras for Core 4. You can download them from <http://download.fedora.redhat.com/pub/fedora/linux/core> and <http://download.fedora.redhat.com/pub/fedora/linux/extras>. Check <http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4> for updates on the Core 4 packages.<br />
<br />
Apart from the usual (native) development packages like gcc and binutils, you should check that you have the following RPM's installed: <br />
<br />
* bison<br />
* ccache (not required, but advised to speed up building)<br />
* docbook* packages<br />
* libpcre<br />
* m4<br />
* make<br />
* openjade<br />
* patch<br />
* PyQt<br />
* python<br />
* python-psyco<br />
* sed<br />
* xmlto<br />
* quilt (not required as OE builds it by itself, but install it if you want to use gquilt)<br />
<br />
Use apt, synaptic, up2date or yum to automagically retrieve these packages or download and install them manually (lots of work).<br />
<br />
==== Fedora Core 5/6 ====<br />
<br />
Commands I used to install OE pre-requisites on FC5/6<br />
<br />
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).<br />
<br />
<pre><nowiki><br />
su -c "yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch gcc gcc-c++ python-sqlite2 help2man"<br />
</nowiki></pre><br />
<br />
or download the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm (may be out of date).<br />
<br />
then do<br />
<br />
<pre><nowiki><br />
su -c "yum localinstall openembedded-essential-1.1-1.noarch.rpm"<br />
</nowiki></pre><br />
<br />
<br />
There are also rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ pending a later version in Extras, currently 1.6.0.<br />
<br />
Update - Current FC6 version is patch-2.5.4-29.2.2 as of this writing and works-for-me (see revision history for build instructions if current patch does not work for you).<br />
<br />
I didn't install SGML tools. Please add if you know how<br />
<br />
Update - Since about 2002 sgml-tools has apparently been replaced by linuxdoc-tools for FC.<br />
<br />
==== Fedora 7 ====<br />
<br />
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).<br />
<br />
<pre><nowiki><br />
su -c "yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man perl-ExtUtils-MakeMaker"<br />
</nowiki></pre><br />
<br />
(if this is hard to copy from this HTML page, go to edit mode and copy from editor)<br />
<br />
=== CentOS 4.4 / Red Hat Enterprise Linux 4 ===<br />
May also work for true EL4 or Scientific Linux - another RHEL rebuild<br />
<br />
Even with several optional and 3rd party yum repos enabled (centosplus, kbsingh, RPMforge/Dag, Dries) a number of required packages are too old or unavailable for CentOS4. [It should be possible to use other package managers including apt/synaptic, up2date, and smart to get the required packages. The following assumes yum.]<br />
<br />
I re-built the following SRPMS (with "$ rpmbuild --rebuild ..."):<br />
* boost-1.33.1-10.fc5.src.rpm<br />
* bitbake-1.6.2-1.src.rpm (Latest tarball from http://developer.berlios.de/projects/bitbake/ + modified spec from bitbake-1.6.0-2.fc7.src.rpm)<br />
<br />
Might also want to try the rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ - I have not.<br />
<br />
Extra requirements for the builds included rpmdevtools, xmlto, and lynx.<br />
<br />
I put packages in a local repo so I can do "yum install ...", otherwise can do "yum localinstall foo.1.2.3.noarch.rpm ...". It may be necessary to temporarily set "gpgcheck=0" in /etc/yum.conf to avoid complaints about unsigned packages.<br />
<br />
For EL4 texi2html is available from the tetex package, currently tetex-2.0.2-22.EL4.7<br />
<br />
Note that the the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm<br />
should work except that it depends on texi2html.<br />
<br />
Instead as root do<br />
<br />
<pre><nowiki><br />
# yum install bison ccache coreutils cvs docbook-utils gawk git-core \<br />
python quilt rpmlib sed subversion tetex texinfo unzip wget<br />
</nowiki></pre><br />
<br />
I ended up with the following set of relevant packages after several iterations of building/updating to get "bitbake nano" to complete successfully:<br />
<br />
* python-2.3.4-14.3<br />
* m4-1.4.1-16<br />
* make-3.80-6.EL4<br />
* wget-1.10.2-0.40E<br />
* curl-7.12.1-8.rhel4<br />
* ftp-0.17-22<br />
* cvs-1.11.17-9.RHEL4<br />
* subversion-1.4.3-0.1.el4.rf<br />
* tar-1.14-12.RHEL4<br />
* bzip2-1.0.2-13.EL4.3<br />
* gzip-1.3.3-16.rhel4<br />
* unzip-5.51-7<br />
* python-psyco-1.5-3.el4.kb<br />
* ccache-2.4-1.2.el4.rf<br />
* perl-5.8.5-36.RHEL4<br />
* texinfo-4.7-5.el4.2<br />
* tetex-2.0.2-22.EL4.7<br />
* diffstat-1.34-0_6.el4.at<br />
* openjade-1.3.2-16_9.el4.at<br />
* docbook-style-dsssl-1.78-4<br />
* docbook-style-xsl-1.65.1-2<br />
* docbook-dtds-1.0-25<br />
* docbook-utils-0.6.14-4<br />
* sed-4.1.2-5.EL4<br />
* bison-1.875c-2<br />
* bc-1.06-17.1<br />
* glibc-devel-2.3.4-2.25<br />
* gcc-3.4.6-3<br />
* binutils-2.15.92.0.2-21<br />
* pcre-4.5-3.2.RHEL4<br />
* pcre-devel-4.5-3.2.RHEL4<br />
* git-1.4.4.2-2.el4.kb<br />
* bitbake-1.6.2-1<br />
<br />
== other Linux distributions ==<br />
<br />
=== Gentoo instructions ===<br />
<pre><nowiki><br />
emerge -n \<br />
psyco \<br />
ccache \<br />
patch \<br />
make \<br />
sed \<br />
dev-lang/python \<br />
m4 \<br />
bison \<br />
cvs \<br />
openjade \<br />
quilt \<br />
sgmltools-lite \<br />
docbook-xml-dtd \<br />
docbook-dsssl-stylesheets \<br />
xmlto \<br />
docbook-sgml-utils \<br />
libpcre \<br />
boost \<br />
subversion \<br />
texi2html \<br />
pysqlite<br />
</nowiki></pre><br />
<br />
Then follow the instructions in [[Getting started]] for obtaining bitbake and start the build.<br />
<br />
=== Ark Linux 2007.1 ===<br />
[http://www.arklinux.org/ Ark Linux] is a modern distribution well suited for Openembedded development. Footprint only 2.1G.<br />
<br />
Required steps:<br />
<br />
1) install required packages<br />
<pre><nowiki><br />
apt-get install devel-core diffstat texi2html cvs subversion git texinfo psyco python-devel python-encodings python-sqlite<br />
</nowiki></pre><br />
<br />
2) upgrade<br />
<pre><nowiki><br />
apt-get update<br />
apt-get upgrade <br />
<br />
The following packages will be REPLACED:<br />
texi2html (by tetex-texi2html)<br />
The following NEW packages will be installed:<br />
tetex-texi2html<br />
</nowiki></pre><br />
<br />
3) help2man<br />
<br />
help2man is missing from the ArkLinux repositories. The [http://www.gnu.org/software/help2man/ sources] must be configured, compiled and installed. The compilation of help2man requires the installation of some additional packages:<br />
<br />
apt-get install gettext-devel gettext-tools perl-Locale-gettext<br />
<br />
4) finally create your OE tree and provide bitbake (see [[Getting started]] instructions)<br />
<br />
=== Arch Linux (Duke) ===<br />
<br />
Most of the packages are available in the repositories.<br />
<br />
<pre><nowiki><br />
sudo pacman -S psyco ccache patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml xmlto pcre boost jade git texinfo<br />
</nowiki></pre><br />
<br />
In Arch Linux the install command is in /bin/install. Since most of Linux distribution assume that install is located in /usr/bin/install, you have to create a symlink:<br />
<br />
<pre><nowiki><br />
sudo ln -s /bin/install /usr/bin/install<br />
</nowiki></pre><br />
<br />
You can build BitBake by using this PKGBUILD:<br />
<pre><nowiki><br />
pkgname=bitbake<br />
pkgver=1.8.4<br />
pkgrel=1<br />
pkgdesc="A simple tool for task execution derived from Gentoo's portage"<br />
url="http://developer.berlios.de/projects/bitbake/"<br />
arch=('i686')<br />
license=('GPL' 'custom')<br />
depends=('python')<br />
source=(http://download.berlios.de/bitbake/${pkgname}-${pkgver}.tar.gz)<br />
md5sums=('508d9a61c635d469be8facc95151158b')<br />
<br />
build() {<br />
cd ${startdir}/src/${pkgname}-${pkgver}<br />
python setup.py install --root=${startdir}/pkg<br />
<br />
# Install vim extensions<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/ftdetect/bitbake.vim \<br />
${startdir}/pkg/usr/share/vim/ftplugin/bitbake.vim<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/syntax/bitbake.vim \<br />
${startdir}/pkg/usr/share/vim/syntax/bitbake.vim<br />
<br />
# Handle MIT license<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/doc/COPYING.MIT \<br />
${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING.MIT<br />
}<br />
</nowiki></pre><br />
<br />
= Using OpenEmbedded on FreeBSD and other NON Linux Systems =<br />
<br />
to be done, maybe there is some information in the [http://oe.linuxtog.org/wiki old wiki]<br />
<br />
== FreeBSD ==<br />
<br />
* Python == /usr/ports/lang/python<br />
* GNU Patch == /usr/ports/devel/patch<br />
* GNU m4 == /usr/ports/devel/m4<br />
* GNU make == /usr/ports/devel/gmake<br />
* wget == /usr/ports/ftp/wget<br />
* Psyco JIT Compiler == /usr/ports/devel/py-psyco<br />
* ccache == /usr/ports/devel/ccache<br />
* GNU sed == /usr/ports/textproc/gsed<br />
* Bison == /usr/ports/devel/bison<br />
* GCC 2.95.3 == /usr/ports/lang/gcc295<br />
* bc == already in FreeBSD<br />
* PyQt == /usr/ports/x11-toolkits/py-qt<br />
* glibc headers (ignore)<br />
* subversion == /usr/ports/devel/subversion<br />
* git == /usr/ports/devel/git<br />
* pcre == /usr/ports/devel/pcre<br />
<br />
Ports has also has these: fileutils, jade, docbook, dsssl-docbook-modular, sgmltools<br />
<br />
== Using OpenEmbedded on Mac OS X ==<br />
<br />
By default OS X uses a filesystem that is '''not''' case sensitive. You need to ensure that at least your tmp directory is on a case sensitive filesystem or you may come across various packages that break, including the Linux kernel! These steps were carried out on a early 32 bit 10.5/Intel Mac - the install order matters for a couple of packages as does having them installed in a more normal location.<br />
<br />
# Register at [https://connect.apple.com ADC] and download and install Xcode<br />
# Compile and install [http://www.gnu.org/software/gettext/ GNU gettext]<br />
# Using CPAN install Locale::gettext<br />
# Compile and install [http://www.gnu.org/software/help2man/ help2man 1.29] - newer versions will not build without hacks<br />
# Compile and install [http://www.gnu.org/software/wget/ wget], [http://www.gnu.org/software/gawk/ gawk], [http://www.gnu.org/software/coreutils/ coreutils] and [http://git-scm.com/ git] - wget appears to not work if you install it in /usr/local so use --prefix=/usr also note OS X provides a different version of mktemp which functions differently, be careful not to overwrite this as OS X might need it<br />
# If you are on a 32 bit Mac you can of course install [http://psyco.sourceforge.net/ psyco]<br />
# Fixup your PATH variable for your build user so that /usr/local/bin (or where ever coreutils etc is installed) comes before the OS X version in /usr/bin<br />
# Install GNU sed 3.0.2, this will give you a version of sed that allows you to build sed 4.1.5 - you will need to overwrite the one provided by OS X with --prefix=/usr and ensure you are using 4.1.5 not 3.0.2 as 3.0.2 does not provide various options you need<br />
# Install getopt from [http://software.frodo.looijaard.name/getopt/download.php here] - modify WITHOUT_GETTEXT=0 to WITHOUT_GETTEXT=1 in the Makefile and add -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) to the line beginning with CPPFLAGS=<br />
<br />
Now follow the Getting Started OpenEmbedded wiki guide. Unfortunately there are various issues building on OS X that will most likely prevent the toolchain from building.<br />
<br />
Unfinished - old wiki link appears to be dead.<br />
<br />
= Using OpenEmbedded on Windows/Cygwin Systems =<br />
<br />
<br />
Building Openembedded on Windows is currently unsupported, but [http://oe.linuxtogo.org/wiki/BuildOnCygwin work is in progress] to support buidling of meta-toolchain.bb on Windows/Cygwin hosts.</div>Egwhoihttp://www.openembedded.org/index.php?title=OEandYourDistro&diff=1199OEandYourDistro2009-04-13T14:43:02Z<p>Egwhoi: </p>
<hr />
<div>See [[Required software]] for the list of the software required by Openembedded.<br />
<br />
= Using OpenEmbedded on Linux systems =<br />
<br />
== deb-based distributions ==<br />
<br />
The easiest way is via [http://blog.leggewie.org/?p=39 apt-get'able Openembedded] which will pull the OE meta-data for you and keep it up-to-date. Plus, it makes sure all necessary software for cross-compilation is installed. Easy as 1-2-3.<br />
<br />
=== Debian ===<br />
<br />
If this is not correct in lenny+ please change this page<br />
<br />
==== Mandatory packages ====<br />
<br />
apt-get install ccache sed wget cvs subversion git-core \<br />
coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils \<br />
gawk python-pysqlite2 diffstat help2man<br />
<br />
'''Git'''<br />
<br />
On debian you may have to run <br />
<br />
update-alternatives --config git (as root)<br />
<br />
and select /usr/bin/git-scm to provide git instead of /usr/bin/git.transition. This is not necessary in sid<br />
<br />
==== Supplimentary packages ====<br />
<br />
<pre><nowiki><br />
apt-get install libxml2-utils xmlto python-psyco<br />
</nowiki></pre><br />
<br />
<br />
OPTIONAL: these packages and their dependencies need to be installed in order to build the bitbake documentation (warning: over 160MB of installed packages).<br />
<br />
<pre><nowiki><br />
apt-get install docbook<br />
</nowiki></pre><br />
This package is necessary to build some packages (in particular the esound documentation needs it).<br />
<br />
=== Ubuntu ===<br />
<br />
Ubuntu is based on Debian and instructions above for [[#deb-based distributions|Debian]] apply here as well. Make sure that you have the universe repositories in your apt configuration.<br />
<br />
* Check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" -- however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call "''sudo dpkg-reconfigure dash''" and select No when it asks you to install dash as /bin/sh.<br />
* You can also install Psyco Python JIT compiler to speed up BitBake. Psyco works on 32-bit x86 platforms only. "''aptitude install python-psyco''<br />
<br />
Ubuntu 8.10 (Intrepid) introduced a change to the default compiler flags. This is likely to cause build failures. Its possible to fix this behaviour by adding the following line to your local.conf file:<br />
<br />
<pre><nowiki> BUILD_CPPFLAGS += "-Wno-format-security -U_FORTIFY_SOURCE" </nowiki></pre><br />
<br />
You could also add these flags to the BUILD_CPPFLAGS variable in bitbake.conf, but typically you should never edit the bitbake.conf directly.<br />
<br />
If that change doesn't resolve all the build failures, you can use an older version of gcc (4.1). To install and use gcc 4.1, type the following commands in a terminal:<br />
<br />
<pre><nowiki>sudo apt-get install gcc-4.1 g++-4.1<br />
sudo rm /usr/bin/gcc<br />
sudo rm /usr/bin/g++<br />
sudo ln -s /usr/bin/gcc-4.1 /usr/bin/gcc<br />
sudo ln -s /usr/bin/g++-4.1 /usr/bin/g++<br />
</nowiki></pre><br />
<br />
You can switch back to the current version of gcc (4.3 in Ubuntu Intrepid as of 2009/04/13) by issuing the following commands:<br />
<br />
<pre><nowiki>sudo rm /usr/bin/gcc<br />
sudo rm /usr/bin/g++<br />
sudo ln -s /usr/bin/gcc-4.3 /usr/bin/gcc<br />
sudo ln -s /usr/bin/g++-4.3 /usr/bin/g++<br />
</nowiki></pre><br />
<br />
== rpm-based distributions ==<br />
<br />
=== Mandriva Linux ===<br />
<br />
Follow the Debian instructions, only using `urpmi` instead of `apt-get install`. Also, `ccache` is not an official Mandriva package. You can find it in the contrib section of any Mandriva mirror or seach for it using the Mandriva Club rpm database [http://rpms.mandrakeclub.com]. You may need libpythonV.V-devel for bitbake setup instead of python-dev.<br />
If you're building a 2.6 kernel, you also need the glibc-static-devel package.<br />
<br />
with Mandriva Linux 2006, you need to issue the following command:<br />
<br />
<pre><nowiki><br />
urpmi python python-devel python-psyco ccache patch m4 sed bison make wget bzip2 \<br />
cvs gawk glibc-devel gcc-c++ subversion sharutils coreutils docbook-utils openjade \<br />
quilt pcre-devel unzip glibc-static-devel<br />
</nowiki></pre><br />
<br />
=== openSUSE instructions ===<br />
<br />
Use zypper to install the required packages:<br />
<br />
zypper in subversion git python help2man diffstat wget gcc gcc-c++ libstdc++ glibc-devel<br />
<br />
These packages may be useful as well: ccache, bison and [http://software.opensuse.org/search?baseproject=ALL&p=1&q=gcc33 gcc33] (for faster build using ASSUME_PROVIDED), gtk2-devel (in case your build will fail on missing gdk-pixbuf-csource), bc (for collie kernel), ncurses-devel (if you want to call kernel menuconfig). python psyco package is optional.<br />
<br />
=== Fedora ===<br />
<br />
==== Fedora Core 2/3 ====<br />
Much of the following is probably already installed, but you can check with the following commands. You may want to use the yum.conf located at http://www.fedorafaq.org/. Note, this has not been tested yes as I am in the process of setting up a development environment.<br />
<br />
<pre><nowiki> yum install python patch m4 sed make docbook* openjade glibc-devel xmlto</nowiki></pre><br />
<br />
* `yum install ccache` (not required, also not a FC3 package)<br />
<br />
* psyco: Download psyco-1.4-src.tar.gz (or later) and extract it. Go to the psycho top-level directory and run: `python setup.py install`.<br />
<br />
* patch: FC3 default version should be enough. Optionally, install SuSe 9.1 package of it.<br />
<br />
==== Fedora Core 4 ====<br />
Almost all required packages for Openembedded are available in Fedora Core 4 and the Fedora Extras for Core 4. You can download them from <http://download.fedora.redhat.com/pub/fedora/linux/core> and <http://download.fedora.redhat.com/pub/fedora/linux/extras>. Check <http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4> for updates on the Core 4 packages.<br />
<br />
Apart from the usual (native) development packages like gcc and binutils, you should check that you have the following RPM's installed: <br />
<br />
* bison<br />
* ccache (not required, but advised to speed up building)<br />
* docbook* packages<br />
* libpcre<br />
* m4<br />
* make<br />
* openjade<br />
* patch<br />
* PyQt<br />
* python<br />
* python-psyco<br />
* sed<br />
* xmlto<br />
* quilt (not required as OE builds it by itself, but install it if you want to use gquilt)<br />
<br />
Use apt, synaptic, up2date or yum to automagically retrieve these packages or download and install them manually (lots of work).<br />
<br />
==== Fedora Core 5/6 ====<br />
<br />
Commands I used to install OE pre-requisites on FC5/6<br />
<br />
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).<br />
<br />
<pre><nowiki><br />
su -c "yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch gcc gcc-c++ python-sqlite2 help2man"<br />
</nowiki></pre><br />
<br />
or download the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm (may be out of date).<br />
<br />
then do<br />
<br />
<pre><nowiki><br />
su -c "yum localinstall openembedded-essential-1.1-1.noarch.rpm"<br />
</nowiki></pre><br />
<br />
<br />
There are also rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ pending a later version in Extras, currently 1.6.0.<br />
<br />
Update - Current FC6 version is patch-2.5.4-29.2.2 as of this writing and works-for-me (see revision history for build instructions if current patch does not work for you).<br />
<br />
I didn't install SGML tools. Please add if you know how<br />
<br />
Update - Since about 2002 sgml-tools has apparently been replaced by linuxdoc-tools for FC.<br />
<br />
==== Fedora 7 ====<br />
<br />
This long command will ensure all pre-requisites are installed (patch is 2.5.4, not 2.5.9, but appears to work).<br />
<br />
<pre><nowiki><br />
su -c "yum install python m4 make wget curl ftp cvs subversion tar bzip2 gzip unzip python-psyco ccache perl texinfo texi2html diffstat openjade docbook-style-dsssl docbook-style-xsl docbook-dtds docbook-utils sed bison bc glibc-devel gcc binutils pcre pcre-devel git quilt groff linuxdoc-tools patch linuxdoc-tools gcc gcc-c++ help2man perl-ExtUtils-MakeMaker"<br />
</nowiki></pre><br />
<br />
(if this is hard to copy from this HTML page, go to edit mode and copy from editor)<br />
<br />
=== CentOS 4.4 / Red Hat Enterprise Linux 4 ===<br />
May also work for true EL4 or Scientific Linux - another RHEL rebuild<br />
<br />
Even with several optional and 3rd party yum repos enabled (centosplus, kbsingh, RPMforge/Dag, Dries) a number of required packages are too old or unavailable for CentOS4. [It should be possible to use other package managers including apt/synaptic, up2date, and smart to get the required packages. The following assumes yum.]<br />
<br />
I re-built the following SRPMS (with "$ rpmbuild --rebuild ..."):<br />
* boost-1.33.1-10.fc5.src.rpm<br />
* bitbake-1.6.2-1.src.rpm (Latest tarball from http://developer.berlios.de/projects/bitbake/ + modified spec from bitbake-1.6.0-2.fc7.src.rpm)<br />
<br />
Might also want to try the rpm and src.rpm packages of bitbake 1.6.2 at http://www.openembedded.org/dl/packages/rpm/ - I have not.<br />
<br />
Extra requirements for the builds included rpmdevtools, xmlto, and lynx.<br />
<br />
I put packages in a local repo so I can do "yum install ...", otherwise can do "yum localinstall foo.1.2.3.noarch.rpm ...". It may be necessary to temporarily set "gpgcheck=0" in /etc/yum.conf to avoid complaints about unsigned packages.<br />
<br />
For EL4 texi2html is available from the tetex package, currently tetex-2.0.2-22.EL4.7<br />
<br />
Note that the the metapackage http://www.openembedded.org/dl/packages/rpm/openembedded-essential-1.1-1.noarch.rpm<br />
should work except that it depends on texi2html.<br />
<br />
Instead as root do<br />
<br />
<pre><nowiki><br />
# yum install bison ccache coreutils cvs docbook-utils gawk git-core \<br />
python quilt rpmlib sed subversion tetex texinfo unzip wget<br />
</nowiki></pre><br />
<br />
I ended up with the following set of relevant packages after several iterations of building/updating to get "bitbake nano" to complete successfully:<br />
<br />
* python-2.3.4-14.3<br />
* m4-1.4.1-16<br />
* make-3.80-6.EL4<br />
* wget-1.10.2-0.40E<br />
* curl-7.12.1-8.rhel4<br />
* ftp-0.17-22<br />
* cvs-1.11.17-9.RHEL4<br />
* subversion-1.4.3-0.1.el4.rf<br />
* tar-1.14-12.RHEL4<br />
* bzip2-1.0.2-13.EL4.3<br />
* gzip-1.3.3-16.rhel4<br />
* unzip-5.51-7<br />
* python-psyco-1.5-3.el4.kb<br />
* ccache-2.4-1.2.el4.rf<br />
* perl-5.8.5-36.RHEL4<br />
* texinfo-4.7-5.el4.2<br />
* tetex-2.0.2-22.EL4.7<br />
* diffstat-1.34-0_6.el4.at<br />
* openjade-1.3.2-16_9.el4.at<br />
* docbook-style-dsssl-1.78-4<br />
* docbook-style-xsl-1.65.1-2<br />
* docbook-dtds-1.0-25<br />
* docbook-utils-0.6.14-4<br />
* sed-4.1.2-5.EL4<br />
* bison-1.875c-2<br />
* bc-1.06-17.1<br />
* glibc-devel-2.3.4-2.25<br />
* gcc-3.4.6-3<br />
* binutils-2.15.92.0.2-21<br />
* pcre-4.5-3.2.RHEL4<br />
* pcre-devel-4.5-3.2.RHEL4<br />
* git-1.4.4.2-2.el4.kb<br />
* bitbake-1.6.2-1<br />
<br />
== other Linux distributions ==<br />
<br />
=== Gentoo instructions ===<br />
<pre><nowiki><br />
emerge -n \<br />
psyco \<br />
ccache \<br />
patch \<br />
make \<br />
sed \<br />
dev-lang/python \<br />
m4 \<br />
bison \<br />
cvs \<br />
openjade \<br />
quilt \<br />
sgmltools-lite \<br />
docbook-xml-dtd \<br />
docbook-dsssl-stylesheets \<br />
xmlto \<br />
docbook-sgml-utils \<br />
libpcre \<br />
boost \<br />
subversion \<br />
texi2html \<br />
pysqlite<br />
</nowiki></pre><br />
<br />
Then follow the instructions in [[Getting started]] for obtaining bitbake and start the build.<br />
<br />
=== Ark Linux 2007.1 ===<br />
[http://www.arklinux.org/ Ark Linux] is a modern distribution well suited for Openembedded development. Footprint only 2.1G.<br />
<br />
Required steps:<br />
<br />
1) install required packages<br />
<pre><nowiki><br />
apt-get install devel-core diffstat texi2html cvs subversion git texinfo psyco python-devel python-encodings python-sqlite<br />
</nowiki></pre><br />
<br />
2) upgrade<br />
<pre><nowiki><br />
apt-get update<br />
apt-get upgrade <br />
<br />
The following packages will be REPLACED:<br />
texi2html (by tetex-texi2html)<br />
The following NEW packages will be installed:<br />
tetex-texi2html<br />
</nowiki></pre><br />
<br />
3) help2man<br />
<br />
help2man is missing from the ArkLinux repositories. The [http://www.gnu.org/software/help2man/ sources] must be configured, compiled and installed. The compilation of help2man requires the installation of some additional packages:<br />
<br />
apt-get install gettext-devel gettext-tools perl-Locale-gettext<br />
<br />
4) finally create your OE tree and provide bitbake (see [[Getting started]] instructions)<br />
<br />
=== Arch Linux (Duke) ===<br />
<br />
Most of the packages are available in the repositories.<br />
<br />
<pre><nowiki><br />
sudo pacman -S psyco ccache patch make sed python m4 bison cvs quilt sgmltools-lite docbook-xml xmlto pcre boost jade git texinfo<br />
</nowiki></pre><br />
<br />
In Arch Linux the install command is in /bin/install. Since most of Linux distribution assume that install is located in /usr/bin/install, you have to create a symlink:<br />
<br />
<pre><nowiki><br />
sudo ln -s /bin/install /usr/bin/install<br />
</nowiki></pre><br />
<br />
You can build BitBake by using this PKGBUILD:<br />
<pre><nowiki><br />
pkgname=bitbake<br />
pkgver=1.8.4<br />
pkgrel=1<br />
pkgdesc="A simple tool for task execution derived from Gentoo's portage"<br />
url="http://developer.berlios.de/projects/bitbake/"<br />
arch=('i686')<br />
license=('GPL' 'custom')<br />
depends=('python')<br />
source=(http://download.berlios.de/bitbake/${pkgname}-${pkgver}.tar.gz)<br />
md5sums=('508d9a61c635d469be8facc95151158b')<br />
<br />
build() {<br />
cd ${startdir}/src/${pkgname}-${pkgver}<br />
python setup.py install --root=${startdir}/pkg<br />
<br />
# Install vim extensions<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/ftdetect/bitbake.vim \<br />
${startdir}/pkg/usr/share/vim/ftplugin/bitbake.vim<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/contrib/vim/syntax/bitbake.vim \<br />
${startdir}/pkg/usr/share/vim/syntax/bitbake.vim<br />
<br />
# Handle MIT license<br />
install -D -m644 ${startdir}/src/${pkgname}-${pkgver}/doc/COPYING.MIT \<br />
${startdir}/pkg/usr/share/licenses/${pkgname}/COPYING.MIT<br />
}<br />
</nowiki></pre><br />
<br />
= Using OpenEmbedded on FreeBSD and other NON Linux Systems =<br />
<br />
to be done, maybe there is some information in the [http://oe.linuxtog.org/wiki old wiki]<br />
<br />
== FreeBSD ==<br />
<br />
* Python == /usr/ports/lang/python<br />
* GNU Patch == /usr/ports/devel/patch<br />
* GNU m4 == /usr/ports/devel/m4<br />
* GNU make == /usr/ports/devel/gmake<br />
* wget == /usr/ports/ftp/wget<br />
* Psyco JIT Compiler == /usr/ports/devel/py-psyco<br />
* ccache == /usr/ports/devel/ccache<br />
* GNU sed == /usr/ports/textproc/gsed<br />
* Bison == /usr/ports/devel/bison<br />
* GCC 2.95.3 == /usr/ports/lang/gcc295<br />
* bc == already in FreeBSD<br />
* PyQt == /usr/ports/x11-toolkits/py-qt<br />
* glibc headers (ignore)<br />
* subversion == /usr/ports/devel/subversion<br />
* git == /usr/ports/devel/git<br />
* pcre == /usr/ports/devel/pcre<br />
<br />
Ports has also has these: fileutils, jade, docbook, dsssl-docbook-modular, sgmltools<br />
<br />
== Using OpenEmbedded on Mac OS X ==<br />
<br />
By default OS X uses a filesystem that is '''not''' case sensitive. You need to ensure that at least your tmp directory is on a case sensitive filesystem or you may come across various packages that break, including the Linux kernel! These steps were carried out on a early 32 bit 10.5/Intel Mac - the install order matters for a couple of packages as does having them installed in a more normal location.<br />
<br />
# Register at [https://connect.apple.com ADC] and download and install Xcode<br />
# Compile and install [http://www.gnu.org/software/gettext/ GNU gettext]<br />
# Using CPAN install Locale::gettext<br />
# Compile and install [http://www.gnu.org/software/help2man/ help2man 1.29] - newer versions will not build without hacks<br />
# Compile and install [http://www.gnu.org/software/wget/ wget], [http://www.gnu.org/software/gawk/ gawk], [http://www.gnu.org/software/coreutils/ coreutils] and [http://git-scm.com/ git] - wget appears to not work if you install it in /usr/local so use --prefix=/usr also note OS X provides a different version of mktemp which functions differently, be careful not to overwrite this as OS X might need it<br />
# If you are on a 32 bit Mac you can of course install [http://psyco.sourceforge.net/ psyco]<br />
# Fixup your PATH variable for your build user so that /usr/local/bin (or where ever coreutils etc is installed) comes before the OS X version in /usr/bin<br />
# Install GNU sed 3.0.2, this will give you a version of sed that allows you to build sed 4.1.5 - you will need to overwrite the one provided by OS X with --prefix=/usr and ensure you are using 4.1.5 not 3.0.2 as 3.0.2 does not provide various options you need<br />
# Install getopt from [http://software.frodo.looijaard.name/getopt/download.php here] - modify WITHOUT_GETTEXT=0 to WITHOUT_GETTEXT=1 in the Makefile and add -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) to the line beginning with CPPFLAGS=<br />
<br />
Now follow the Getting Started OpenEmbedded wiki guide. Unfortunately there are various issues building on OS X that will most likely prevent the toolchain from building.<br />
<br />
Unfinished - old wiki link appears to be dead.<br />
<br />
= Using OpenEmbedded on Windows/Cygwin Systems =<br />
<br />
<br />
Building Openembedded on Windows is currently unsupported, but [http://oe.linuxtogo.org/wiki/BuildOnCygwin work is in progress] to support buidling of meta-toolchain.bb on Windows/Cygwin hosts.</div>Egwhoi