Unfortunately, there aren't prebuilt binaries for any of the Solaris or illumos distros. So I've been trying to build LibreOffice from source for a while. Finally, I have a working build on Tribblix.
This is what I did. Hopefully it will be useful to other distros. This is just a straight dump of my notes.
First, you'll need java (the jdk), and the perl Archive::Zip module. You'll need boost, and harfbuzz with the icu extensions. Plus curl, hunspell, cairo, poppler, neon.
Then you'll need to build (look on this page for links to some of this stuff):
If you don't tell it otherwise, LibreOffice will download these and try to build them itself. And generally these have problems building cleanly, which it's fairly easy to fix while building them in isolation, but would be well nigh impossible when they're buried deep inside the LibreOffice build system
For librevenge, pass --disable-werror to configure.
For libmspub, replace the call to pow() in src/lib/MSPUBMetaData.cpp with std::pow().
For libmspub, remove zlib from the installed pc file (Tribblix, and some of the other illumos other distros, don't supply a pkgconfig file for zlib).
For liborcus, run the following against all the Makefiles that the configure step generates:
gsed -i 's:-DMDDS_HASH_CONTAINER_BOOST:-pthreads -DMDDS_HASH_CONTAINER_BOOST:'
For mdds, make sure you have a PATH that has the gnu install ahead of the system install program when running make install.
For ixion, it's a bit more involved. You need some way of getting -pthreads past configure *and* make. For configure, I used:
env boost_cv_pthread_flag=-pthreads CFLAGS="-O -pthreads" CPPFLAGS="-pthreads" CXXFLAGS="-pthreads" configure ...
and for make:
For orcus, it looks to pkgconfig to find zlib, so you'll need to prevent that:
env ZLIB_CFLAGS="-I/usr/include" ZLIB_LIBS="-lz" configure ...
For libvisio, replace the call to pow() in src/lib/VSDMetaData.cpp with std::pow().
For libvisio, remove zlib and libxml-2.0 from the installed pc file.
If you want to run a parallel make, don't use gmake 3.81. Version 4.1 is fine.
With all those installed you can move on to LibreOffice.
Unpack the main tarball.
chmod a+x bin/unpack-sources
mkdir -p external/tarballs
and then symlink or copy the other tarballs (help, translations, dictionaries) into external/tarballs (otherwise, it'll try downloading them again).
Download and run this script to patch the builtin version of glew.
Edit the following files:
And replace "LINUX" with "SOLARIS". That part of the makefiles is needed on all unix-like systems, not just Linux.
In the file
replace the call to pow() on line 3160 with std::pow()
In the file
replace the call to pow() on line 87 with std::pow()
In the file
You'll need to #undef TRANSPARENT before it's used (otherwise, it picks up a rogue definition from the system).
And you'll need to create a compilation symlink:
mkdir -p instdir/program
ln -s libGLEW.so.1.10 instdir/program/libGLEW.so
This is the configure command I used:
env PATH=/usr/gnu/bin:$PATH \
./configure --prefix=/usr/versions/libreoffice-44 \
and then to make:
env LD_LIBRARY_PATH=/usr/lib/mps:`pwd`/instdir/ure/lib:`pwd`/instdir/sdk/lib:`pwd`/instdir/program \
/usr/gnu/bin/make -k build
(Using 'make build' is supposed to avoid the checks, many of which fail. You'll definitely need to run 'make -k' with a parallel build, because otherwise some of the test failures will stop the build before all the other parallel parts of the build have finished.)
Then create symlinks for all the .so files in /usr/lib/mps in instdir/program, and instdir/program/soffice should start.