Part 2, LibreOffice compiled in OE

I am documenting how I compiled LibreOffice in OpenEmbedded. Part 1 is the previous blog post:

One thing about that previous post. I changed the number of parallel processes to one. That is because I have an overheating problem with my laptop, but you might want leave those out, and it will default to using all CPU cores.

Setup OE environment
As explained in the previous post, folder "oe-project" has been created. There needs to be a bit of preliminary work before the actual build can take place...
# cd oe-project

# source ./oe-init-build-env buildQ

...working dir is now in buildQ

buildQ/conf/bblayers.conf, add the layers that we want:
/mnt/sda1/projects/oe/oe-project/meta \
/mnt/sda1/projects/oe/oe-project/meta-oe \
/mnt/sda1/projects/oe/oe-project/meta-python \
/mnt/sda1/projects/oe/oe-project/meta-office \

confirm layer is picked up:
# bitbake-layers show-layers

keep the downloaded src pkgs outside:
# ln -s ../../downloads downloads

edit buildQ/conf/local.conf:
change these lines:
MACHINE ??= "qemux86-64"
PACKAGE_CLASSES ?= "package_deb"


# in yocto, got an error when building initramfs, default maxsize is too small.
# INITRAMFS_MAXSIZE is set in meta/conf/bitbake.conf (= 131072 kb, 128MB).
# override here, 160MB:

# yocto/poky/meta/conf/bitbake.conf has this line:
# DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
# ...this could be edited, or insert this into build/conf/local.conf:

# want to add libreoffice. have already installed meta-office layer
DISTRO_FEATURES_append = " opengl"
IMAGE_INSTALL_append = " libreoffice"

I personally would prefer not to have 'pulseaudio'. Unfortunately, it is required to be there in some recipes in OE. Then there is the problem of the latest Firefox requiring it.
So, I have left 'pulseaudio' in the build for now.

Fix LibreOffice recipes
I am posting fixes to the recipes here, after failures occurred, so hopefully if someone follows my instructions, the build will just sail through.

The Libreoffice recipes specify two dependencies, 'clucene' and 'postgresql', however, these packages failed to build. So, I removed them from the LibreOffice recipes.
These are the two recipe files:


In I took out these two lines:
clucene-core \
--with-system-clucene \

In I took out:
clucene-core-native \
--with-system-clucene \

To get rid of postgresql, edit
remove postgresql line from here, in
gtk \
mariadb \
postgresql \
insert this configure option:
--disable-postgresql-sdbc \
and comment-out this line:
PACKAGECONFIG[postgresql] = "--enable-postgresql-sdbc --with-system-postgresql, --disable-postgresql-sdbc, postgresql"

Not there yet. Unpacking of libreoffice-native failed, reported that 'unzip' does not exist. Then, configuring, failed, reported something about 'neon' package not being in the repository.
To fix both of these:
have added these deps to

unzip-native \
neon-native \
insert this configure option:
--with-system-neon \

added dep to
unzip \

Start the build
Having already run that "source ./oe-init-build-env buildQ" command, "pwd" will show that you are now in the "buildQ" folder, and everything is setup ready to build. Do this:

# bitbake core-image-sato-sdk

If you get a failure somewhere, it may not be a show-stopper, and you can keep going with:

# bitbake --continue core-image-sato-sdk

Be prepared to wait a very long time!


OE Yocto fix   Posted on 26 Apr 2017, 19:06 by admin
I just remembered something. There was a mismatch between the meta-yocto and the OE downloads.

These files are required, but are missing:

I copied these files out of the 'morty' checkout, when I had downloaded yocto awhile back, following the yocto getting-started page:

Other OE checkouts   Posted on 26 Apr 2017, 18:48 by admin
Oh, might not have posted how to download the meta-browser layer:

# git clone git:// meta-browser --depth 1

Delete previous build   Posted on 26 Apr 2017, 18:40 by admin
If you have applied the Yocto changes and want to do a complete rebuild, delete the folders buildQ/tmp* and sstate-cache.

I did a "du -m" on that tmp folder, and was alarmed. It came to 121GB!!!

So, you need a partition with heaps of space.

Building Yocto Poky   Posted on 26 Apr 2017, 18:30 by admin
I decided to add the Yocto extensions to OpenEmbedded.

The reason is that I can then have MACHINE = "generics86-64" in local.conf, which is a more useful distro build than the "qemux86-64" that is available in OE.

Download Yocto
# git clone git:// meta-yocto --depth 1

Install Yocto
# cp -a downloads-oe/meta-yocto/* oe-project/
...note, leaves behind .templateconf, which is different from same name in target -- does that matter?
...yes, copy .templateconf
...note, also edit buildQ/conf/templateconf.cfg: change "meta/conf" to "meta-poky/conf"

Edit bblayers.conf

/mnt/sda1/projects/oe/oe-project/meta \
/mnt/sda1/projects/yocto/poky/meta-poky \
/mnt/sda1/projects/yocto/poky/meta-yocto-bsp \
/mnt/sda1/projects/oe/oe-project/meta-oe \
/mnt/sda1/projects/oe/oe-project/meta-python \
/mnt/sda1/projects/oe/oe-project/meta-networking \
/mnt/sda1/projects/oe/oe-project/meta-webserver \
/mnt/sda1/projects/oe/oe-project/meta-gnome \
/mnt/sda1/projects/oe/oe-project/meta-multimedia \
/mnt/sda1/projects/oe/oe-project/meta-browser \
/mnt/sda1/projects/oe/oe-project/meta-office \

Edit local.conf
MACHINE ??= "genericx86-64"

DISTRO_FEATURES_append = " opengl"
IMAGE_INSTALL_append = " streamripper pinpoint dhcpcd pure-ftpd pptp-linux rp-pppoe mtr hiawatha openbox gedit evince abiword gparted epiphany gphoto2 gimp firefox libreoffice"

Edit libreoffice recipes
See here:
Also, remove 'postgresql' dependency from the recipes, as it fails to compile.

# bitbake image-core-sato-sdk

LibreOffice bug report   Posted on 25 Apr 2017, 21:00 by admin
I have posted a bug report here:

This is a failure with packaging the 'glm' package.

I did have one other failure, will report that later.