Apostolos\’ Daily Plate

Compiling OpenOffice4

Posted in Πληροφορική, OpenIndiana, OpenSolaris by asyropoulos on Φεβρουαρίου 5, 2014

NOTE: The patches that are described below have been included in the source tree of OpenOffice and some of them in the source tree of LibreOffice. In all cases the patches have been included using the Apache License 2.0 and the corresponding license for LibreOffice.

 

Recently I tried to compile the latest version of OpenOffice4. Since I do not think SunStudio is worth the trouble, I decided tocompile using gcc and GNU ld. I have used gcc v. 4.8.2 and GNU ld (GNU Binutils) 2.24. Also, I have used Perl 5.16.3 and Java version «1.7.0_51». The following commands show what I did to configure the system:

$ export CONFIG_SHELL=/bin/bash
$ export LD_ALTEXEC=/opt/gnu/bin/gld 
$ PATH=/opt/gnu/ant/bin:/opt/gnu/perl5/5.16.3/bin:$PATH
$ export ANT_HOME=/opt/gnu/ant/
$ export JAVA_HOME=/usr/jdk/jdk1.7.0
$ autoconf
$ ./configure \\
   --with-dmake-url=http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2\
   --with-epm-url=http://www.msweet.org/files/project2/epm-3.7-source.tar.gz --disable-odk\ 
   --with-lang="el en" \
   --with-junit=/extra/sources/OpenOffice/java/junit-4.11.jar --disable-randr \ 
   --enable-category-b --enable-pdfimport \
   --enable-wiki-publisher --with-dict=ALL  
   --with-build-version="Build by Apostolos Syropoulos" \
   --with-package-format="pkg" --with-jdk-home=/usr/jdk/jdk1.7.0\
   --without-stlport --with-system-libxml
$ ./bootstrap
$ source SolarisX86GccEnv.Set.sh
$ cd instsetoo_native
$ build --all

Note that it might be helpful to set the varible GNUMAKE in file SolarisX86GccEnv.Set.sh. Also, before starting to build you should make sure you have updated some of the makefiles. In particular, I had to modify the following files:

aoo4/main/solenv/gbuild/platform/solaris.mk
aoo4/main/solenv/inc/unxsogi.mk
aoo4/main/solenv/inc/tg_compv.mk

The last file should be modified as the following patch shows:

--- tg_compv.mk.old	Τετ Φεβ  5 18:25:31 2014
+++ tg_compv.mk	Παρ Ιαν 10 20:00:33 2014
@@ -28,7 +28,9 @@
 .IF "$(COMNAME)"=="" || "$(COMPATH:s!\!/!)"!="$(COMPATH_STORED)"
 .IF "$(L10N_framework)"==""

-COMNAME:=
+COM:=GCC
+COMNAME:=gcc3
+COMID=gcc3

 .IF "$(COM)"=="GCC"
 CFLAGSVERSION=-dumpversion
@@ -157,3 +159,5 @@

 .ENDIF			# "$(L10N_framework)"==""
 .ENDIF			# "$(COMNAME)"==""
+COMID=gcc3
+SHORTSTDCPP3="6"

This should be modified, at least in principle, by the configuration process but this is not something I have noticed. Now, the system has only one makefile for Solaris which is wrong! So I had to create one file based on the corresponding Linux makefile. Note that OpenOffice uses both dmake and GNUmake and the following file is used by GNUmake.

#File solaris.mk

GUI := UNX
COM := GCC

gb_MKTEMP := mktemp -t gbuild.XXXXXX

gb_CC := gcc
gb_CXX := g++
gb_GCCP := gcc
gb_AR := ar
gb_AWK := /usr/xpg4/bin/awk
gb_CLASSPATHSEP := :

# use CC/CXX if they are nondefaults
ifneq ($(origin CC),default)
gb_CC := $(CC)
gb_GCCP := $(CC)
endif
ifneq ($(origin CXX),default)
gb_CXX := $(CXX)
endif

gb_OSDEFS := \
	-D$(OS) \
	-D$(GUI) \
	-DSYSV \
	-DSUN \
	-DSUN4 \
	-D_REENTRANT \
	-D_POSIX_PTHREAD_SEMANTICS \
	-D_PTHREADS \
	-DUNIX \
	-DUXN \

ifeq ($(CPUNAME),INTEL)
gb_OSDEFS += -DINTEL

endif

ifeq ($(GXX_INCLUDE_PATH),)
GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
endif

gb_COMPILERDEFS := \
	-D$(COM) \
	-DCPPU_ENV=gcc3 \
	-DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \

gb_CFLAGS := \
	-Wall \
	-Wendif-labels \
	-Wextra \
	-Wshadow \
	-fPIC \
	-fmessage-length=0 \
	-fno-common \
	-fno-strict-aliasing \
	-pipe \

gb_CXXFLAGS := \
	-Wall \
	-Wendif-labels \
	-Wextra \
	-Wno-ctor-dtor-privacy \
	-Wno-non-virtual-dtor \
	-Wshadow \
	-fPIC \
	-fmessage-length=0 \
	-fno-common \
	-fno-strict-aliasing \
	-fno-use-cxa-atexit \
	-pipe \

ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
gb_CFLAGS_WERROR := -Werror
gb_CXXFLAGS_WERROR := -Werror
endif

gb_LinkTarget_EXCEPTIONFLAGS := \
	-DEXCEPTIONS_ON \
	-fexceptions \
	-fno-enforce-eh-specs \

gb_LinkTarget_NOEXCEPTIONFLAGS := \
	-DEXCEPTIONS_OFF \
	-fno-exceptions \

gb_LinkTarget_LDFLAGS += \
	$(subst -L../lib , ,$(SOLARLIB)) \
	-w \
	-lpthread  \
	-Bdirect \
	-z defs \
	-z combreloc \

ifeq ($(gb_DEBUGLEVEL),2)
gb_COMPILEROPTFLAGS := -O0
else
gb_COMPILEROPTFLAGS := -Os
endif

gb_COMPILERNOOPTFLAGS := -O0

# Helper class

gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)

# convert parametters filesystem root to native notation
# does some real work only on windows, make sure not to
# break the dummy implementations on unx*
define gb_Helper_convert_native
$(1)
endef

# CObject class

define gb_CObject__command
$(call gb_Output_announce,$(2),$(true),C  ,3)
$(call gb_Helper_abbreviate_dirs,\
	mkdir -p $(dir $(1)) && \
	mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
	$(gb_CC) \
		$(DEFS) $(CFLAGS) \
		-c $(3) \
		-o $(1) \
		-MMD -MT $(call gb_CObject_get_target,$(2)) \
		-MF $(call gb_CObject_get_dep_target,$(2)) \
		-I$(dir $(3)) \
		$(INCLUDE))
endef

# CxxObject class

define gb_CxxObject__command
$(call gb_Output_announce,$(2),$(true),CXX,3)
$(call gb_Helper_abbreviate_dirs,\
	mkdir -p $(dir $(1)) && \
	mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
	$(gb_CXX) \
		$(DEFS) $(CXXFLAGS) \
		-c $(3) \
		-o $(1) \
		-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
		-MF $(call gb_CxxObject_get_dep_target,$(2)) \
		-I$(dir $(3)) \
		$(INCLUDE_STL) $(INCLUDE))
endef

# LinkTarget class

define gb_LinkTarget__get_rpath_for_layer
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
endef

gb_LinkTarget__RPATHS := \
	URELIB:\dORIGIN \
	UREBIN:\dORIGIN/../lib:\dORIGIN \
	OOO:\dORIGIN:\dORIGIN/../ure-link/lib \
	BRAND:\dORIGIN:\dORIGIN/../basis-link/program:\dORIGIN/../basis-link/ure-link/lib \
	SDKBIN:\dORIGIN/../../ure-link/lib \
	NONEBIN:\dORIGIN/../lib:\dORIGIN \

gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)

ifeq ($(gb_DEBUGLEVEL),2)
gb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
gb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline

endif

gb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))

define gb_LinkTarget__command_dynamiclink
$(call gb_Helper_abbreviate_dirs,\
	mkdir -p $(dir $(1)) && \
	$(gb_CXX) \
		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
		-o $(1))
endef

define gb_LinkTarget__command_staticlink
$(call gb_Helper_abbreviate_dirs,\
	mkdir -p $(dir $(1)) && \
	$(gb_AR) -rsu $(1) \
		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
		2> /dev/null)
endef

define gb_LinkTarget__command
$(call gb_Output_announce,$(2),$(true),LNK,4)
$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1)))
$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
endef

# Library class

gb_Library_DEFS :=
gb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack
gb_Library_SYSPRE := lib
gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
gb_Library_PLAINEXT := .so
gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
ifeq ($(gb_PRODUCT),$(true))
gb_Library_STLEXT := port_gcc$(gb_Library_PLAINEXT)
else
gb_Library_STLEXT := port_gcc_stldebug$(gb_Library_PLAINEXT)
endif

ifeq ($(CPUNAME),X86_64)
gb_Library_OOOEXT := $(gb_Library_PLAINEXT)
gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
else
gb_Library_OOOEXT := $(gb_Library_PLAINEXT)
gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
endif

gb_STDLIBS := \
        m \
        c \

gb_Library_PLAINLIBS_NONE += \
	$(gb_STDLIBS) \
	dl \
	freetype \
	jpeg \
	pthread \
	X11 \
	Xext \
	SM \
	ICE \
	z \
	cppunit

gb_Library_FILENAMES := \
	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \

gb_Library_LAYER := \
	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \

define gb_Library_get_rpath
'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))'
endef

define gb_Library_Library_platform
$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1))

endef

# StaticLibrary class

gb_StaticLibrary_DEFS :=
gb_StaticLibrary_SYSPRE := lib
gb_StaticLibrary_PLAINEXT := .a
gb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)

gb_StaticLibrary_FILENAMES := \
	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \

gb_StaticLibrary_StaticLibrary_platform =

# Executable class

gb_Executable_EXT :=

gb_Executable_LAYER := \
	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
	$(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \
	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \

define gb_Executable_get_rpath
'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))'
endef

define gb_Executable_Executable_platform
$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1))

endef

# CppunitTest class

gb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
gb_CppunitTest_SYSPRE := libtest_
gb_CppunitTest_EXT := .so
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
gb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename)

define gb_CppunitTest_CppunitTest_platform
$(call gb_LinkTarget_get_target,$(2)) : RPATH :=

endef

# JunitTest class

define gb_JunitTest_JunitTest_platform
$(call gb_JunitTest_get_target,$(1)) : DEFS := \
	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/openoffice.org3/program/soffice}" \
    -Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \
    -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \

endef

# SdiTarget class

gb_SdiTarget_SVIDLPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib

# SrsPartMergeTarget

gb_SrsPartMergeTarget_TRANSEXPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib

# SrsPartTarget class

gb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
gb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)

define gb_SrsPartTarget__command_dep
$(call gb_Helper_abbreviate_dirs,\
	$(gb_GCCP) \
		-MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
		$(INCLUDE) \
		$(DEFS) \
		-c -x c++-header $(2) \
		-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef

# ComponentTarget

gb_XSLTPROCPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
gb_Library_COMPONENTPREFIXES := \
    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \

The file that follows is used by dmake:

#File unxsogi.mk

# mk file for unxsogi
ASM=/opt/gnu/bin/gas
AFLAGS=
CDEFAULTOPT*=-O2

SOLAR_JAVA=TRUE
JAVAFLAGSDEBUG=-g

# _PTHREADS is needed for the stl
CDEFS+=-D_PTHREADS -D_REENTRANT -DSYSV -DSUN -DSUN4 -D_POSIX_PTHREAD_SEMANTICS -D_USE_NAMESPACE=1 

.IF "$(SOLAR_JAVA)"!=""
JAVADEF=-DSOLAR_JAVA
.IF "$(debug)"==""
JAVA_RUNTIME=-ljava
.ELSE
JAVA_RUNTIME=-ljava_g
.ENDIF
.ENDIF 

# architecture dependent flags for the C and C++ compiler that can be changed by
# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
ARCH_FLAGS*=

CXX*=g++
CC*=gcc
CFLAGS=-c
CFLAGSCC= -pipe $(ARCH_FLAGS) 

CFLAGSEXCEPTIONS=-fexceptions
CFLAGS_NO_EXCEPTIONS=-fno-exceptions

CFLAGSCXX= -pipe $(ARCH_FLAGS) -Wno-ctor-dtor-privacy -fno-use-cxa-atexit
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
CFLAGSCXX += -fvisibility-inlines-hidden
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"

PICSWITCH:=-fPIC

CFLAGSOBJGUIMT=
CFLAGSOBJCUIMT=
CFLAGSSLOGUIMT=$(PICSWITCH)
CFLAGSSLOCUIMT=$(PICSWITCH)
CFLAGSPROF=
CFLAGSDEBUG=-g
CFLAGSDBGUTIL=
CFLAGSOPT=-O2
CFLAGSNOOPT=
CFLAGSOUTOBJ=-o

STATIC		= -Wl,-Bstatic
DYNAMIC		= -Wl,-Bdynamic

LINK*=$(CXX)
LINKC*=$(CC)

LINKFLAGS=-lstdc++
LINKFLAGSAPPGUI=-Wl,-export-dynamic
LINKFLAGSSHLGUI=-shared
LINKFLAGSAPPCUI=-Wl,-export-dynamic
LINKFLAGSSHLCUI=-shared
LINKFLAGSTACK=
LINKFLAGSPROF=
LINKFLAGSOPT=

LINKFLAGS=
LINKFLAGSAPPGUI=
LINKFLAGSSHLGUI=-shared
LINKFLAGSAPPCUI=
LINKFLAGSSHLCUI=-shared
LINKFLAGSTACK=
LINKFLAGSPROF=
LINKFLAGSDEBUG=-ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
LINKFLAGSOPT=
LINKFLAGSDEFS*=-Wl,-z,defs
LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_OXT=
LINKFLAGSRUNPATH_BOXT=-Wl,-rpath,\''$$ORIGIN'\'
LINKFLAGSRUNPATH_NONE=
LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
#LINKVERSIONMAPFLAG=-M
LINKVERSIONMAPFLAG=
#LINKFLAGSNOEXSTK*=-Wl,-M,/usr/lib/ld/map.noexstk 
LINKFLAGSNOEXSTK*=-Wl,-z,noexecstack
LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)

# enable visibility define in "sal/types.h"
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"

# Reihenfolge der libs NICHT egal!

STDLIBCPP=-lstdc++

STDOBJVCL=$(L)/salmain.o
STDOBJGUI=
STDSLOGUI=
STDOBJCUI=
STDSLOCUI=

# libraries for linking shared libraries
STDSHLGUIMT=$(DYNAMIC) -lpthread -lthread -lm
STDSHLCUIMT=$(DYNAMIC) -lpthread -lthread -lm

STDLIBGUIMT+=-lX11

LIBMGR=ar
LIBFLAGS=-r
# LIBEXT=.so

IMPLIB=
IMPLIBFLAGS=

MAPSYM=
MAPSYMFLAGS=

RC=irc
RCFLAGS=-fo$@ $(RCFILES)
RCLINK=
RCLINKFLAGS=
RCSETVERSION=

DLLPOSTFIX=
DLLPRE=lib
DLLPOST=.so

Note that initially the use of map files is diabled. Now we can start building OpenOffice. Below, I am copying the notes I kept while building.

================================================================================================
build --all:soltools

in file /extra/sources/OpenOffice./aoo4/main/soltools/mkdepend
change -lCstd to -stdc++
Make this change in all makefiles :-(

in file aoo4/main/soltools/adjustvisibility/adjustvisibility.cxx
add #include <string.h>
=================================================================================================
build --all:sal

Apply the following patches

--- sal/osl/unx/file.cxx.old	Πεμ Δεκ 26 19:00:55 2013
+++ sal/osl/unx/file.cxx	Πεμ Δεκ 26 19:01:22 2013
@@ -1092,7 +1092,7 @@
             OSL_TRACE(
                 "posix_madvise(..., POSIX_MADV_WILLNEED) failed with %d", e);
         }
-#elif defined SOLARIS
+#elif defined NOTSOLARIS
         if (madvise(static_cast(p), nLength, MADV_WILLNEED) != 0)
         {
             OSL_TRACE("madvise(..., MADV_WILLNEED) failed with %d", errno);

--- sal/osl/unx/util.c.old	Πεμ Δεκ 26 21:05:19 2013
+++ sal/osl/unx/util.c	Πεμ Δεκ 26 21:04:02 2013
@@ -313,7 +313,7 @@
 #endif

 #if    ( defined(__GNUC__) && (defined(X86) || defined(X86_64)) )\
-    || ( defined(SOLARIS) && defined (__SUNPRO_C)  && defined(__i386) )
+    || ( defined(SOLARIS) && ( defined (__SUNPRO_C) || defined(__GNUC__) ) && defined(__i386) )

 /* Safe default */
 int osl_isSingleCPU = 0;

Also, delete the information about a map file in sal/util/makefile.mk

==================================================================================================
build --all:salhelper

Delete info about map file in 

./main/salhelper/source/makefile.mk

===================================================================================================
build --all:store

Delete info about map file in 

./main/store/util//makefile.mk

===================================================================================================

build --all:registry

Delete the information about a map file in 

./main/registry/util/makefile.mk

=====================================================================================================================

build --all:openssl 

cd ./unxsogi.pro/misc/build/openssl-0.9.8o/. && Configure solaris-x86-gcc -I/usr/include -L/usr/lib shared && touch so_configured_openssl

Build and manually copy the shared library

These files are not UTF-8 encoded and so they don't compile:

/extra/sources/OpenOffice./aoo4/main/apache-commons/unxsogi.pro/misc/build/commons-httpclient-3.1/src/examples/ClientApp.java
/extra/sources/OpenOffice./aoo4/main/apache-commons/unxsogi.pro/misc/build/commons-httpclient-3.1/src/examples/TrivialApp.java

http://lists.freedesktop.org/archives/libreoffice/2013-June/053831.html

=====================================================================================================================

build --all:icu 

Apply the following patch to configure:

--- icu/unxsogi.pro/misc/build/icu/source/configure.old	Παρ Δεκ 27 15:38:13 2013
+++ icu/unxsogi.pro/misc/build/icu/source/configure	Παρ Δεκ 27 15:42:21 2013
@@ -2969,7 +2969,7 @@
             CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmi
ssing-prototypes -Wwrite-strings -Wno-long-long"
             case "${host}" in
             *-*-solaris*)
-                CFLAGS="$CFLAGS -D__STDC__=0";;
+                CFLAGS="$CFLAGS -std=c99 -D_XPG6 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
             esac
         else
             case "${host}" in
@@ -2982,10 +2982,10 @@
         fi
         if test "$GXX" = yes
         then
-            CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+            CXXFLAGS="$CXXFLAGS -std=c++11 -D_XPG6 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
             case "${host}" in
             *-*-solaris*)
-                CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
+                CXXFLAGS="$CXXFLAGS";;
             esac
         else
             case "${host}" in

Reconfigure with

./configure --enable-layout --enable-static --enable-shared=yes --enable-64bit-libs=no

and build using the build --all:icu command.

Also add #define _XPG6 to tools/ctestfw/unicode/uperf.h

======================================================================================================================
build --all:nss <--- 12/01/2014

Add NS_USE_GCC = 1 to nss-3.14.4/mozilla/security/coreconf/SunOS5.mk  

Add #include  to nss/unxsogi.pro/misc/build/nss-3.14.4/mozilla/nsprpub/pr/src/pthreads/ptio.c

Add #include  to nss/unxsogi.pro/misc/build/nss-3.14.4/mozilla/security/nss/lib/freebl/unix_rand.c

======================================================================================================================
build --all:libxmlsec 

First do:

cd /extra/sources/OpenOffice/aoo4/main/nss/unxsogi.pro/misc/build/nss-3.14.4/mozilla
mkdir -p /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/
mkdir -p /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/obsolete
mkdir -p /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nspr
cp ./security/nss/lib/nss/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./dist/out/include/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/util/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./nsprpub/pr/include/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./nsprpub/pr/include/obsolete/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/obsolete/.
cp ./nsprpub/pr/include/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./nsprpub/pr/include/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nspr/.
cp ./dist/out/include/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nspr/.
cp ./security/nss/lib/cryptohi/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/certdb/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/pkcs7/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/smime/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/pkcs12/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/freebl/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./security/nss/lib/freebl/ecl/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.
cp ./dist/public/nss/*.h /extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro/include/nss/.

Next do

$ cd /extra/sources/OpenOffice/aoo4/main/libxmlsec/unxsogi.pro/misc/build/xmlsec1-1.2.14
$ ./configure ADDCFLAGS= CPPFLAGS= --with-pic --disable-shared --disable-crypto-dl\
  --with-libxslt=no --with-gnutls=no LIBXML2LIB=-lxml2 --enable-pkgconfig=no \
  --with-openssl=/extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro \
  --with-nss=/extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro \
  --with-nspr=/extra/sources/OpenOffice/aoo4/main/solver/410/unxsogi.pro
$ cd ..
$ touch so_configured_so_xmlsec1

Now you can compile using build --all:libxmlsec

======================================================================================================================
build --all:cppu

delete all info about map files in

main/cppu/util/makefile.mk

======================================================================================================================
build --all:cppuhelper

delete all info about map files in

./main/cppuhelper/source/makefile.mk

======================================================================================================================
build --all:jvmfwk

delete all info about map files in

./main/jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
./main/jvmfwk/source/makefile.mk

======================================================================================================================
build --all:eventattacher

delete all info about map files in

./main/eventattacher/source/makefile.mk 

======================================================================================================================
build --all:ucbhelper

delete all info about map files in

./main/ucbhelper/workben/myucp/makefile.mk

======================================================================================================================
build --all:comphelper

Apply the following patch

--- solver/410/unxsogi.pro/inc/comphelper/locale.hxx.old	Κυρ Δεκ 29 18:33:47 20
13
+++ solver/410/unxsogi.pro/inc/comphelper/locale.hxx	Κυρ Δεκ 29 18:34:33 2013
@@ -71,9 +71,11 @@
         static const Locale& DE_AT();
         static const Locale& AR();
         static const Locale& CA();
+#undef CS
         static const Locale& CS();
         static const Locale& DA();
         static const Locale& EL();
+#undef ES
         static const Locale& ES();
         static const Locale& FI();
         static const Locale& FR();

=========================================================================================================================

build --all:bridges

First apply the following patches

--- bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx.old	Δευ Δεκ 30 15:29:36 2013
+++ bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx	Δευ Δεκ 30 15:30:27 2013
@@ -26,6 +26,7 @@

 #include 
 #include 
+#include 
 #include 
 #include 

--- bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx.old	Δευ Ιαν 27 17:38:53 2014
+++ bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx	Δευ Ιαν 27 17:34:30 2014
@@ -45,12 +45,20 @@
 {

 //==================================================================================================
-static void callVirtualMethod(
+void callVirtualMethod(
     void * pAdjustedThisPtr,
     sal_Int32 nVtableIndex,
     void * pRegisterReturn,
     typelib_TypeClass eReturnType,
     sal_Int32 * pStackLongs,
+    sal_Int32 nStackLongs ) __attribute__((noinline));
+
+void callVirtualMethod(
+    void * pAdjustedThisPtr,
+    sal_Int32 nVtableIndex,
+    void * pRegisterReturn,
+    typelib_TypeClass eReturnType,
+    sal_Int32 * pStackLongs,
     sal_Int32 nStackLongs )
 {
 	// parameter list is mixed list of * and values
@@ -67,6 +75,13 @@
     void * stackptr;
 	asm volatile (
         "mov   %%esp, %6\n\t"
+       // preserve potential 128bit stack alignment
+        "and   $0xfffffff0, %%esp\n\t"
+        "mov   %0, %%eax\n\t"
+        "lea   -4(,%%eax,4), %%eax\n\t"
+        "and   $0xf, %%eax\n\t"
+        "sub   $0xc, %%eax\n\t"
+        "add   %%eax, %%esp\n\t"
 		// copy values
 		"mov   %0, %%eax\n\t"
 		"mov   %%eax, %%edx\n\t"

As previously delete all references to map files in the following files

./main/bridges/source/cpp_uno/gcc3_solaris_intel/makefile.mk
./main/bridges/source/jni_uno/makefile.mk

The following patch shows what I mean by deleting all references to map files:

--- bridges/source/cpp_uno/gcc3_solaris_intel/makefile.mk.old	Δευ Δεκ 30 15:32:39 20
13
+++ bridges/source/cpp_uno/gcc3_solaris_intel/makefile.mk	Δευ Δεκ 30 15:32:56 20
13
@@ -51,7 +51,7 @@

 SHL1DEF=$(MISC)$/$(SHL1TARGET).def
 SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=..$/..$/bridge_exports.map
+SHL1VERSIONMAP=
 SHL1RPATH=URELIB

 SHL1OBJS = $(SLOFILES)

=========================================================================================================================build build --all:basebmp 

Apply the following patches:

--- basebmp/source/makefile.mk.old	Δευ Δεκ 30 15:46:47 2013
+++ basebmp/source/makefile.mk	Δευ Δεκ 30 15:47:28 2013
@@ -51,7 +51,7 @@

 # SunStudio 12 (-m64 and -m32 modes): three test cases of the unit tests fail 
 # if compiled with default -xalias_level (and optimization level -xO3)
-.IF "$(OS)"=="SOLARIS"
+.IF "$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
 # For Sun Studio 8 this switch does not work: compilation fails on bitmapdevice.cxx
 .IF "$(CCNUMVER)"!="00050005"
 CDEFS+=-xalias_level=compatible

-----------------------------------------------------------------------------------------------------------------------

--- basebmp/test/makefile.mk.old	Δευ Δεκ 30 15:48:32 2013
+++ basebmp/test/makefile.mk	Δευ Δεκ 30 15:47:55 2013
@@ -56,7 +56,7 @@

 # SunStudio 12 (-m64 and -m32 modes): three test cases of the unit tests fail
 # if compiled with default -xalias_level (and optimization level -xO3)
-.IF "$(OS)"=="SOLARIS" 
+.IF "$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
 # For Sun Studio 8 this switch does not work: compilation fails on bitmapdevice
.cxx
 .IF "$(CCNUMVER)"!="00050005"
 CDEFS+=-xalias_level=compatible

========================================================================================================================

build --all:hwpfilter

Delete all references to map files in file

./main/hwpfilter/source/makefile.mk

========================================================================================================================

build --all:io

Delete all references to map files in files

./main/io/source/stm/makefile.mk
./main/io/source/TextInputStream/makefile.mk
./main/io/source/TextOutputStream/makefile.mk
./main/io/source/connector/makefile.mk
./main/io/source/acceptor/makefile.mk

========================================================================================================================

build --all:stoc

Delete all references to map files in files

./main/stoc/source/javaloader/makefile.mk
./main/stoc/source/javavm/makefile.mk
./main/stoc/source/proxy_factory/makefile.mk
./main/stoc/source/corereflection/makefile.mk
./main/stoc/source/inspect/makefile.mk
./main/stoc/source/invocation/makefile.mk
./main/stoc/source/invocation_adapterfactory/makefile.mk
./main/stoc/source/namingservice/makefile.mk
./main/stoc/util/makefile.mk

=======================================================================================================================

build --all:javaunohelper

Delete all references to map files in file

./main/javaunohelper/source/makefile.mk

=======================================================================================================================

build --all:i18npool

Delete all references to map files in files

./main/i18npool/source/collator/data/makefile.mk
./main/i18npool/source/search/makefile.mk
./main/i18npool/source/textconversion/data/makefile.mk
./main/i18npool/source/localedata/data/makefile.mk
./main/i18npool/source/breakiterator/data/makefile.mk
./main/i18npool/source/indexentry/data/makefile.mk
./main/i18npool/util/makefile.mk

=========================================================================================================================

build --all:UnoControls

Delete all references to map files in file

./main/UnoControls/util/makefile.mk

==========================================================================================================================

build --all:dtrans

Delete all references to map files in files

./main/dtrans/source/generic/makefile.mk
./main/dtrans/util/makefile.mk

==========================================================================================================================

build --all:pyuno

Delete all references to map files in file

./main/pyuno/source/loader/makefile.mk

==========================================================================================================================

build --all:sccomp

Delete all references to map files in file

./main/sccomp/source/solver/makefile.mk

==========================================================================================================================

build --all:shell

Delete all references to map files in files

./main/shell/source/cmdmail/makefile.mk
./main/shell/source/unix/exec/makefile.mk
./main/shell/source/backends/localebe/makefile.mk
./main/shell/source/unix/sysshell/makefile.mk

==========================================================================================================================

build --all:xmlhelp  

Delete all references to map files in files

./main/xmlhelp/source/treeview/makefile.mk
./main/xmlhelp/util/makefile.mk 

==========================================================================================================================

build --all:sdext

Delete all references to map files in files

./main/sdext/source/presenter/makefile.mk
./main/sdext/source/minimizer/makefile.mk 

==========================================================================================================================

build --all:vcl 

--- vcl/unx/generic/app/saldisp.cxx.old	Τρι Δεκ 31 14:55:00 2013
+++ vcl/unx/generic/app/saldisp.cxx	Τρι Δεκ 31 15:39:24 2013
@@ -52,11 +52,11 @@
 #include 

 #include 
+#define USE_XINERAMA_XORG

 #ifdef USE_XINERAMA
 #ifdef USE_XINERAMA_XORG
 #include 
-#elif defined USE_XINERAMA_XSUN
 #if defined(SOLARIS) && defined(INTEL) // missing extension header in standard installation
 #define MAXFRAMEBUFFERS       16
 Bool XineramaGetState(Display*, int);

--- vcl/unx/generic/app/wmadaptor.cxx.old	Τρι Δεκ 31 15:46:14 2013
+++ vcl/unx/generic/app/wmadaptor.cxx	Τρι Δεκ 31 15:47:18 2013
@@ -1117,8 +1117,9 @@
         bOnce = false;
         XTextProperty aTestProp = { NULL, None, 0, 0 };
         const char *pText = "trustme";
+	 char* pT = const_cast(pText);
         XmbTextListToTextProperty( m_pDisplay,
-                                   &const_cast(pText),
+                                   &pT,
                                    1,
                                    XStdICCTextStyle,
                                    &aTestProp );

==========================================================================================================================

build --all:oox

--- oox/util/makefile.mk.old	Τρι Δεκ 31 18:46:43 2013
+++ oox/util/makefile.mk	Τρι Δεκ 31 18:47:15 2013
@@ -77,7 +77,7 @@
 .IF "$(SYSTEM_OPENSSL)"=="YES"
 SHL1STDLIBS+= $(OPENSSLLIB)
 .ELSE
-SHL1STDLIBS+= $(OPENSSLLIBST)
+SHL1STDLIBS+= $(OPENSSLLIB)
 .ENDIF
 .ENDIF # WNT

==========================================================================================================================

build --all:accessibility

Delete all references to map files in file

./main/accessibility/util/makefile.mk

==========================================================================================================================

build --all:fpicker

Delete all references to map files in files

./main/fpicker/source/generic/makefile.mk
./main/fpicker/source/office/makefile.mk
./main/fpicker/source/unx/gnome/makefile.mk

==========================================================================================================================

build --all:uui

Delete all references to map files in file

./main/uui/util/makefile.mk

==========================================================================================================================

build --all:canvas

Delete all references to map files in files

./main/canvas/source/factory/makefile.mk
./main/canvas/source/simplecanvas/makefile.mk
./main/canvas/source/null/makefile.mk
./main/canvas/source/vcl/makefile.mk

===========================================================================================================================

build --all:scaddins

Delete all references to map files in files

./main/scaddins/source/datefunc/makefile.mk
./main/scaddins/source/analysis/makefile.mk

===========================================================================================================================

build --all:fileaccess

Delete all references to map files in file

./main/fileaccess/source/makefile.mk

===========================================================================================================================

build --all:slideshow

Delete all references to map files in file

./main/slideshow/util/makefile.mk

===========================================================================================================================

build --all:connectivity <------ 17/01/2014

First apply the following patch

--- connectivity/source/drivers/odbcbase/ODriver.cxx.old	Τετ Ιαν  1 18:23:20 2014
+++ connectivity/source/drivers/odbcbase/ODriver.cxx	Τετ Ιαν  1 18:24:08 2014
@@ -68,7 +68,7 @@
 		// this name is referenced in the configuration and in the odbc.xml
 		// Please take care when changing it.
 }
-
+#undef SS
 typedef Sequence SS;
 //------------------------------------------------------------------------------
 SS ODBCDriver::getSupportedServiceNames_Static(  ) throw (RuntimeException)

And now delete all references to map files in files

./main/connectivity/source/drivers/mysql/makefile.mk
./main/connectivity/source/manager/makefile.mk
./main/connectivity/source/drivers/jdbc/makefile.mk
./main/connectivity/source/drivers/hsqldb/makefile.mk
./main/connectivity/source/drivers/dbase/makefile.mk
./main/connectivity/source/drivers/calc/makefile.mk
./main/connectivity/source/drivers/flat/makefile.mk
./main/connectivity/source/drivers/adabas/makefile.mk
./main/connectivity/source/drivers/odbc/makefile.mk
./main/connectivity/source/cpool/makefile.mk

===========================================================================================================================

build --all:svx  <-- This is not valid with the current build!

In file 

/extra/sources/OpenOffice./aoo4/main/svx/source/form/formcontroller.cxx

use compat_functional.hxx from LibreOffice!
http://docs.libreoffice.org/o3tl/html/compat__functional_8hxx_source.html

===========================================================================================================================

build --all:basctl

Delete all references to map files in file

./main/basctl/util/makefile.mk

===========================================================================================================================

build --all:forms

Delete all references to map files in file

./main/forms/util/makefile.mk

===========================================================================================================================

build --all:extensions

Delete all references to map files in files

./main/extensions/source/logging/makefile.mk
./main/extensions/source/dbpilots/makefile.mk
./main/extensions/source/abpilot/makefile.mk
./main/extensions/source/update/feed/makefile.mk
./main/extensions/source/oooimprovecore/makefile.mk
./main/extensions/source/bibliography/makefile.mk
./main/extensions/source/oooimprovement/makefile.mk
./main/extensions/source/xmlextract/makefile.mk
./main/extensions/source/update/check/makefile.mk 
./main/extensions/source/propctrlr/makefile.mk
./main/extensions/source/update/ui/makefile.mk
./main/extensions/source/resource/makefile.mk
./main/extensions/source/scanner/makefile.mk
./main/extensions/source/preload/makefile.mk

===========================================================================================================================

build --all:cui

Delete all references to map files in file

./main/cui/util/makefile.mk

===========================================================================================================================

build --all:starmath

Delete all references to map files in file

./main/starmath/util/makefile.mk

==================================================================================================

build --all:filter

Delete all references to map files in files

./main/filter/source/graphicfilter/ipbm/makefile.mk
./main/filter/source/graphicfilter/eras/makefile.mk
./main/filter/source/graphicfilter/itga/makefile.mk
./main/filter/source/graphicfilter/itiff/makefile.mk
./main/filter/source/graphicfilter/ipcd/makefile.mk
./main/filter/source/msfilter/powerpoint/makefile.mk
./main/filter/source/graphicfilter/ios2met/makefile.mk
./main/filter/source/xmlfilteradaptor/makefile.mk
./main/filter/source/placeware/makefile.mk
./main/filter/source/graphicfilter/egif/makefile.mk
./main/filter/source/config/cache/makefile.mk
./main/filter/source/t602/makefile.mk
./main/filter/source/svg/makefile.mk
./main/filter/source/pdf/makefile.mk
./main/filter/source/graphicfilter/ipsd/makefile.mk
./main/filter/source/xsltfilter/makefile.mk
./main/filter/source/graphicfilter/idxf/makefile.mk
./main/filter/source/graphicfilter/epbm/makefile.mk
./main/filter/source/graphicfilter/ipict/makefile.mk
./main/filter/source/graphicfilter/expm/makefile.mk
./main/filter/source/graphicfilter/epgm/makefile.mk
./main/filter/source/graphicfilter/ieps/makefile.mk
./main/filter/source/graphicfilter/iras/makefile.mk
./main/filter/source/graphicfilter/etiff/makefile.mk
./main/filter/source/graphicfilter/eppm/makefile.mk
./main/filter/source/flash/makefile.mk
./main/filter/source/graphicfilter/eps/makefile.mk
./main/filter/source/graphicfilter/ipcx/makefile.mk
./main/filter/source/xmlfilterdetect/makefile.mk
./main/filter/source/graphicfilter/eos2met/makefile.mk
./main/filter/source/graphicfilter/epict/makefile.mk
./main/filter/source/graphicfilter/icgm/makefile.mk

=========================================================================================================================

build --all:sd

Delete all references to map files in file

./main/sd/util/makefile.mk

=========================================================================================================================

build --all:desktop 

Delete all references to map files in files

./main/desktop/test/deployment/active/makefile.mk
./main/desktop/test/deployment/boxt/makefile.mk
./main/desktop/source/so_comp/makefile.mk
./main/desktop/source/deployment/gui/makefile.mk
./main/desktop/source/migration/services/makefile.mk
./main/desktop/source/app/makefile.mk
./main/desktop/source/splash/makefile.mk
./main/desktop/test/deployment/passive/makefile.mk
./main/desktop/source/deployment/makefile.mk
./main/desktop/source/offacc/makefile.mk
./main/desktop/source/pkgchk/unopkg/makefile.mk

========================================================================================================================

build --all:chart2

Delete all references to map files in files

./main/chart2/source/controller/makefile.mk
./main/chart2/source/model/makefile.mk

=======================================================================================================================

build --all:sc      

Delete all references to map files in files

./main/sc/addin/rot13/makefile.mk
./main/sc/util/makefile.mk

=======================================================================================================================

build --all:scripting

Delete all references to map files in files

./main/scripting/source/dlgprov/makefile.mk
./main/scripting/source/vbaevents/makefile.mk
./main/scripting/source/basprov/makefile.mk
./main/scripting/source/stringresource/makefile.mk

========================================================================================================================

build --all:writerfilter

Delete all references to map files in file

./main/writerfilter/util/makefile.mk

========================================================================================================================

build --all:dbaccess   

Delete all references to map files in files

./main/dbaccess/source/ext/macromigration/makefile.mk
./main/dbaccess/source/ext/adabas/makefile.mk
./main/dbaccess/util/makefile.mk
./main/dbaccess/source/filter/xml/makefile.mk 

========================================================================================================================

build --all:reportdesign

Delete all references to map files in file

./main/reportdesign/util/makefile.mk

=======================================================================================================================

build --all:xmlsecurity

In the following files the one has to fix the inclusion of nss related header files:

./aoo4/main/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.hxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/ciphercontext.hxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/digestcontext.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
./aoo4/main/solver/410/unxsogi.pro/inc/external/xmlsec/nss/app.h
./aoo4/main/solver/410/unxsogi.pro/inc/external/xmlsec/nss/tokens.h
./aoo4/main/solver/410/unxsogi.pro/inc/external/xmlsec/nss/akmngr.h
./aoo4/main/solver/410/unxsogi.pro/inc/external/xmlsec/nss/crypto.h
./aoo4/main/solver/410/unxsogi.pro/inc/external/xmlsec/nss/x509.h
./aoo4/main/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
./aoo4/main/xmlsecurity/source/xmlsec/nss/secerror.cxx

Also, delete all references to map files in file

./main/xmlsecurity/util/makefile.mk

=======================================================================================================================

build --all:remotebridges

Delete all references to map files in file

./main/remotebridges/source/unourl_resolver/makefile.mk

=======================================================================================================================

build --all:testtools 

Delete all references to map files in file

./main/testtools/source/bridgetest/makefile.mk

=======================================================================================================================
build --all:lingucomponent

Delete all references to map files in files

./main/lingucomponent/source/thesaurus/libnth/makefile.mk
./main/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
./main/lingucomponent/source/languageguessing/makefile.mk
./main/lingucomponent/source/spellcheck/spell/makefile.mk

======================================================================================================================
build --all:ucb  

Delete all references to map files in files

./main/ucb/source/ucp/hierarchy/makefile.mk
./main/ucb/source/sorter/makefile.mk
./main/ucb/source/ucp/webdav/makefile.mk
./main/ucb/source/ucp/package/makefile.mk
./main/ucb/source/ucp/gvfs/makefile.mk
./main/ucb/source/core/makefile.mk
./main/ucb/source/cacher/makefile.mk
./main/ucb/source/ucp/ext/makefile.mk
./main/ucb/source/ucp/tdoc/makefile.mk
./main/ucb/source/ucp/expand/makefile.mk
./main/ucb/source/ucp/file/makefile.mk
./main/ucb/source/ucp/ftp/makefile.mk

Also make the following change in file ./main/ucb/source/ucp/webdav/makefile.mk

.IF "$(SYSTEM_OPENSSL)" == "YES"
CFLAGS+= -I$(OPENSSL_CFLAGS)
SHL1STDLIBS+= $(OPENSSLLIB)
.ELSE
SHL1STDLIBS+= $(OPENSSLLIBST) <----------
.ENDIF

to

.IF "$(SYSTEM_OPENSSL)" == "YES"
CFLAGS+= -I$(OPENSSL_CFLAGS)
SHL1STDLIBS+= $(OPENSSLLIB)
.ELSE
SHL1STDLIBS+= $(OPENSSLLIB)  <-----------
.ENDIF

Before the last step make sure you set LD_LIBRARY_PATH to the absolute path leading to /main/solver/410/unxsogi.pro/lib/. That’s all.