Closed jneb closed 7 years ago
I checked the android's ndk toolchain include, fount it didn't support grp's setgrent.
57 __BEGIN_DECLS
58 struct group *getgrgid(gid_t);
59 struct group *getgrnam(const char *);
60
61 #if 0 /* MISSING FROM BIONIC */
62 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XPG_VISIBLE
63 struct group *getgrent(void);
64 void setgrent(void);
65 void endgrent(void);
66 int getgrgid_r(gid_t, struct group *, char *,
67 size_t, struct group **);
68 int getgrnam_r(const char *, struct group *, char *,
69 size_t, struct group **);
70 #endif
71 #if __BSD_VISIBLE
72 void setgrfile(const char *);
73 int setgroupent(int);
74 char *group_from_gid(gid_t, int);
75 #endif
76 #endif /* MISSING */
77
android-ndk-r14b/platforms/android-19/arch-arm/usr/include/grp.h
61 #if 0 / MISSING FROM BIONIC / means it won't be enabled.
So, what do i do to get pip to work on my phone? Is there a stub for grp, for example?
I found that pip segfaults on my Huawei P8 lite. I exactly pinpointed where: in shutil.py there is a statement try: from grp import getgrnam ... and I found that just typing "import grp" in the console gives a segfault. Apparently this is a builtin, since single stepping in pdb doesn't work. Hope this helps.