[Libreoffice] System nss headers define FREEBSD, break build

Francois Tigeot ftigeot at wolfpond.org
Sun Nov 20 02:48:17 PST 2011


Hi,

I've just been bitten by this issue and thought this warranted some sort of
warning.

Just to be clear, I am _not_ trying to build on a FreeBSD system.

I've not done a complete build since the required dependencies to the mozilla
libraries and headers were introduced and I was quite surprised to see it
didn't finish anymore:

/build/LibreOffice/core/solver/unxdfly.pro/inc/osl/endian.h:104:1: warning: "_LITTLE_ENDIAN" redefined
In file included from /usr/include/sys/types.h:53,
                 from /usr/pkg/include/nspr/obsolete/protypes.h:79,
                 from /usr/pkg/include/nspr/prtypes.h:517,
                 from /usr/pkg/include/nspr/plarena.h:48,
                 from /usr/pkg/include/nss/nss/cert.h:47,
                 from /build/LibreOffice/core/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:42:
/usr/include/machine/endian.h:56:1: warning: this is the location of the previous definition
In file included from /build/LibreOffice/core/solver/unxdfly.pro/inc/tools/solar.h:33,
		 from /build/LibreOffice/core/solver/unxdfly.pro/inc/tools/string.hxx:32,
		 from /build/LibreOffice/core/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:82:
/build/LibreOffice/core/solver/unxdfly.pro/inc/osl/endian.h:105:21: error: operator '==' has no left operand
/build/LibreOffice/core/solver/unxdfly.pro/inc/osl/endian.h:107:21: error: operator '==' has no left operand

Lines 103-107 of endian.h are in a #if defined(FREEBSD) section

After some more digging I found out FREEBSD is defined in the system version
of nspr/prcpucfg.h

I'll try to disable the use of system nspr headers as a workaround.

-- 
Francois Tigeot


More information about the LibreOffice mailing list