### Build libobjc2 -- The ASM compiler identification is Clang
-- Found assembler: /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- Check for working C compiler: /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- Check for working C compiler: /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- Check for working CXX compiler: /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Testing C++ interop -- Testing C++ standard library -- No useable C++ runtime found -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- GNUstep install type set to NONE -- Performing Test CXA_ALLOCATE_EXCEPTION_NOEXCEPT_COMPILES -- Performing Test CXA_ALLOCATE_EXCEPTION_NOEXCEPT_COMPILES - Success -- Configuring done -- Generating done -- Build files have been written to: /Users/heron/Development/Algoriddim/gnustep-toolchain/gnustep-android/gnustep/libobjc2/build /Users/heron/Development/Algoriddim/gnustep-toolchain/gnustep-android/gnustep/libobjc2/build/CMake [1/1] Linking CXX executable test_cxx_runtime FAILED: test_cxx_runtime : && /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot /Users/heron/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mfpu=vfpv3-d16 -fno-addrsig -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++ -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections CMakeFiles/test_cxx_runtime.dir/typeinfo_test.cc.o -o test_cxx_runtime -latomic -lm && : CMakeFiles/test_cxx_runtime.dir/typeinfo_test.cc.o:typeinfo_test.cc:vtable for type_info2: error: undefined reference to 'std::type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. ### LIBOBJC2 BUILD FAILED!!! I am running into the above error when trying to build for Android. I have the latest ndk and sdk installed with Android studio. Does anyone have any idea offhand why C++ isn't finding it's runtime? I will attach the build script I am using to generate the ninja script.... GC -- Gregory Casamento GNUstep Lead Developer / OLC, Principal Consultant http://www.gnustep.org <https://mailtrack.io/trace/link/a6a9247e5d7f36c677963fd7b976211bf06cacfe?url=http%3A%2F%2Fwww.gnustep.org&userId=2790543&signature=bec24e4e6627ebe3> - http://heronsperch.blogspot.com <https://mailtrack.io/trace/link/7a6fff36452d3b7a3ae30aa1a813cf06e04e0550?url=http%3A%2F%2Fheronsperch.blogspot.com&userId=2790543&signature=5848f367d8e1e7b3> http://ind.ie/phoenix/ <https://mailtrack.io/trace/link/ac3ea346cabf8bb14dafedfa2d1d324ac0f7cbba?url=http%3A%2F%2Find.ie%2Fphoenix%2F&userId=2790543&signature=4d762ef937872301>
# Script by Gregory Casamento & Ivan Vucica # # from android documentation: # http://web.archive.org/web/20190210195102/ # https://developer.android.com/ndk/guides/cmake export ANDROID_HOME="${HOME}"/Library/Android/sdk export ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle export ANDROID_CMAKE_ROOT=${ANDROID_HOME}/cmake/3.10.2.4988404 export CMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake export NINJA=${ANDROID_CMAKE_ROOT}/bin/ninja export ROOT_DIR=`pwd` export GSROOT=${ROOT_DIR}/gnustep export INSTALL_PREFIX=${ROOT_DIR}/android-gnustep export ANDROID_GNUSTEP_INSTALL_ROOT="${GSROOT}"/"${INSTALL_PREFIX}" cd $ROOT_DIR echo "### Setup build for libobjc2" rm -rf "${GSROOT}" mkdir -p "${GSROOT}" if [[ ! -e "${GSROOT}"/libobjc2 ]] ; then cd "${GSROOT}" git clone https://github.com/gnustep/libobjc2 mkdir -p "${GSROOT}"/libobjc2/build fi echo "### Build libobjc2" cd "${GSROOT}" ${ANDROID_CMAKE_ROOT}/bin/cmake \ -H"${GSROOT}"/libobjc2 \ -B"${GSROOT}"/libobjc2/build \ -G"Ninja" \ -DANDROID_ABI=armeabi-v7a \ -DANDROID_NDK=${ANDROID_NDK_HOME} \ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="${GSROOT}"/libobjc2/build \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_MAKE_PROGRAM=${NINJA} \ -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ -DANDROID_NATIVE_API_LEVEL=23 \ -DANDROID_TOOLCHAIN=clang \ -DCMAKE_INSTALL_PREFIX="${ANDROID_GNUSTEP_INSTALL_ROOT}" cd ${GSROOT}/libobjc2/build/CMake/ pwd sed 's/-Wl,--fatal-warnings//' build.ninja > build2.ninja && mv build2.ninja build.ninja #sed 's/-stdlib=libc++//g' build.ninja > build2.ninja && mv build2.ninja build.ninja ${NINJA} -j6 if [ "$?" != "0" ]; then echo "### LIBOBJC2 BUILD FAILED!!!" exit 0 fi echo "### Set toolchain vars..." export TOOLCHAIN="${ANDROID_NDK_HOME}"/toolchains/llvm/prebuilt/darwin-x86_64 export CC="${TOOLCHAIN}"/bin/clang export CXX="${TOOLCHAIN}"/bin/clang++ export OBJC="${TOOLCHAIN}"/bin/clang export LD="${CC}" export CFLAGS="--gcc-toolchain=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64 --target=armv7-none-linux-androideabi23" export OBJCFLAGS="${CFLAGS}" export LDFLAGS="${CFLAGS}" echo "### Build make..." cd "${GSROOT}" git clone https://github.com/gnustep/tools-make cd "${GSROOT}"/tools-make ./configure --host=arm-linux-androideabi --prefix="${ANDROID_GNUSTEP_INSTALL_ROOT}" OBJCFLAGS="${OBJCFLAGS} -integrated-as" gnumake install if [ "$?" != "0" ]; then echo "### MAKE BUILD FAILED!!!" exit 0 fi . "${ANDROID_GNUSTEP_INSTALL_ROOT}"/share/GNUstep/Makefiles/GNUstep.sh echo "### Setup build for base..." cd "${GSROOT}" git clone https://github.com/gnustep/libs-base cd "${GSROOT}"/libs-base configure it ./configure --host=arm-linux-androideabi \ --enable-nxconstantstring \ --disable-invocations \ --disable-iconv \ --disable-tls \ --disable-icu \ --disable-xml \ --disable-openssl \ --disable-mixedabi \ --with-cross-compilation-info=./cross.config echo "### Build base..." sed 's/cross_objc2_runtime=0/cross_objc2_runtime=1/g' cross.config > cross.config2 && mv cross.config2 cross.config gnumake LD="${LD}" LDFLAGS="${LDFLAGS} -nopie" -j6 messages=yes install if [ "$?" != "0" ]; then echo "### BASE BUILD FAILED!!!" exit 0 fi
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev