Solved [SOLVED] LibreOffice 4.1.5 fails to build

I'm getting an error in building editors/libreoffice under FreeBSD 10.0.
Code:
root@Acer /u/p/e/libreoffice# make build
===>  Building for libreoffice-4.1.5_1
gmake[2]: Entering directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3'
Automatic fetching of external tarballs is disabled.
/usr/local/bin/gmake -j 2 -rsw -f /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/Makefile.gbuild
....
....
....
[build CMP] extensions/source/propctrlr/pcr
[build GAL] arrows
[build GAL] computers
[build GAL] diagrams
Work on gallery 'file://usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/Gallery/computers'
Existing themes: 0
Existing themes: 1
Failed to acquire theme
Work on gallery 'file://usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/Gallery/arrows'
Existing themes: 0
Existing themes: 1
Failed to acquire theme
gmake[3]: *** [//usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/Gallery/computers.done] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [//usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/Gallery/arrows.done] Error 1
gmake[3]: Leaving directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3'
gmake[2]: *** [build] Error 2
gmake[2]: Leaving directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3'
*** Error code 2
Stop.
make[1]: stopped in /usr/ports/editors/libreoffice
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/libreoffice

My LibreOffice configuration file:
Code:
    # This file is auto-generated by 'make config'.
# Options for libreoffice-4.1.5_1
_OPTIONS_READ=libreoffice-4.1.5_1
_FILE_COMPLETE_OPTIONS_LIST=CUPS DEBUG GNOME GTK2 GTK3 JAVA KDE4 MMEDIA PGSQL SDK SYSTRAY TEST VERBOSE WEBDAV
OPTIONS_FILE_SET+=CUPS
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=GNOME
OPTIONS_FILE_SET+=GTK2
OPTIONS_FILE_UNSET+=GTK3
OPTIONS_FILE_UNSET+=JAVA
OPTIONS_FILE_UNSET+=KDE4
OPTIONS_FILE_SET+=MMEDIA
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_UNSET+=SDK
OPTIONS_FILE_UNSET+=SYSTRAY
OPTIONS_FILE_UNSET+=TEST
OPTIONS_FILE_UNSET+=VERBOSE
OPTIONS_FILE_UNSET+=WEBDAV
uname -a:
Code:
FreeBSD Acer.no-ip.org 10.0-RELEASE FreeBSD 10.0-RELEASE #1 r261257: Wed Jan 29 20:45:13 PST 2014     root@Acer.no-ip.org:/usr/obj/usr/src/sys/ACER  amd64
/etc/make.conf:
Code:
CPUTYPE?=core2
.if ${.CURDIR}=="/usr/ports/editors/libreoffice"
WRKDIRPREFIX=/
.else
WRKDIRPREFIX=/ram
.endif
WITH_CCACHE_BUILD=yes
WITH_BDB_VER=6
QT4_OPTIONS= QGTKSTYLE
 
Re: LibreOffice 4.1.5 fails to build

It's hard to believe I'm the only one with this problem. There's still no response on the forums, or from the maintainer whom I emailed the same day. Here's a list of some of the things I tried but still keep coming back to the same error.
  • I ran make distclean (despite the fact that the checksums reported OK for the distfiles) prior to make build.
  • Building it without ccache (it took longer to come back to the same error).
  • Rebuilding all the ports reported from make pretty-print-build-depends-list (including adding devel/readline, databases/db48, and devel/ncurses from ports. I removed those three after this didn't work).
  • Removing the --disable-fetch-external option in the Makefile and then building (on the theory that "Failed to acquire themes" meant the build needed to fetch themes from the internet).
Each of these attempts took a very long time. LibreOffice has always been one of my overnight builds.
 
Re: LibreOffice 4.1.5 fails to build

When I have a problem building editors/libreoffice it's because I'm using a VPN and/or using devel/ccache - the latter fills the /ram filesystem up shortly after starting to build. Once I disable all of that I run portmaster editors/libreoffice and it usually compiles.
 
Re: LibreOffice 4.1.5 fails to build

Try it without the MMEDIA option. That is off here, and it built fine.

Run pkg_libchk -o to make sure no libraries are missing. Have you symlinked any old versions, ever? If so, remove that and fix those problems.

You have WITH_BDB_VER=6 but is db48 still installed?
 
Re: LibreOffice 4.1.5 fails to build

Thank you for the responses, @tzoi516 and @wblock.

@tzoi516, I had tried building after commenting out the devel/ccache related lines in /etc/make.conf. editors/libreoffice won't fill the /ram work directory with the way I've set up make.conf and the ccache directory is located in /root, i.e. on the hard drive.

@wblock, at one point I had tried building with all of the options unchecked, but still got the same error, so I put the original options back in for subsequent attempts. I deinstalled databases/db48 after that attempt didn't work, so it's not installed now. The build dependencies list actually called for db41-4.1.25 but, perhaps mistakenly, I thought any db4* would be compatible. Additionally, I now wonder if I commented out the WITH_BDB_VER=6 in make.conf when I attempted to build with db48 or if I needed to. So I might have to test with that commented out and/or using databases/db41. Right now, I'm trying to figure out the PKGNG equivalent of pkg_libcheck -o. I think it might be pkg check -B. I had tried a make deinstall in editors/libreoffice so the previous version isn't currently installed, so I don't think there are any symlinks involved if I understand your question correctly. I'm tempted to do a portmaster -a -f -D, but if I have a wrong option selected on a dependency somewhere I suspect it won't do any good and it would take an awfully long time.

Thanks again. I appreciate the effort.
 
Last edited by a moderator:
Re: LibreOffice 4.1.5 fails to build

Thank you @wblock, pkg_libchk -o completes without reporting any problems. I tried last night with databases/db48 installed again (db41 - 47 are all deprecated, which leads me to think that make pretty-print-build-depends-list doesn't report accurately the required version numbers for the dependencies). But this time I commented out the WITH_BDB_VER=6 line from the make.conf. Still the same error.

Afterwards, I had seen some reference to a variable of DO_FETCH_TARBALLS that may be set to "YES, "NO", or "ALL". I don't know the correct way to pass that to the build with make or portmaster, but I tried setting it to "ALL" in a Makefile.ac, which I think is an input to configure. The result was that I did not get the
Code:
Automatic fetching of external tarballs is disabled
at the start of the build as I had been, but it still resulted in a
Code:
failed to acquire theme
error at the end. So I followed that with a make clean.

For one last experiment, I'm now trying to build with only the CPUTYPE?=core2 line in make.conf and nothing else. I'm not really expecting that to work though. I may download the LibreOffice-4.2 source and play around with it to see if I can build it. Meanwhile, it's a good thing I've got Gnumeric and Abiword to work with.

Thanks @tzoi516, I've had databases/db6 installed all along.
 
Last edited by a moderator:
My pronouncement that I didn't expect it to work must have caused it to work. It's now installed and working. My fancy "if-then" clauses in make.conf appear to have been the culprit, despite the fact that they worked fine prior to this. I have subsequently rebuilt it with make.conf as follows.
Code:
CPUTYPE?=core2
# WRKDIRPREFIX=/ram
WITH_CCACHE_BUILD=yes
WITH_BDB_VER=6
QT4_OPTIONS= QGTKSTYLE
I'll just have to remember to comment out the WRKDIRPREFIX line when compiling editors/libreoffice or any other port too large for /ram.

Thank you @wblock and @tzoi516.
 
Last edited by a moderator:
Back
Top