Opened 5 years ago
Last modified 5 years ago
#13274 new Bugs
boost.filesystem compile problem on Android
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.65.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello, in attempt to build boost for android with more or less reasonable strict settings (-Werror) I uncovered some bugs which I cannot report on github because these projects have Issues disabled.
/usr/local/opt/android-ndk/android-ndk-r16-beta1//sources/android/support/include/stdio.h:36:25: error: invalid token at start of a p reprocessor expression #if __USE_FILE_OFFSET64 && __ANDROID_API__ < __ANDROID_API_N__
This happens because filesystem defines a "harmless" macro:
libs/filesystem/src/operations.cpp:18:9: warning: '__USE_FILE_OFFSET64' macro redefined [-Wmacro-redefined] #define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX ^
While this check was #if defined(__USE_FILE_OFFSET64)
in previous android versions, it seems to have changed when they introduced unified headers. It's probably more "harmless" to define an integer value in boost.filesystem rather than persuade Google to fix their code.
Change History (3)
comment:1 by , 5 years ago
comment:3 by , 5 years ago
this bug can be closed: the released NDK added the missing defined() last year.
This is using
clang
toolchain onAndroid NDK r16 beta1
.Reference to user-config.jam for the build