Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Android build is broken #59

@ruslo

Description

@ruslo

I've got next error while trying to build glog for Android (API 19):

/.../glog/src/logging.cc: In member function 'virtual void google::{anonymous}::LogFileObject::Write(bool, time_t, const char*, int)':
/.../glog/src/logging.cc:1118:46: error: 'POSIX_FADV_DONTNEED' was not declared in this scope
         posix_fadvise(fileno(file_), 0, len, POSIX_FADV_DONTNEED);

Compiler options:

/.../android-ndk/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ \
    -DANDROID \
    -DGOOGLE_GLOG_DLL_DECL="" \
    -fexceptions \
    -frtti \
    -Wno-psabi \
    --sysroot=/.../android-ndk/android-ndk-r10e/platforms/android-19/arch-arm \
    -funwind-tables \
    -finline-limit=64 \
    -fsigned-char \
    -no-canonical-prefixes \
    -march=armv7-a \
    -mfloat-abi=softfp \
    -mfpu=neon \
    -fdata-sections \
    -ffunction-sections \
    -Wa,--noexecstack \
    -std=c++11 \
    -marm \
    -fno-omit-frame-pointer \
    -fno-strict-aliasing \
    -O0 \
    -g \
    -DDEBUG \
    -D_DEBUG \
    -fPIC \
    -I/.../glog/src \
    -I/.../glog/_builds/android-ndk-r10e-api-19-armeabi-v7a-neon-Debug \
    -isystem /.../android-ndk/android-ndk-r10e/platforms/android-19/arch-arm/usr/include \
    -isystem /.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include \
    -isystem /.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include \
    -isystem /.../android-ndk/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/backward \
    -Wno-unnamed-type-template-args \
    -o CMakeFiles/glog.dir/src/logging.cc.o \
    -c /.../glog/src/logging.cc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions