-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Bounty $$: Termux ReactNative Integration issue support #1983
Comments
You are directly using https://github.com/termux/termux-packages/wiki/Building-packages https://github.com/termux/termux-packages/wiki/Termux-file-system-layout You are currently also targeting sdk 28 so termux will work for now, but if you plan to publish on playstore or target sdk 29 plus then you will face other issues as well which you fine info for at the following link. In that case using https://github.com/termux/termux-packages/wiki/Termux-and-Android-10 |
Hello @agnostic-apollo , thanks for your support! I've been learning and trying and following the wikis. I'm using your docker termux build environment and managed to create some .deb packages with a customized $PREFIX by running the As a side note I didn't fully understand the following sentence about having an apt repository in the web server: I used the https://dl.bintray.com/termux/termux-packages-24 repository as it looked to have more than enough packages for my purposes but not sure if running the script like: Would you please advice on how to generate such a complete environment using my customized |
It is not possible to use generate-bootstraps.sh without apt repository because it needs some metadata. It is not possible to use official packages to generate bootstrap archives with custom prefix. All three steps shown above are important. |
Thanks a lot! I will try those steps now I understood :)
Sent from myMail for iOS
Saturday, 3 April 2021 10:52 -0600 from ***@***.*** ***@***.***>:
***@***.***Marino
…* Compile packages with your custom prefix.
* Create apt repository and push it to either local or remote web server.
* Run generate-bootstraps.sh script with custom configuration (prefix & url).
It is not possible to use generate-bootstraps.sh without apt repository because it needs some metadata. It is not possible to use official packages to generate bootstrap archives with custom prefix. All three steps shown above are important.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub , or unsubscribe .
|
Or you can try the following experimental Firstly, you need to pull the latest changes from Then
It would be better if you ran If you get If you get Good-luck! Edit:
|
@agnostic-apollo I gotta say THANK YOU!!! The bootstrap package was successfully created and then I managed to make it work in my app. @agnostic-apollo , @xeffyr I ran into another issue (Hopefully this is the last time I bother you) I got the following error when trying to install a package using dpkg (I built this package using the build-package.sh script and custom I even analyzed the dpkg binary in my bootstrap and could not find any hard-coded P.S. If you prefer I could become a Backer instead of the crypto bounty for some time to support the further development of termux, let me know what do you prefer :) THANKS AGAIN!! |
Few possible causes:
Run |
@xeffyr I don't think the hard coded Anyways, @simbadMarino you likely compiled the package with the wrong package name. In my default bootstrap, with additional And you are very welcome! :) I am glad to hear at least the bootstrap worked to start Termux app fork. About the bounty, the help is usually free on my part so its not an obligation to give it. But if you still wanna give it, you can check out my donation links here. Currently, I haven't set any cryto though, not sure how I will get it in my bank even, so if one of the payment channels in the link work for you, then great, otherwise no issue. As for being a backer for termux, prioritize backing @xeffyr or @Grimler91 since they do a lot more maintenance than me and have done it for far longer. Thanks |
Ah, just looked over patches with Then issue perhaps remains that one or more packages are still compiled with wrong prefix, either |
No worries, I was using a text editor. Yeah, likely, a clean build should hopefully solve the issue. |
Hello @xeffyr I sent the XMR rewards this morning ;) (I had to leave my wallet sync for hours lol) and already sent an email to discuss details to you @agnostic-apollo In regards of the issue, I removed all my current .deb files in the /deb folder and ran the bootstrap build script again, will check the results today afternoon and will come back with the results. Thanks! |
I see, thanks. |
Clearing debs is not enough. Already compiled source files will just be repacked as debs again. You need to run |
yep, I also cleaned everything with |
Ah, okay, that's fine then. Good luck. May the C be with you :) |
Hey @agnostic-apollo @xeffyr I got the same error when I tried again, however my final use case is to execute an specific binary file and I could finally do it today so I can live with that issue for a while :) Just in case you notice something in the build log I'm attaching it for you to take a look whenever you have some free time: Thanks both again for your great support! I hope I can somehow contribute to termux later on with fixes, mirrors, etc... |
From the log file I see that prefix is custom ( |
@simbadMarino When you built the bootstrap again after If you already reinstalled the bootstrap again and inspecting contents like xeffyr suggested didn't give anything useful, the maybe compile I am running And you are welcome. And thanks for considering future support. Glad your use case at least works. |
Hello @xeffyr , @agnostic-apollo , so at the end looks like I'll need to solve the dpkg issue cuz I need to compile on device to get my binaries hehe. drwxr-xr-x builder/builder 0 2021-02-09 05:36 ./ I will re-run the deb building and try again . Will keep you posted thanks! |
Good news!! I rebuild and could install git and pcre:
Another question... what if I want to manually build for example "clang" but there is no clang build.sh file?
Is there a way to add the build script to avoid rebuilding the whole bootstrap? (I'll do that anyway in the near future but just for testing purposes ) |
|
Phew! Congratz! ;) |
hey guys! hope you are doing great! I have 2 questions, everything is running fine with the integration I'm making, however I'd like to improve the way the user will interact with the binary I'm using... so:
Thanks and regards!! |
Can you explain this a bit more. How have you compiled this binary? And are you trying to place it in the bootstrap zip file manually, so that during installation it is automatically extracted to
Copied where and how, and what does not "not recognized" mean. Copied into the bootstrap or into Note that extraction of bootstrap.zip only takes place once during initial installation of APK. Even updates will not re-extract it, unless
I think you are again trying to update the app and hoping for the updated If |
If you don't want to reinstall termux, you can run |
Yes, I'm adding the
Yes, ples check picture above :)
I'm doing a clean install and still not getting te btfs copied in the $PREFIX/bin folder after installation
I've tried this and worked, will do this in the meantime :)
Thanks for the reply! |
That's a nice tip! thanks! |
Multiple Welcomes!
Well, that's weird. How are you checking this? And 135MB! I hope you are not planning for a playstore release, cause |
Bootstrap archives is either overwritten during app build time or changes were made to wrong arch. If not, suggesting to clean all caches and intermediate artifacts (
Bootstrap archives have own size limit, specifically their current implementation through shared library blobs. |
Lolz, a much better laptop. Good luck though. |
Hi @agnostic-apollo , just set up a powerful VM and it's done building in less than an hour 😆. However, the build still failed. I'm on the latest Here are the steps I made:
Attached is the P.S. I'm really grateful for taking the time to help me. Thank you so much! |
@Grimler91 alicevision/geogram#2 (comment) agnostic-apollo/termux-packages@8548865 https://github.com/agnostic-apollo/termux-packages/runs/8076472144
|
Seems cmake's scripts for finding pthread no longer supports android. I suppose it started with this 2 yo commit, so a bit weird that we have not seen it before. "Fixed" in termux/termux-packages@af3d7b8. |
Ah, interesting. Thanks a lot for the fix. @Cymmer you can go ahead and pull latest changes in |
Thank you, everyone! @agnostic-apollo I just finished trying to build the bootstraps again. Unfortunately, there's another error, something on |
You are just a curse, ain't you! |
I'm really sorry hahaha 😆 |
Yeah, I am are really sorry to meet you too! :D Should be fixed in termux/termux-packages@6e75ec41 And thanks for the bug reports. But one more and insta-block! And @Grimler91 maybe we should consider building bootstrap packages without the |
Sounds like a good idea. I should probably write a checklist on stuff to do on ndk updates, this can be one of the things to check |
Cool. Will look into writing a github workflow for |
@agnostic-apollo Sorry for the late reply. Been out for a while
So far, I just finished the build and it failed :( . But this time it's on me because I just allocated a small amount of storage on my cloud VM hahahaha. So far, it's working already. It has built the bootstraps for all architectures except for |
No need for apologies for late replies. Ha, serves you right! Adding an option to run |
Hi @agnostic-apollo , I have successfully built the bootstraps! Thank you so much. However, when I tried to use the bootstraps in the latest master branch of Steps made:
|
Searching on the internet for |
Hello @agnostic-apollo, I have been following the instructed steps for a while trying to build the termux bootstraps for my own app, using the
Because I have checked the packages directory and in it there is no bzip2 or curl. Is this the reason of the error? Remember I am new to Termux so I might be slow to respond. Anyways thank you in advance. |
Firstly, best wait couple of days for fixes for Secondly, post the exact error for "not found in any selected repo.", don't see anywhere in
https://github.com/termux/termux-packages/tree/master/packages/libcurl |
if [ -z "${TERMUX_PKG_BUILDER_DIR}" ]; then
termux_error_exit "No package $TERMUX_PKG_NAME found in any of the enabled repositories. Are you trying to set up a custom repository?"
fi I wonder what is Also the
But what about
I have a low end pc & I am running In conclusion, Please help with Edit- I just found |
Because they both are subpackages.
It is what it is. Rebuild would be required, especially while compiling packages for different architectures. But currently, due to broken state unnecessary packages are also getting built, like |
Can I continue with the already generated bootstraps? And |
You might be able to use already built debs, but you will have to do figure it out yourself, as out of scope for me to help out with an older version of the script. And you can also use github actions to build bootstraps if you have such a slow pc, a workflow will be provided. |
Thank you. I decided I shall run it using GitHub actions. But please do me a favour by notifying me when the build-bootstrap.sh is fixed along with informing about the new changes. Nice to meet you @agnostic-apollo. |
Welcome. Sure. |
Anyways can you tell how to execute it using GitHub actions. I was building nodejs for a necessity and it's so slow that it will never finish. It's generating CXX objects and it has to generate 3563 of them, in twenty minutes it's done only 50. In that speed the whole thing would take like 23 hours!! So please help me how to run the GitHub actions. I have already forked the repo. Please prescribe me which action to execute to build only one package- nodejs. |
You can use something like the
https://github.com/termux/termux-packages/actions/runs/9872444546 |
Sorry to disturb you again @agnostic-apollo, I had decided to think about the bootstraps later & try open a minimal Termux window (although not working due to absence of bootstraps) under my app name org.stellarweb.spider. I had actually merged my app into termux as I had terribly failed in doing the reverse, so I find-replaces all com.termux in the directory (ofcourse kept the implementation com.termux:termux-am-library one) but still it always crashes. I seem to be unable to figure out the problem. Report InfoUser Action: TermuxAm Socket Server ErrorError Code:
TermuxAm Socket Server Run ConfigPath: Am CommandCheckDisplayOverAppsPermission: Spider App InfoAPP_NAME: Device InfoSoftwareOS_VERSION: HardwareMANUFACTURER: That JniResult file doesn't implement createServerSocketNative (and a lot more like setSocketReadTimeout, available, send, read, accept, closeSocket) anywhere (not even in Termux's own source code) but they are being overriden for sure in LocalSocketManager. So what am I missing? |
Have you modified this?
And have you changed the package of |
I am very happy to say IT WORKED!! I changed that & a few But I cheated, instead of building the bootstraps, I took Termux's own bootstraps & find replaced But I didn't work, elf headers got corrupted. Because my app name was But then I did a final try, I changed I ran the code and here is the result- THANKS A LOT @agnostic-apollo, WITHOUT YOU I WOULD HAVE NEVER ACHIEVED THIS!! THANK YOU |
Hello @agnostic-apollo, this is probably the last time I shall bother you. I had only a final question- when is the 0.119-beta going to be pushed to stable? (just curious to use it for my app, but merging my app into termux takes me like half an hour, replacing a variety of files, etc; also just now i got confused & in the name of updating to 0.119-beta, i replaced my app's termux 0.118 back with the same 0.118 & wasted 30 minutes) |
You are very welcome and congratz on getting it working. Yeah, same length of package name would have been required for patching bootstrap, but not feasible for everyone. The |
Hello termux community! I hope this is the right place to ask for your help. I'm running some issues while trying to integrate the termux app into a React Native app.
Looks like the installation of packages is done OK however I'm getting this error when lauching TermuxActivity:
exec("/data/data/com.justshare/files/usr/bin/login"): No such file or directory
with the following output in the Run window:
I/com.justshare: Background concurrent copying GC freed 5842(2286KB) AllocSpace objects, 0(0B) LOS objects, 17% free, 27MB/33MB, paused 960us total 540.557ms
I/com.justshare: Background young concurrent copying GC freed 89594(5243KB) AllocSpace objects, 0(0B) LOS objects, 15% free, 28MB/33MB, paused 8.651ms total 268.872ms
W/com.justshare: type=1400 audit(0.0:145): avc: granted { execute } for name="login" dev="vdc" ino=82904 scontext=u:r:untrusted_app_27:s0:c140,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c140,c256,c512,c768 tclass=file app=com.justshare
W/com.justshare: Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (greylist, reflection, allowed)
I'm attaching a brief gif showing the problem:
I have tried lots of different alternatives but I'm getting out of ideas honestly as I'm not a mobile dev expert neither totally understand termux code (even after weeks of study lol)
I'm offering a $40 US dollar bounty in crypto ( Monero, Ripple, TRX, BTT or any TRON token) to whoever finds a solution and publish it here first.
I think it should be a really easy to solve issue for you but honestly cannot see the light now and I'm a bit desperate to find a solution now lol.
Link to the complete repo: https://github.com/simbadMarino/dCloud
Let me know if you need additional info. Thanks and I hope I can your support :)
The text was updated successfully, but these errors were encountered: