Hi,
On 03/03/2022 16.08, di liu wrote:
the build environment is linux(centos 7) which installed in vmware (my
host system is macOS) this is my autogen.input content
--with-distro=LibreOfficeAndroid
--with-android-sdk=/home/disco/Documents/dev_env/android_sdk
--with-android-ndk=/home/disco/Documents/dev_env/android_sdk/ndk/20.1.5948944
--with-ant-home=/home/disco/Documents/dev_env/apache-ant-1.10.12
I tried a build with an equivalent autogen.input on Debian testing:
--with-distro=LibreOfficeAndroid
--with-android-sdk=/home/michi/Android/Sdk
--with-android-ndk=/home/michi/Android/Sdk/ndk/20.1.5948944
--with-external-tar=/home/michi/development/libreoffice-external
which worked fine with master (as of commit
0a774bae7d402a6880760b1226a6741604e23f5a).
everything is ok when execute: ./autogen.sh But when I execute: make the
error is happened:
[...]
Linking
/home/disco/Documents/res/libreoffice/android/obj/local/armeabi-v7a/liblo-native-code.so
/home/disco/Documents/res/libreoffice/instdir/program/libuno_cppuhelpergcc3.a(shlib.o):shlib.cxx:function
cppuhelper::detail::loadSharedLibComponentFactory(rtl::OUString
const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString
const&, rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&, std::__ndk1::function<com::sun::star::uno::XInterface*
(com::sun::star::uno::XComponentContext*,
com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>*,
com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*):
error: undefined reference to 'lo_get_constructor_map'
/home/disco/Documents/res/libreoffice/instdir/program/libuno_cppuhelpergcc3.a(shlib.o):shlib.cxx:function
cppuhelper::detail::loadSharedLibComponentFactory(rtl::OUString
const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString
const&, rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&, std::__ndk1::function<com::sun::star::uno::XInterface*
(com::sun::star::uno::XComponentContext*,
com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>*,
com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*):
error: undefined reference to 'lo_get_factory_map'
[...] >
Could you give me some suggestions
If you have current git master without any local changes and 'make
distclean' and trying again doesn't work, you could try using a
different version of the Android NDK, or use LLD as linker instead of
ld.gold by applying the demo patch at
https://gerrit.libreoffice.org/c/core/+/130947 and switching to a newer
NDK; a build here worked with that Gerrit change in place and an
autogen.input containing this:
--with-distro=LibreOfficeAndroid
--with-android-ndk=/home/michi/Android/Sdk/ndk/22.1.7171670/
--with-android-sdk=/home/michi/Android/Sdk
--with-external-tar=/home/michi/development/libreoffice-external
(At least my experience in the past was that it was a bit tricky to find
a combination of Android NDK and linker that would work depending on
architecture and whether this was a release or debug build. But the
problems I encountered back then were more "fundamental" than the
"undefined reference" issue you're encountering. Maybe all of the issues
I had two years ago or so are fixed in newer versions of the toolchain,
but so far I just stayed with what was working back then...)