-
Notifications
You must be signed in to change notification settings - Fork 74
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
how to compiled R souce code in termux? #135
Comments
i have compied r-base source code in termux today. but still meet some issues. some packages faild to installed. still on finding the way ~ $ R R version 4.1.2 (2021-11-01) -- "Bird Hippie" R is free software and comes with ABSOLUTELY NO WARRANTY. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'demo()' for some demos, 'help()' for on-line help, or |
i could compiled r-base source code in termux now. i will make summary note later. |
the R could not working after update termux. Here is my way to compile latest r-base source code.
after finish config
after finish make
after make install
Finish complete. |
i try another phone , there has error comes out after config, sorry i forget the detail error. run below commands before config if has error comes out after first config.
|
谢谢 |
Worked for me. Thanks! Still, please, could we make your work even more useful for others? Does it make it sense to make available for others the new compiled releases? |
i learn from internet, try way one by one, lucky success at last. Thanks internet. Thanks everyone who share their knowledge in the internet. i do not know whether the R could working or not once termux upgrade in the following days. So i used to run pkg update & pkg upgrade every week, until now the compile R still could working. i hope more and more R fans would like using R in termux, the more people using R in termux the more issues would be found and solved. Lucky , the most R packages i used could be installed in termux. |
The compile way only for android version 11 and termux version 0.117.
I try to compile for my old phone which android version is 7.1.2 this weekend. it has error comes out after run make. it doesn't matter. i think most users would use the latest android and termux version.
|
I couldn't quite get the methods above to work although they were a lot of help in figuring this out. Here is how I built a working version of R on my old Android 7 Get the source of R-4.1.2 and unpack somewhere. Go to that directory. In Makeconf.in change (approx line 60) from LIBS = @libs@ to LIBS = @libs@ -landroid-glob Run "configure" as follows (should all be on one line): ./configure --with-x=no --enable-R-shlib --prefix=/data/data/com.termux/files/usr/local/R-4.1.2 then make and make install If "R" already installed from pkg, then remove Add /data/data/com.termux/usr/local/R-4.1.2/bin to PATH. Go to /data/data/com.termux/usr/local/R-4.1.2/bin/exec and run termux-elf-cleaner * That should do it. If you find errors here or it doesn't work please let me know, and No guarantees but it's working for me so far. |
I'm trying to compile R for Termux under Android 11 according to @leechaowen instructions in this thread but building/updating vignettes for package 'stats' ...
processing ‘reshape.Rnw’
Error: compiling TeX file ‘reshape.tex’ failed with message:
cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'reshape.log': No such file or directory
Execution halted
make[1]: *** [Makefile:103: vignettes] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/src/library'
make: *** [Makefile:80: vignettes] Error 2 I tried installing all latex packages apt could find me : biber, tectonic, texlab, texlive-latexextra and texlive-latexrecommended but that did not help. |
i ununstall termux then reinstall latest termux from f-droid again for my old phone. Complete finish compile R from my way.
|
Thanks so much @leechaowen The only issue I ran into was because I did have wget installed. After doing that, your solution worked like a charm! |
I ran
|
I'm trying to follow your instructions, but I'm getting this error:
I checked and |
export LD_LIBRARY_PATH=$PREFIX/lib
|
thanks!!! I'll try it now |
it worked. Thanks! |
termux is not native linux system , it's hard to install some packages, like shiny. i really like run shiny in my android table, Most R packages i used could install in termux. the good news is the R-project in termux could be shared by ubuntu, run shiny in ubuntu not in termux. First , install Anlinux from F-Droid, Second install ubuntu follow the guide from Anlinux, then run ubuntu and compile R in ubuntu. Here comes the detail steps. 1. install ubuntu in termux 2. run ubuntu after success ubuntu.
Please pay attention all below action run in ubuntu. 3.install necessary packages in ubuntu
4. compiled openssl curl libpng in ubuntu
5.compiled R in ubuntu
6. append below line in .bashrc, then run source .bashrc
7. append below line in .Rprofile
root@localhost:~# cat .Rprofile |
thank you so much for the detailed step. I'll try it!
If 1., R packages should be installed in ubuntu? |
step3 to 7 run in ubuntu. |
Just curious: why do you use AnLinux instead of the ubuntu that is available in termux via proot-distro ? |
No need to compile again once copy the relates folders and files to other devices after complied R in the ubuntu when using AnLinux . Not sure whether it could be workd when using proot-distro for such case . i do not like compile again and again , specailly broken the dependency it need uninstall termux and install termux again . At least no need complie R again for ubuntu when using Anlinux, only need to copy the backup to termux. |
I got this error while running make[4]: Leaving directory '/data/data/com.termux/files/home/R-4.2.0/src/library/tools'
make[4]: Entering directory '/data/data/com.termux/files/home/R-4.2.0/src/library/tools'
installing 'sysdata.rda'
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/home/R-4.2.0/bin/exec/R": invalid ELF file "/data/data/com.termux/files/usr/lib/gcc/aarch64-linux-android/10.3.0/libm.so" load segment[4]: p_offset (0x5000) + p_filesz (0x0) ( = 0x5000) past end of file (0x4540)
make[4]: *** [../../../share/make/basepkg.mk:151: sysdata] Error 1
make[4]: Leaving directory '/data/data/com.termux/files/home/R-4.2.0/src/library/tools'
make[3]: *** [Makefile:36: all] Error 2
make[3]: Leaving directory '/data/data/com.termux/files/home/R-4.2.0/src/library/tools'
make[2]: *** [Makefile:37: R] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/R-4.2.0/src/library'
make[1]: *** [Makefile:28: R] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/R-4.2.0/src'
make: *** [Makefile:61: R] Error 1 termux-info
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://grimler.se/termux-packages-24/ stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# root-repo (sources.list.d/root.list)
deb https://packages.termux.org/apt/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
ffmpeg/stable 5.0.1-2 aarch64 [upgradable from: 5.0.1-1]
htop/stable 3.2.0-1 aarch64 [upgradable from: 3.2.0]
libvpx/stable 1.12.0-rc1-0 aarch64 [upgradable from: 1.11.0]
starship/stable 1.8.0 aarch64 [upgradable from: 1.7.1]
termux-tools version:
0.187
Android version:
12
Kernel build information:
Linux localhost 4.19.113-lineageos-g9eb2570ef9f4 #1 SMP PREEMPT Sat Jun 4 08:33:08 UTC 2022 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
POCO F2 Pro |
I get rid of this issue by upgrading gcc to 11.
For those who don't want to compile R from source, I've built it for you. It's available here: https://github.com/kxxt/termux#r |
I'm getting:
How can I install libcurl headers? Installed libcurl is 8.0.1. Thanks! |
It worked great! Thanks! Just a minor, probably, typo: |
By running R in Ubuntu, I can enjoy almost everything I need to complete my workflow. But at least one piece fails: to access our cooperative database over a VPN. I can ssh our server from Termux, but trying to connect from Ubuntu gives a timeout. I know that this question is beyond the scope of this thread, but as it deals to some extent with running a native Linux system, could you point me in the right direction? Do you know if I can connect to our VPN from Ubuntu running in Termux? If yes, how? Thanks! |
a lot of time was wasted just because some "smart guy" cut out the default utility "which" from Termux ^) (burn in hell) |
so does compiling R in termux works fine already? where is the most recent and complete guide? |
so does compiling R in termux works fine already? where is the most
recent and complete guide?
It compiles perfectly for me on an Android 10 phone and an
Android 11 tablet. I have previously posted my method, just
change 4.1.2 to 4.3.2. I don't have it handy right now but if
I need to repost let me know.
I cannot get it to compile on an older Android 7 tablet,
however. Now if only I could get Octave to compile ... :)
…--
Bob Newell
Honolulu, Hawai`i
- Via GNU/Linux/Emacs/Gnus/BBDB
|
wget https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/base/R-4/R-4.1.2.tar.gz
tar -xzvf R-4.1.2.tar.gz
cd R-4.1.2
./configure --prefix=/data/data/com.termux/files/usr/var/R.4.12
after run config show below,but make install fail
R is now configured for aarch64-unknown-linux-gnu
Source directory: .
Installation directory: /data/data/com.termux/files/usr/var/R.4.12
C compiler: gcc -g -O2
Fortran fixed-form compiler: gfortran -fno-optimize-sibling-calls -g -O2
Default C++ compiler: g++ -std=gnu++14 -g -O2
C++11 compiler: g++ -std=gnu++11 -g -O2
C++14 compiler: g++ -std=gnu++14 -g -O2
C++17 compiler: g++ -std=gnu++17 -g -O2
C++20 compiler: g++ -std=gnu++20 -g -O2
Fortran free-form compiler: gfortran -fno-optimize-sibling-calls -g -O2
Obj-C compiler: gcc -g -O2 -fobjc-exceptions
Interfaces supported: X11
External libraries: pcre2, readline, curl
Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
Options enabled: shared BLAS, R profiling
Capabilities skipped:
Options not enabled: memory profiling
Recommended packages: yes
configure: WARNING: you cannot build info or HTML versions of the R manuals
configure: WARNING: you cannot build PDF versions of the R manuals
configure: WARNING: you cannot build PDF versions of vignettes and help pages
~/Downloads/R-4.1.2 $ make install
make[1]: Entering directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/m4'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/m4'
make[1]: Entering directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/tools'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/tools'
make[1]: Entering directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/doc'
installing doc ...
install: cannot stat 'NEWS.rds': No such file or directory
install: cannot stat 'NEWS.2.rds': No such file or directory
install: cannot stat 'NEWS.3.rds': No such file or directory
make[1]: *** [Makefile:147: install-sources2] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/Downloads/R-4.1.2/doc'
make: *** [Makefile:95: install] Error 1
The text was updated successfully, but these errors were encountered: