Build build tools only

Stephan Bergmann sbergman at redhat.com
Mon Nov 30 00:22:03 PST 2015


On 11/28/2015 09:15 PM, Andreas Müller wrote:
> Hi,
>
> Since a while I am trying to build libreoffice with yocto [1][2]
> cross-build system for my embedded devices.
> When building with yocto there are two temporary sysroots: One native
> for all the binaries run on build host during build and one for the
> cross target to link against the libraries.
> What causes me trouble for a while is native saxparser.
> Native build means:
>
> * configure with
>      --enable-debug \
>      --enable-dbgutil \
>      \
>      --enable-python=system \
>      --without-x \
>      --with-system-curl \
>      --with-system-boost \
>      --without-boost-date-time \
>      --without-boost-iostreams \
>      --without-boost-system \
>      --with-system-icu \
>      --with-system-expat \
>      --disable-postgresql-sdbc \
>      --disable-lotuswordpro \
>      --disable-firebird-sdbc \
>      --disable-liblangtag \
>      --disable-openssl \
>      --disable-gltf \
>      --disable-collada \
>      --disable-scripting-beanshell \
>      --disable-scripting-javascript \
>      --disable-graphite \
>      --disable-pdfimport \
>      --disable-orcus \
>      --disable-coinmp
>
> * compile by something like (inspired by make target cross-toolset)
> make -f Makefile.gbuild build-tools
> * install all binaries an their libs manually into native sysroot
>
>  From what I've seen so far there are many binaries used during cross
> build seem to work as expected.
>
> saxparser fails with (patch attached causing more detailed error message)
> ERROR: component context fails to supply service
> 'com.sun.star.xml.sax.Parser' of type 'com.sun.star.xml.sax.XParser'

I have no idea whether and---if yes---why your procedure differs from 
normal LibreOffice cross-compilation scenarios.

Anyway, the dependencies for running saxparser during the build are 
listed in the gb_Executable__register_saxparser define in 
RepositoryExternal.mk:

> # FIXME ure/services.rdb needs cleanup
> # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
> # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
> # FIXME: the library target should be for build too
> define gb_Executable__register_saxparser
> $(call gb_Executable_add_runtime_dependencies,saxparser,\
> 	$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
> 	$(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
> 	$(call gb_Rdb_get_target_for_build,saxparser) \
> 	$(call gb_Rdb_get_target_for_build,ure/services) \
> 	$(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
> 	$(call gb_UnoApi_get_target,udkapi) \
> )
> endef

So what you need to have is (the cross-build equivalents of the "normal" 
locations of):

> instdir/program/libgcc3_uno.so
> instdir/program/unorc
> workdir/Rdb/saxparser.rdb
> instdir/program/services.rdb (a copy of workdir/Rdb/ure/services.rdb)
> instdir/program/types.rdb (a copy of workdir/UnoApiTarget/udkapi.rdb)

(The last two are referenced from instdir/program/unorc as UNO_SERVICES 
and UNO_TYPES, respectively.)  Then, in the i18npool_LD_RULE in 
i18npool/CustomTarget_localedata.mk, the -env:LO_LIB_DIR and 
-env:URE_MORE_SERVICES command line arguments must reference (the 
cross-build equivalents of the "normal" locations of) the 
instdir/program/ directory and workdir/Rdb/saxparser.rdb, respectively.


More information about the LibreOffice mailing list