openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Pyhalov <>
Subject Building OpenOffice on illumos with gcc
Date Fri, 01 Aug 2014 15:27:27 GMT
I've just integrated OpenOffice component into OpenIndiana /hipster 
illumos distribution. I'd like to share some patches and to ask if they 
could be converted to bug reports, feature requests and which of them 
can be integrated.

OpenIndiana distribution tries to be compatible with Solaris 11. 
However, there are several distinctions, the main one is system 
compiler. We use gcc (4.8) with illumos (former Sun Solaris) linker 
instead of Sun Studio.

The work I've made was based on earlier work of  Apostolos Syropoulos, 
which he described here:   .

The full component is available here:

And patches are in "patches" subdirectory:


I had to make about 20 changes.

OpenOffice configure script doesn't like illumos ld and GCC on Solaris, 
so I relaxed this restriction.

Patches to main solenv/* make files are mostly taken from Apostolos blog 
(perhaps, with some corrections) and IIRC are based on Linux makefiles. 
They are necessary to introduce Solaris/GCC platform.

Our boost live in /usr/g++, so we have to teach OpenOffice to search it 
there. We can't use CPPFLAGS, because this breaks icu compilation. It 
would be perfect if we can provide boost path with configure switch.

dmake is supposed to call gmake in several cases. But sometimes it calls 
dmake or make and it doesn't like "-j" flags. Don't know why it happens. 
So I just had to remove "-j" flags.

Without this patch some symbols are hidden during sc compilation.

Some mapfiles introduce symbols which are not present in OpenIndiana.

Missing <cstring> includes.

Complements 06.ignore_mapfiles.patch. _ZTI* symbols are not present in 
result libraries.

LDFLAGS are not passed during libxmlsec build

Two issues - 1) saldisp defines MAXFRAMEBUFFERS  only for XSUN.
2) neither USE_XINERAMA_XORG nor USE_XINERAMA_XSUN are defined.

It seems just gcc 4.8 doesn't like &const_cast<char*>(pText) construction.

Some symbols used by OpenOffice are defined in our headers. Undefine them.

Studio flags are unconditionally passed to the compiler. Fix this.

On OpenIndiana we have /usr/apr/include, not /usr/include/apr. Also 
runpaths for APR and APR-UTIL are missing. Perhaps, adding some switch 
to set apr/apr-util runpath and include <header.h> instead of 
<apr/header.h> would help here. (in fact, patch to patch :))
There are two issues.

1) in uperf.cpp _XOPEN_SOURCE_EXTENDED is defined. This hides some 
symbols on Solaris/illumos. So, we don't receive _XPG6 and get an error
"Compiler or options invalid for pre-UNIX 03 X/Open applications \
         and pre-2001 POSIX applications"
There's no need to define this guard on illumos.

2) We should add runpath to binaries, else compiling icu is linked to 
system icu in /usr/lib (compiled with Studio) and we receive binaries 
which are linked to both Studio and GCC C++ runtime simultaneously.

Binaries are unconditionally linked to lCstd on Solaris. Fix this.

OpenOffice has hardcoded paths for nss libraries and headers. Set paths 
to our paths. One more time when having configure switch is desirable.

1) One more define supposing that the only Solaris compiler is Studio
2) We (as MACOSX) also have posix_madvise (just cut&paste Apostolos' 
change, don't know, why usual madvise fails to work, perhaps, missing 

Post-install processing:

bootstraprc has incorrect UserInstallation setting and tries to write 
user configs to installation directory (fix was taken from FreeBSD 
port).  Alsoe some binaries have incorrect runpaths. Fix this.

Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message