Error Building Angstrom

Hello everyone. I am following the build instructions listed here:

http://www.angstrom-distribution.org/building-angstrom

The tail end of the "bitbake base-image ; bitbake console-image x11-
image " results in:

NOTE: Running task 373 of 6116 (ID: 3923, /home/bjrosas/OE/
openembedded/recipes/xorg-util/util-macros_1.1.6.bb, do_unpack)
NOTE: Applying patch 'gcc-4.0.2-e300c2c3.patch' (recipes/gcc/gcc-4.3.1/
gcc-4.0.2-e300c2c3.patch)
NOTE: Applying patch 'gcc-arm-frename-registers.patch' (recipes/gcc/
gcc-4.3.1/gcc-arm-frename-registers.patch)
NOTE: Applying patch 'PR-36500-fix-neon.patch' (recipes/gcc/gcc-4.3.1/
gcc-release-branch/PR-36500-fix-neon.patch)
NOTE: Applying patch 'gcc-4.3.1-
SYSROOT_CFLAGS_FOR_TARGET.patch' (recipes/gcc/gcc-4.3.1/gcc-4.3.1-
SYSROOT_CFLAGS_FOR_TARGET.patch)
NOTE: Applying patch 'gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch' (recipes/
gcc/gcc-4.3.1/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch)
NOTE: Unpacking ../downloads/util-macros-1.1.6.tar.gz to ../angstrom-
dev/work/armv7a-angstrom-linux-gnueabi/util-macros-1_1.1.6-r0/
NOTE: Applying patch 'zecke-xgcc-cpp.patch' (recipes/gcc/gcc-4.3.1/
zecke-xgcc-cpp.patch)
NOTE: Applying patch 'gcc-flags-for-build.patch' (recipes/gcc/
gcc-4.3.1/gcc-flags-for-build.patch)
NOTE: Applying patch 'zecke-no-host-includes.patch' (recipes/gcc/
gcc-4.3.1/zecke-no-host-includes.patch)
ERROR: function do_compile failed
ERROR: see log in /home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-
native-0.10.3-r1/temp/log.do_compile.10923
NOTE: Task failed: /home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-
native-0.10.3-r1/temp/log.do_compile.10923
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/bjrosas/OE/openembedded/recipes/qemu/qemu-
native_0.10.3.bb do_compile failed
NOTE: Running task 374 of 6116 (ID: 3933, /home/bjrosas/OE/
openembedded/recipes/xorg-util/util-macros_1.1.6.bb,
do_distribute_sources)
NOTE: Running task 375 of 6116 (ID: 3924, /home/bjrosas/OE/
openembedded/recipes/xorg-util/util-macros_1.1.6.bb, do_patch)
ERROR: Task 1367 (/home/bjrosas/OE/openembedded/recipes/qemu/qemu-
native_0.10.3.bb, do_compile) failed
NOTE: Waiting for 3 active tasks to finish
NOTE: 1: /home/bjrosas/OE/openembedded/recipes/gettext/gettext-
native_0.17.bb, do_compile (21223)
NOTE: 2: /home/bjrosas/OE/openembedded/recipes/xorg-util/util-
macros_1.1.6.bb, do_patch (24459)
NOTE: 3: /home/bjrosas/OE/openembedded/recipes/xorg-util/util-
macros_1.1.6.bb, do_distribute_sources (24410)
NOTE: Waiting for 2 active tasks to finish
NOTE: 1: /home/bjrosas/OE/openembedded/recipes/gettext/gettext-
native_0.17.bb, do_compile (21223)
NOTE: 2: /home/bjrosas/OE/openembedded/recipes/xorg-util/util-
macros_1.1.6.bb, do_distribute_sources (24410)
NOTE: Waiting for 1 active tasks to finish
NOTE: 1: /home/bjrosas/OE/openembedded/recipes/gettext/gettext-
native_0.17.bb, do_compile (21223)
NOTE: Tasks Summary: Attempted 371 tasks of which 328 didn't need to
be rerun and 1 failed.
ERROR: '/home/bjrosas/OE/openembedded/recipes/qemu/qemu-
native_0.10.3.bb' failed

The error log:

/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
temp/log.do_compile.10923

lists the following error only:

/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/target-i386/translate.c: In function 'disas_insn':
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/target-i386/translate.c:7499: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make[1]: *** [translate.o] Error 1
make[1]: Leaving directory `/home/bjrosas/OE/angstrom-dev/work/i686-
linux/qemu-native-0.10.3-r1/qemu-0.10.3/x86_64-linux-user'
make: *** [subdir-x86_64-linux-user] Error 2
make: *** Waiting for unfinished jobs....
  CC armeb-linux-user/gdbstub-xml.o
  CC cris-linux-user/kqemu.o
  CC cris-linux-user/translate-all.o
  CC cris-linux-user/cpu-exec.o
  CC cris-linux-user/translate.o
  CC cris-linux-user/host-utils.o
  CC cris-linux-user/tcg/tcg.o
  CC m68k-linux-user/strace.o
  CC m68k-linux-user/mmap.o
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/mmap.c: In function 'mmap_frag':
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/mmap.c:255: warning: ignoring return value of
'pread', declared with attribute warn_unused_result
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/mmap.c: In function 'target_mmap':
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/mmap.c:472: warning: ignoring return value of
'pread', declared with attribute warn_unused_result
  CC m68k-linux-user/signal.o
  CC m68k-linux-user/path.o
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/path.c: In function 'new_entry':
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/linux-user/path.c:48: warning: ignoring return value of
'asprintf', declared with attribute warn_unused_result
  CC m68k-linux-user/thunk.o
  CC m68k-linux-user/elfload.o
  AR armeb-linux-user/libqemu.a
  CC cris-linux-user/tcg/tcg-runtime.o
  CC cris-linux-user/fpu/softfloat-native.o
  CC cris-linux-user/op_helper.o
  LINK armeb-linux-user/qemu-armeb
  CC m68k-linux-user/linuxload.o
  CC cris-linux-user/helper.o
  CC cris-linux-user/cris-dis.o
  CC cris-linux-user/disas.o
  CC m68k-linux-user/uaccess.o
  CC m68k-linux-user/envlist.o
  CC cris-linux-user/i386-dis.o
  CC m68k-linux-user/flatload.o
  CC cris-linux-user/gdbstub-xml.o
  CC m68k-linux-user/m68k-sim.o
make[1]: Leaving directory `/home/bjrosas/OE/angstrom-dev/work/i686-
linux/qemu-native-0.10.3-r1/qemu-0.10.3/armeb-linux-user'
  CC m68k-linux-user/m68k-semi.o
  CC m68k-linux-user/gdbstub.o
rm -f gdbstub-xml.c
/bin/sh /home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-
native-0.10.3-r1/qemu-0.10.3/feature_to_c.sh gdbstub-xml.c /home/
bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/gdb-xml/cf-core.xml /home/bjrosas/OE/angstrom-dev/work/
i686-linux/qemu-native-0.10.3-r1/qemu-0.10.3/gdb-xml/cf-fp.xml
  CC m68k-linux-user/exec.o
  AR cris-linux-user/libqemu.a
  LINK cris-linux-user/qemu-cris
  CC m68k-linux-user/kqemu.o
  CC m68k-linux-user/translate-all.o
  CC m68k-linux-user/cpu-exec.o
  CC m68k-linux-user/translate.o
  CC m68k-linux-user/host-utils.o
  CC m68k-linux-user/tcg/tcg.o
  CC m68k-linux-user/tcg/tcg-runtime.o
make[1]: Leaving directory `/home/bjrosas/OE/angstrom-dev/work/i686-
linux/qemu-native-0.10.3-r1/qemu-0.10.3/cris-linux-user'
  CC m68k-linux-user/fpu/softfloat.o
  CC m68k-linux-user/op_helper.o
  CC m68k-linux-user/helper.o
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/target-m68k/helper.c:346: warning: no previous prototype
for 'cpu_m68k_handle_mmu_fault'
/home/bjrosas/OE/angstrom-dev/work/i686-linux/qemu-native-0.10.3-r1/
qemu-0.10.3/target-m68k/helper.c:457: warning: no previous prototype
for 'helper_btest'
  CC m68k-linux-user/disas.o
  CC m68k-linux-user/i386-dis.o
  CC m68k-linux-user/m68k-dis.o
  CC m68k-linux-user/gdbstub-xml.o
  AR m68k-linux-user/libqemu.a
  LINK m68k-linux-user/qemu-m68k
make[1]: Leaving directory `/home/bjrosas/OE/angstrom-dev/work/i686-
linux/qemu-native-0.10.3-r1/qemu-0.10.3/m68k-linux-user'
FATAL: oe_runmake failed

I am using a VM in a Windows XP environment running Ubuntu 9.10. Any
help on this would be appreciated. Thanks.

Looks like your build is failing fairly early in the process. So, I would suspect something to do with the environment or the branch you are using (if non-standard). I just built this for the first time yesterday (and I am using a Windows 7 laptop with VMWare running Ubuntu karmic) following the same instructions you pointed out, plus installed the required package list found at http://wiki.openembedded.org/index.php/OEandYourDistro#Debian and though it took about 15 hours, it completed successfully.

I have three questions:
1. Did you install all the packages as listed (in the link I posted) (including python-psyco)?
2. Your build seems to have failed during build of qemu. In the initial stages, did it issue a warning that the value of /proc/sys/vm/mmap_min_addr is not 0? Did you change it?
3. I guess the setup script was modified correctly.

Regards,
Sri.

Hello Sri. I did not install those required packages. I will try that
first thing when I get back to my development PC. Another question
though, what do you mean by "setup script was modified correctly"?
Thanks.

Brandon

Yesterday build with the same instructions completed perfectly. I just want to mention that VM builds may take too long to get images in a reasonable time. I used Ubuntu 9.10 in a native environment to build console-image and x11-image.

2010/3/2 Brandon Rosas <bjrosas.junk@gmail.com>

what bitbake version do you use? I suggest you to delete the bitbake directory coming with git pull and get the latest bitbake version from the respective git repository. I did so and it worked just fine. Believe me, many problems come from the wrong bitbake version

2010/3/2 Brandon Rosas <bjrosas.junk@gmail.com>

I used the same instructions on a clean environment (no previous installations), in a VM-based Ubuntu hosted on a Windows 7 machine and the build completed successfully.

More specifically, here are the steps I followed (using a bash shell):

  1. Install needed software:
   aptitude install sed wget cvs subversion git-core coreutils unzip texi2html texinfo libsdl1.2-dev docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ \
   desktop-file-utils

   apt-get install libxml2-utils xmlto python-psyco

   apt-get install docbook

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.

  1. Install OE (I installed my stuff inside /opt/ folder, but you are free to use whatever directory you want):
   export OETREE="/opt/OE"

   mkdir -p ${OETREE} && cd ${OETREE}

   git clone git://git.openembedded.org/openembedded.git openembedded

   cd openembedded

   git checkout origin/stable/2009 -b stable/2009

   git pull
  1. Install the following script (copy-paste it to a file and run the command: source ) (Also, create the other directories build & downloads as necessary)
   export OETREE="/opt/OE"
   BBPATH=${OETREE}/:${OETREE}/build/:${OETREE}/openembedded/
   PKGDIR=${OETREE}/build/ 
   DL_DIR=${OETREE}/downloads
   echo Setting up dev env for Ångström
   if [ -z ${ORG_PATH} ] ; then
   	ORG_PATH=${PATH}
	export ORG_PATH
   fi
   if [ -z ${ORG_LD_LIBRARY_PATH} ] ; then
	ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
	export ORG_LD_LIBRARY_PATH
   fi
   PATH=${OETREE}/openembedded/bitbake/bin:${ORG_PATH}
   cd $PKGDIR
   LD_LIBRARY_PATH=
   export PATH LD_LIBRARY_PATH BBPATH
   export LANG=C
   export BB_ENV_EXTRAWHITE="MACHINE DISTRO OETREE ANGSTROM_MODE ANGSTROMLIBC LIBC"
   echo "Altered environment for OE Development"

  1. Setup the conf file:
   mkdir -p ${OETREE}/build/conf

   cp ${OETREE}/openembedded/contrib/angstrom/local.conf ${OETREE}/build/conf/
  1. Edit the file and add the line: “MACHINE = beagleboard” (without quotes ofcourse) to the end of the file

  2. Start Building:

   bitbake base-image ; bitbake console-image x11-image

Wait for around 15 hours (thats the time it took on my machine).

Good luck,

Regards,
Sri.

I was referring to the shell script that you need to create (copy-paste), modify (both OETREE base directory path and adding MACHINE variable) and 'source'. Please see my last mail for the script itself.
Also, Koen's instruction mention that the line to be added is: MACHINE ?= <boardname>
Since I wasn't aware of an assignment operator "?=", I used the normal one "MACHINE = beagleboard". The former might work too (I don't know), but the later is how I did it and got the build without any issues.

Regards,
Sri.

Note that this is a crash in the compiler, not merely something
failing to build. So there could be something wrong with the version
you're using, or the one OE builds (does it at this point?).

Often ICE's indicate faulty RAM too - gcc exercises hardware more than
most software. At least in the past this was the case.

Okay now I get another error. I ran the following which i beleive is
for the most part what you had suggested earlier:

sudo aptitude install sed wget cvs subversion git-core coreutils unzip
texi2html texinfo libsdl1.2-dev docbook-utils gawk python-pysqlite2
diffstat

help2man make gcc build-essential g++ desktop-file-utils

sudo apt-get install libxml2-utils xmlto python-psyco

sudo apt-get install docbook

export OETREE="${HOME}/OE"
mkdir -p ${OETREE}&& cd ${OETREE}
git clone git://git.openembedded.org/openembedded.git openembedded
cd openembedded
git checkout origin/stable/2009 -b stable/2009
git pull

mkdir -p ${OETREE}/build/conf
cp ${OETREE}/openembedded/contrib/angstrom/local.conf ${OETREE}/build/
conf/

  1. change bitbake to the latest
  2. increase RAM amount in VM

2010/3/3 NotZed <notzed@gmail.com>

After setting up a new Ubuntu VM and running the update packages
suggested by update manager and the specific updates listed by Sri and
continuing in the fashion listed in previous posts I was able to get
past the early error messages and it has since been running. I will
let everyone know if it completes successfully. Thanks.