subsurface-mobile build error undefined reference to 'rand'

Anton Lundin glance at acc.umu.se
Tue Jun 20 05:10:51 PDT 2017


On 20 June, 2017 - Rick Walsh wrote:

> On 20 June 2017 at 05:59, Anton Lundin <glance at acc.umu.se> wrote:
> 
> > The gcc toolchain we're using in the ndk is about to be deprecated, so
> > we should focus on trying to switch over to clang.
> > 
> > In NDK 15 GCC is no longer supported:
> > https://developer.android.com/ndk/downloads/revision_history.html
> 
> That sounds like a substantial change and I wish I could offer some help.
> I'm not sure the problem with my setup is due to the gcc toolchain so much
> as the ndk configuration.
> 

Its about a jay big patch:

diff --git i/android-mobile/AndroidManifest.xml w/android-mobile/AndroidManifest.xml
index ee035c1e..fe65502f 100644
--- i/android-mobile/AndroidManifest.xml
+++ w/android-mobile/AndroidManifest.xml
@@ -127,8 +128,8 @@ export BUILDROOT=$PWD
 export PATH=${BUILDROOT}/ndk-$ARCH/bin:$PATH
 export PREFIX=${BUILDROOT}/ndk-$ARCH/sysroot/usr
 export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
-export CC=${BUILDROOT}/ndk-$ARCH/bin/${BUILDCHAIN}-gcc
-export CXX=${BUILDROOT}/ndk-$ARCH/bin/${BUILDCHAIN}-g++
+export CC=${BUILDROOT}/ndk-$ARCH/bin/${BUILDCHAIN}-clang
+export CXX=${BUILDROOT}/ndk-$ARCH/bin/${BUILDCHAIN}-clang++
 # autoconf seems to get lost without this
 export SYSROOT=${BUILDROOT}/ndk-$ARCH/sysroot
 export CFLAGS=--sysroot=${SYSROOT}



The only bits that doesn't build with clang is openssl. As far as I
managed to google yesterday, it's fixed in openssl master, but I haven't
tested that and I'm not sure we should go that path.

I haven't either checked if Qt will play nice with a something newer
than openssl 1.0.


One first step is to build everything else with clang, and continue
building openssl with gcc.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list