Skip to content

node-v5.0.0-rc.1 can't work on Android L due to error: only position independent executables (PIE) are supported #3581

@kikijhu

Description

@kikijhu

issue description

I downloaded the latest node-v5.0.0-rc.1 and make it with Android NDK r10e, but it can’t work on Android L.

compile environment

  • ubuntu 14.04
  • python 2.7.6
  • gcc 4.8.4

error log

C:\Users\Kiki>adb shell
# node -v
error: only position independent executables (PIE) are supported.

solution

I searched on Google for solution, found it, to add two flags in Android.mk.

LOCAL_CFLAGS += -fPIE -pie  
LOCAL_LDFLAGS += -fPIE -pie

But it seems node-v5.0.0-rc.1 just uses NDK toolchain, not use NDK to compile a executable file.
So how to add these two flags to node-v5.0.0-rc.1?

Metadata

Metadata

Assignees

No one assigned

    Labels

    armIssues and PRs related to the ARM platform.buildIssues and PRs related to build files or the CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions