Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuntox on termux #78

Open
piotrcurious opened this issue Nov 4, 2024 · 2 comments
Open

tuntox on termux #78

piotrcurious opened this issue Nov 4, 2024 · 2 comments

Comments

@piotrcurious
Copy link

Hi.
I try to build it on termux.
toxcore and libsodium got installed with few acrobatics.

now i get error from tuntox :
~/tuntox $ make CFLAGS="-I$PREFIX/include"
GEN gitversion.h
CC cJSON.o
CC client.o
CC gitversion.o
CC log.o
CC main.o
main.c:647:37: warning: passing arguments to 'handle_pong_frame' without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
647 | return handle_pong_frame(frame);
| ^
1 warning generated.
CC tox_bootstrap_json.o
CC util.o
Package toxcore was not found in the pkg-config search path.
Perhaps you should add the directory containing `toxcore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'toxcore' found
cc -o tuntox cJSON.o client.o gitversion.o log.o main.o tox_bootstrap_json.o util.o -lpthread -g -pthread -lm -static -lrt
ld.lld: error: unable to find library -lpthread
ld.lld: error: unable to find library -lm
ld.lld: error: unable to find library -lrt
ld.lld: error: unable to find library -lc
cc: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:45: tuntox] Error 1

Which is of course because android/termux use different libc and pthreads implementation.

Perhaps you have any idea how to work around that?

@piotrcurious
Copy link
Author

I used Claude to help me working around, and created limp "howto" on the process :
https://github.com/piotrcurious/tuntox_on_termux/tree/main

The process eventually succeeds, binary compiles and appears to be working (connects ok, not tested everything yet).

Would be great if this would be somehow integrated

@gjedeer
Copy link
Owner

gjedeer commented Nov 13, 2024

I'll definitely merge your Makefile-related PR but this project is not using autoconf/automake as a choice. I apreciate the effort though.

I've packaged it for Debian and FreeBSD (not in repos though) and at no point I regretted not having autoconf. Out of curiosity I asked Claude to create a Termux package for a Makefile-only program and it generated a script without any issues, I did not try it though, lack of time now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants