site  contact  subhomenews

Part 2, LibreOffice compiled in OE

April 24, 2017 — BarryK
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:

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:

In I took out:

To get rid of postgresql, edit
remove postgresql line from here, in
insert this configure option:
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

insert this configure option:

added dep to

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!


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.

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

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

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.

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

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:

Tags: oe