Building Libreoffice 3.6 on OpenIndiana x86 with GCC

Jonathan Adams t12nslookup at gmail.com
Thu Jun 21 06:41:51 PDT 2012


In case anyone was interested my git diff to date is attached.

On 21 June 2012 13:27, Michael Stahl <mstahl at redhat.com> wrote:
> On 15/06/12 23:52, Matúš Kukan wrote:
>> On 15 June 2012 17:32, Jonathan Adams <t12nslookup at gmail.com> wrote:
>>> /home/sal/LibreOffice/libo/desktop/Executable_oosplash.mk:83: ***
>>> Cannot link against library/libraries -lsocket. Libraries must be
>>> registered in Repository.mk.  Stop.
>>
>> Just remove the whole ifeq ($(OS),SOLARIS) ... endif part
>> from desktop/Executable_oosplash.mk
>
> oh, that looks rather invalid mixture of gb_Executable_use_libraries and
> a parameter intended for _add_libs...
>
>>> my question is, how do I tell "Repository.mk" that it should be using
>>> "-lsocket" in tail_build ?
>>
>> It's registered in solenv/gbuild/platform/solaris.mk, see
>> gb_Library_PLAINLIBS_NONE.
>> It's also in gb_STDLIBS, so we link against it ~all the time.
>
> i've added it there recently when ploum tried to build on Solaris,
> because apparently some of the socket and DNS related functions that are
> usually found in libc on Linux are in these separate "nsl" and "socket"
> libraries on Solaris; perhaps it is nicer to explicitly add these in
> just the places where they are needed (and there are already various
> makefiles that add them), but for getting an initial port working this
> should be the easiest way.
>
> by the way it shouldn't be necessary to link against "dl" on Solaris 10
> and later because these functions have been moved into libc.
-------------- next part --------------
diff --git a/configure.in b/configure.in
index 011aa22..eab462b 100644
--- a/configure.in
+++ b/configure.in
@@ -3401,11 +3401,11 @@ openbsd*)
         AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
         ;;
     esac
-    SOLARINC="$SOLARINC -I/usr/local/include"
+    SOLARINC="$SOLARINC -I/opt/tools/include"
     SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
     SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
     SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
-    SOLARLIB="$SOLARLIB -L/usr/local/lib"
+    SOLARLIB="$SOLARLIB -L/opt/tools/lib"
 
     ;;
 
@@ -3435,12 +3435,12 @@ solaris*)
         AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
         ;;
     esac
-    SOLARINC="$SOLARINC -I/usr/local/include"
+    SOLARINC="$SOLARINC -I/opt/tools/include"
     SOLARLIB="-L../lib -L$SRC_ROOT/solenv/$OUTPATH/lib"
     SOLARLIB="$SOLARLIB -L${SOLARVER}/${OUTPATH}${PROEXT}/lib"
     SOLARLIB="$SOLARLIB -L$SRC_ROOT/solenv/$OUTPATH/lib"
     SOLARLIB="$SOLARLIB -L$COMPATH/lib"
-    SOLARLIB="$SOLARLIB -L/usr/local/bin -L/usr/dt/lib -L/usr/openwin/lib"
+    SOLARLIB="$SOLARLIB -L/opt/tools/lib -L/usr/dt/lib -L/usr/openwin/lib"
     ;;
 
 *)
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk
index da6fe98..1fb274f 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -69,10 +69,10 @@ ifneq ($(GUI)$(COM),WNTMSC)
 include $(OUTDIR)/inc/postgresql/libpq-flags.mk
 
 $(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\
-	$(if $(filter-out MACOSX,$(OS)),-Wl$(COMMA)--as-needed) \
+	$(if $(filter-out MACOSX SOLARIS,$(OS)),-Wl$(COMMA)--as-needed) \
 	$(LIBPQ_DEP_LIBS) \
 	$(if $(filter-out MACOSX,$(OS)),-ldl) \
-	$(if $(filter-out MACOSX,$(OS)),-Wl$(COMMA)--no-as-needed) \
+	$(if $(filter-out MACOSX SOLARIS,$(OS)),-Wl$(COMMA)--no-as-needed) \
 ))
 
 endif
diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx
index e937363..148b1f5 100644
--- a/connectivity/source/drivers/odbcbase/ODriver.cxx
+++ b/connectivity/source/drivers/odbcbase/ODriver.cxx
@@ -63,11 +63,11 @@ rtl::OUString ODBCDriver::getImplementationName_Static(  ) throw(RuntimeExceptio
         // Please take care when changing it.
 }
 
-typedef Sequence< ::rtl::OUString > SS;
+typedef Sequence< ::rtl::OUString > JSS;
 //------------------------------------------------------------------------------
-SS ODBCDriver::getSupportedServiceNames_Static(  ) throw (RuntimeException)
+JSS ODBCDriver::getSupportedServiceNames_Static(  ) throw (RuntimeException)
 {
-    SS aSNS( 1 );
+    JSS aSNS( 1 );
     aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver");
     return aSNS;
 }
@@ -81,7 +81,7 @@ SS ODBCDriver::getSupportedServiceNames_Static(  ) throw (RuntimeException)
 //------------------------------------------------------------------
 sal_Bool SAL_CALL ODBCDriver::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
 {
-    SS aSupported(getSupportedServiceNames());
+    JSS aSupported(getSupportedServiceNames());
     const ::rtl::OUString* pSupported = aSupported.getConstArray();
     const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
     for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
@@ -91,7 +91,7 @@ sal_Bool SAL_CALL ODBCDriver::supportsService( const ::rtl::OUString& _rServiceN
 }
 
 //------------------------------------------------------------------
-SS SAL_CALL ODBCDriver::getSupportedServiceNames(  ) throw(RuntimeException)
+JSS SAL_CALL ODBCDriver::getSupportedServiceNames(  ) throw(RuntimeException)
 {
     return getSupportedServiceNames_Static();
 }
diff --git a/desktop/Executable_oosplash.mk b/desktop/Executable_oosplash.mk
index b8919d5..7bb1563 100644
--- a/desktop/Executable_oosplash.mk
+++ b/desktop/Executable_oosplash.mk
@@ -78,7 +78,7 @@ $(eval $(call gb_Executable_use_externals,oosplash,\
 
 endif
 
-ifeq ($(OS),SOLARIS)
+ifeq ($(OS),CS5SOLARIS)
 
 $(eval $(call gb_Executable_use_libraries,oosplash,\
     -lsocket \
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index de22417..ff30923 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -65,7 +65,7 @@ $(eval $(call gb_Library_use_libraries,sal,\
 	$(if $(filter $(OS),LINUX), \
 		dl \
 	) \
-	$(if $(filter $(OS),SOLARIS), \
+	$(if $(filter $(OS),CS5SOLARIS), \
 		nsl \
 		socket \
 	) \
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 3a5dac5..b9ddf50 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -1276,7 +1276,7 @@ SAL_CALL osl_mapFile (
             OSL_TRACE(
                 "posix_madvise(..., POSIX_MADV_WILLNEED) failed with %d", e);
         }
-#elif defined SOLARIS
+#elif defined CS5SOLARIS
         if (madvise(static_cast< caddr_t >(p), nLength, MADV_WILLNEED) != 0)
         {
             OSL_TRACE("madvise(..., MADV_WILLNEED) failed with %d", errno);
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index 7411e7f..361e54a 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -314,7 +314,7 @@ void osl_InitSparcV9(void)
 #endif
 
 #if    ( defined(__GNUC__) && (defined(X86) || defined(X86_64)) )\
-    || ( defined(SOLARIS) && defined (__SUNPRO_C) && defined(__i386) )
+    || ( defined(SOLARIS) && defined(__i386) )
 
 /* Safe default */
 int osl_isSingleCPU = 0;
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 8639793..3149459 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -67,6 +67,9 @@ ifeq ($(GXX_INCLUDE_PATH),)
 GXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
 endif
 
+GXX_INCLUDE_PATH += \
+	-I/opt/tools/include
+
 gb_CFLAGS := \
 	$(gb_CFLAGS_COMMON) \
 	-fPIC \
diff --git a/solenv/inc/_tg_shl.mk b/solenv/inc/_tg_shl.mk
index e666042..614a176 100644
--- a/solenv/inc/_tg_shl.mk
+++ b/solenv/inc/_tg_shl.mk
@@ -99,7 +99,7 @@ $(USE_SHL1VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL1VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP)
 .ENDIF
 
@@ -138,7 +138,7 @@ $(USE_SHL1VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL1VERSIONMAP)"!=""
 USE_SHL1VERSIONMAP=$(MISC)/$(SHL1VERSIONMAP:b)_$(SHL1TARGET)$(SHL1VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP)
 .ENDIF
 
@@ -584,7 +584,7 @@ $(USE_SHL2VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL2VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP)
 .ENDIF
 
@@ -623,7 +623,7 @@ $(USE_SHL2VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL2VERSIONMAP)"!=""
 USE_SHL2VERSIONMAP=$(MISC)/$(SHL2VERSIONMAP:b)_$(SHL2TARGET)$(SHL2VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP)
 .ENDIF
 
@@ -1069,7 +1069,7 @@ $(USE_SHL3VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL3VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP)
 .ENDIF
 
@@ -1108,7 +1108,7 @@ $(USE_SHL3VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL3VERSIONMAP)"!=""
 USE_SHL3VERSIONMAP=$(MISC)/$(SHL3VERSIONMAP:b)_$(SHL3TARGET)$(SHL3VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP)
 .ENDIF
 
@@ -1554,7 +1554,7 @@ $(USE_SHL4VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL4VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP)
 .ENDIF
 
@@ -1593,7 +1593,7 @@ $(USE_SHL4VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL4VERSIONMAP)"!=""
 USE_SHL4VERSIONMAP=$(MISC)/$(SHL4VERSIONMAP:b)_$(SHL4TARGET)$(SHL4VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP)
 .ENDIF
 
@@ -2039,7 +2039,7 @@ $(USE_SHL5VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL5VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP)
 .ENDIF
 
@@ -2078,7 +2078,7 @@ $(USE_SHL5VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL5VERSIONMAP)"!=""
 USE_SHL5VERSIONMAP=$(MISC)/$(SHL5VERSIONMAP:b)_$(SHL5TARGET)$(SHL5VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP)
 .ENDIF
 
@@ -2524,7 +2524,7 @@ $(USE_SHL6VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL6VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP)
 .ENDIF
 
@@ -2563,7 +2563,7 @@ $(USE_SHL6VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL6VERSIONMAP)"!=""
 USE_SHL6VERSIONMAP=$(MISC)/$(SHL6VERSIONMAP:b)_$(SHL6TARGET)$(SHL6VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP)
 .ENDIF
 
@@ -3009,7 +3009,7 @@ $(USE_SHL7VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL7VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP)
 .ENDIF
 
@@ -3048,7 +3048,7 @@ $(USE_SHL7VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL7VERSIONMAP)"!=""
 USE_SHL7VERSIONMAP=$(MISC)/$(SHL7VERSIONMAP:b)_$(SHL7TARGET)$(SHL7VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP)
 .ENDIF
 
@@ -3494,7 +3494,7 @@ $(USE_SHL8VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL8VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP)
 .ENDIF
 
@@ -3533,7 +3533,7 @@ $(USE_SHL8VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL8VERSIONMAP)"!=""
 USE_SHL8VERSIONMAP=$(MISC)/$(SHL8VERSIONMAP:b)_$(SHL8TARGET)$(SHL8VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP)
 .ENDIF
 
@@ -3979,7 +3979,7 @@ $(USE_SHL9VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL9VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP)
 .ENDIF
 
@@ -4018,7 +4018,7 @@ $(USE_SHL9VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL9VERSIONMAP)"!=""
 USE_SHL9VERSIONMAP=$(MISC)/$(SHL9VERSIONMAP:b)_$(SHL9TARGET)$(SHL9VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP)
 .ENDIF
 
@@ -4464,7 +4464,7 @@ $(USE_SHL10VERSIONMAP) .PHONY:
 
 .ENDIF			# "$(SHL10VERSIONMAP)"!=""
 
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP)
 .ENDIF
 
@@ -4503,7 +4503,7 @@ $(USE_SHL10VERSIONMAP) :
 #and now for the plain non-generic way...
 .IF "$(SHL10VERSIONMAP)"!=""
 USE_SHL10VERSIONMAP=$(MISC)/$(SHL10VERSIONMAP:b)_$(SHL10TARGET)$(SHL10VERSIONMAP:e)
-.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID"
+.IF "$(OS)" != "AIX" && "$(OS)" != "ANDROID" && "$(OS)" != "SOLARIS"
 SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP)
 .ENDIF
 
diff --git a/tools/CppunitTest_tools_test.mk b/tools/CppunitTest_tools_test.mk
index 13c663a..4133ade 100644
--- a/tools/CppunitTest_tools_test.mk
+++ b/tools/CppunitTest_tools_test.mk
@@ -49,9 +49,9 @@ $(eval $(call gb_CppunitTest_use_libraries,tools_test, \
     $(gb_STDLIBS) \
 ))
 
-$(eval $(call gb_CppunitTest_use_static_libraries,tools_test, \
-    ooopathutils \
-))
+#`$(eval $(call gb_CppunitTest_use_static_libraries,tools_test, \
+#    ooopathutils \
+#))
 
 $(eval $(call gb_CppunitTest_set_include,tools_test,\
     $$(INCLUDE) \


More information about the LibreOffice mailing list