Closed ghost closed 3 years ago
@kubast2 I'm porting proot and talloc, and talloc have been successfully ported. I will commit it in a while.
Oh I see, thank a lot, I will wait patiently then. It is slowly getting late in Pekin, don't compromise on sleep. And have a goodnight.
I assume prlimit is just a thin wrapper from what I saw on glibc/musl, here's a stub:
//prlimit(2)
//Return Value
//On success, these system calls return 0.
//Only for root users, or for users with a capability the syscall doesn't have a kernel defconfig option to disable it, always on
#DEFINE RET_VAL 0
//#DEFINE ERRNO_OVERRIDE
int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlimit *old_limit)
{
#ifdef ERRNO_OVERRIDE
errno = ERRNO_OVERRIDE;
#undef ERRNO_OVERRIDE
#endif
return RET_VAL;
}
#undef RET_VAL
Musl MIT license https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
char *get_current_dir_name(void) {
struct stat a, b;
char *res = getenv("PWD");
if (res && *res && !stat(res, &a) && !stat(".", &b)
&& (a.st_dev == b.st_dev) && (a.st_ino == b.st_ino))
return strdup(res);
return getcwd(0, 0);
}
I will provide a repository for it if that will make it cleaner for you. https://github.com/kubast2/proot_stubs
yes, your workaround works. but new problem is coming:
./loader/assembly.S:17:1: error: unknown directive
.type syscall_6, @function
^
./loader/assembly.S:44:1: error: unknown directive
.type syscall_3, @function
^
./loader/assembly.S:54:1: error: unknown directive
.type syscall_1, @function
From what I can tell this piece of assembly is only supposed to compile for 32bit x86 platform.
"The .type directive sets the type of a symbol." Looks like a problem with the assembler? Or maybe some other component of NDK? Maybe google have disabled this feature and the NDK just doesn't come with it. But if it tries to compile it for other targets than x86 then we definitely have a problem.
This directive is part of the (maybe closed) armclang assembler from arm corporation. And of gas(gnu assembler).
I can't seem to find what causes exactly lack of this very directive.
you can try:
ndk-pkg install proot2
I will try integrating it to a project tomorrow/today. I need to do some basic house chores today.
I have wasted a week of my life, and didn't go to sleep one night, first trying to get openjdk9 working, but getting crashed by constant clang and gcc flags intertwining with my host CC and target CC.
And recently getting proot to link right.
I just can't tell this god damn linker, to fucking look at multiple Library paths at once, it annoys me immensely looking at this clang, refusing to look for a library at specified paths, when searching for libraries that are linked to libraries.
I am immensely pissed off and tired of NDK. Next time I will pick an android project, where I never ever touch native linux libraries.
I would rather make a thousand unique AUR and kiss linux packages than ever have to look at android native development kit development ever again.
If you give me your monero donation address, I will pay you around 0.037 XMR for adding it in for me.(because that's how much XMR I hold currently).