Fix for r-lib/later#126 compilation on Android #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
timespec_get is not available on Android's Bionic libc -- e.g. in
sys/time.h ... This was raised as an issue in
tinycthread/tinycthread#47 and this fix is based on @mcclure's commit
mcclure/lovr@c322ce2
... see also android/ndk#864
Messages
@jcheng5 if you can give this a shot, that'd be great - I ran into this issue when trying to install
devtools
from CRAN and I'm just sort of learning R itself, so I really have no idea if later is working as intended or not... (see below for notes on testing)Notes
I tested compilation on Termux/aarch64/Android 10 and it does install (Termux currently has R v3.6.3) - since this fix checks for android using a compiler macro (i.e.
#ifdef __ANDROID__
), the impact on any other platform should be zero.I am unable to fully test on Android - Termux doesn't have a (good/working) implementation of Pandoc (the current package uses a qemu-x86_64 to run an x86_64 binary...) -- and getting a working Pandoc on Termux is really difficult right now as there is (to my knowledge) not a working Haskell compiler available. (If someone can suggest the proper method to run tests on the package without doing the Pandoc part, that'd be great! -- I tried an
R CMD build .
in the repo root and that's where I ran into the pandoc error...)