Bug 20222 – druntime fails to build for Android (using LDC 1.17)

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
Other
Creation time
2019-09-18T00:43:13Z
Last change time
2019-09-18T02:05:42Z
Keywords
pull
Assigned to
No Owner
Creator
Puneet Goel

Comments

Comment #0 by puneet — 2019-09-18T00:43:13Z
Following the build process on https://wiki.dlang.org/Build_D_for_Android $ ldc-build-runtime --ninja --targetPreset=Android-aarch64 --buildDir=droid64 gives gc/os.d(254): Error: module `core.sys.posix.unistd` import `_SC_PHYS_PAGES` not found
Comment #1 by dlang-bot — 2019-09-18T01:18:40Z
@puneet created dlang/druntime pull request #2804 "Fix Issue 20222 -- druntime fails to build for Android" fixing this issue: - Fix Issue 20222 -- druntime fails to build for Android Commit https://github.com/dlang/druntime/commit/d931921a adds a dependency on _SC_PHYS_PAGES which is not defined in the module core.sys.posix.unistd for Android. This breaks compilation of druntime on/for Android platform. Porting this constant from Android bionic source file https://android.googlesource.com/platform/bionic/+/master/libc/include/bits/sysconf.h fixes the issue. https://github.com/dlang/druntime/pull/2804
Comment #2 by puneet — 2019-09-18T02:05:42Z
Looks like there is already a fix on the stable branch. https://github.com/dlang/druntime/commit/e4a844e0