subsurface-mobile build error undefined reference to 'rand'

Rick Walsh rickmwalsh at
Fri Jun 16 20:54:37 PDT 2017

It turns out I might actually have a little bit of time to dedicate to
Subsurface over the next couple of weeks, and I thought I'd start by
reviving my Android build chain.  Running packaging/android/, I get
stuck with this error.  Does anyone smarter than me know what's going on?
I'm on Fedora 25, with android-ndk-r13b and Qt5.9.

$ sh packaging/android/
~/src/subsurface ~/src/subsurface
~/src/subsurface/qt-android-cmake ~/src/subsurface
Already up-to-date.
~/src/subsurface ~/src/subsurface
~/src/kirigami ~/src
Already on 'master'
Your branch is up-to-date with 'origin/master'.
>From git://
 * branch            master     -> FETCH_HEAD
Already up-to-date.
error: pathspec 'v2.1.0' did not match any file(s) known to git.
~/src/breeze-icons ~/src
Already up-to-date.
~/src/subsurface/mobile-widgets/qml/kirigami ~/src
org.kde.plasma.kirigami synced from upstream
CMake Deprecation Warning at
/usr/share/cmake/Modules/CMakeForceCompiler.cmake:69 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  subsurface-mobile-build-arm/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:6 (project)

CMake Deprecation Warning at
/usr/share/cmake/Modules/CMakeForceCompiler.cmake:83 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  subsurface-mobile-build-arm/CMakeFiles/3.8.0/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:6 (project)

-- building with libftdi support
-- Checking for module 'libftdi1'
--   Found libftdi1, version 1.3
-- system name Android
-- Found Qt for Android: /home/rick/src/Qt/5.9/android_armv7
-- Found Android SDK: /home/rick/src/subsurface/../android-sdk-linux
-- Found Android NDK: /home/rick/src/subsurface/../android-ndk-r13b
-- Configuring done
-- Generating done
-- Build files have been written to:
Built target version
[100%] Built target translations
[  1%] Automatic MOC for target subsurface-mobile
Generating MOC source subsurface-mobile_autogen/include/moc_enums.cpp
Generating MOC source
Note: No relevant classes found. No output generated.
Generating MOC source subsurface-mobile_autogen/include/moc_settings.cpp
[  1%] Built target subsurface-mobile_autogen
[  2%] Automatic MOC for target subsurface_models
[  2%] Built target subsurface_models_autogen
[ 18%] Built target subsurface_models
[ 19%] Automatic MOC for target subsurface_corelib
[ 19%] Built target subsurface_corelib_autogen
[ 19%] Built target version
Scanning dependencies of target subsurface_corelib
[ 20%] Building C object core/CMakeFiles/subsurface_corelib.dir/version.c.o
[ 20%] Linking CXX static library libsubsurface_corelib.a
[ 61%] Built target subsurface_corelib
[ 61%] Automatic MOC for target subsurface_profile
[ 61%] Built target subsurface_profile_autogen
[ 71%] Built target subsurface_profile
[ 71%] Generating qrc_kirigami.cpp
[ 72%] Generating qrc_mobile-resources.cpp
Scanning dependencies of target subsurface-mobile
[ 72%] Building CXX object
[ 73%] Building CXX object
[ 73%] Building CXX object
[ 74%] Building CXX object
[ 75%] Building CXX object
[ 76%] Building CXX object
[ 77%] Linking CXX shared library
/home/rick/src/subsurface/libgit2-0.24.1/src/cache.c:117: error: undefined
reference to 'rand'
collect2: error: ld returned 1 exit status
make[2]: *** [] Error 1
make[1]: *** [CMakeFiles/subsurface-mobile.dir/all] Error 2
make: *** [all] Error 2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the subsurface mailing list