termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.19k stars 3.03k forks source link

Package request: julia #58

Open ghost opened 8 years ago

ghost commented 8 years ago

http://julialang.org/

fornwall commented 8 years ago

Thanks for the suggestion! I started a wiki page to keep track of package suggestions and have added Julia there!

Neo-Oli commented 8 years ago

Hi, I am reopening this issue. Package requests will now be labeled and tracked as an issue.

tlnagy commented 7 years ago

This would be awesome to have πŸ‘

undefdev commented 7 years ago

+1 :)

mindbound commented 7 years ago

This would be very nice to have.

Ismael-VC commented 7 years ago

I'll try to build it and report back.

nico202 commented 6 years ago

They are officially distributing aarm64 binaries

Ismael-VC commented 6 years ago

@nico202 does this mean I could just download, unpack and run under termux on my android smartphone? I'll try those binaries.

nico202 commented 6 years ago

I was hoping so. But it's not using PIE

tomaklutfu commented 6 years ago

You can't run because of libc differences mostly. The dynamic linker in android system is at different place and won't accept regular linux shared libraries. However, you can make small linux system with libc and few packages julia depends and use proot to start julia inside this small linux.

SDRausty commented 6 years ago

It appears that https://www.archlinux.org/packages/?name=julia Julia is available for x86_64 through PRoot Arch Linux. Tapping this link https://sdrausty.github.io/TermuxArch/setupTermuxArch.sh will transfer setupTermuxArch.sh to your device. Simply run bash ~/storage/downloads/setupTermuxArch.sh to install Arch Linux. Then run pacman -S julia. Enjoy 🎼

its-pointless commented 6 years ago

I have it running on termux wirhout a chroot linux on x86_64 and i686

Ismael-VC commented 6 years ago

@sdrausty great, thanks! I'll try it out with a new phone in a couple of days, my old one was eaten by my dog ...mostly. :dog:

@its-pointless awesome! Could you please tell us how to do that without chroot? I can document it.

its-pointless commented 6 years ago

Its on my repo with instructions to add it so its downloadable via apt its-pointless/gcc_termux. I have a branch able to be built on android ( its missing some libuv patched though and requiires some libs ai provide). getting it to work on arm and aarcch64 is another matter though. Im not too good with llvm stuff.

ghost commented 6 years ago

@its-pointless meet me on gitter

moises-santillan commented 6 years ago

@its-pointless I installed julia from your repo on a Lenovo Yoga Book with x86_64 architecture, but got this error when trying to run it:

CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/opt/julia/bin/julia": library "libbthread.so" not found Aborted

Any idea what may be wrong?

its-pointless commented 6 years ago

apt install bthread its a library that provides pthread cancel I will update dependences at some point ...

Ismael-VC commented 6 years ago

I'm still without android phone, I tried with an emulator, but failed miserably (I don't remember the errors), but I will try again, do you guys have any recommendations for working with emulators and termux?

moises-santillan commented 6 years ago

@its-pointless Thank you. I've installed bthread and libunwind and don't get missing package errors any more. But now I get this other error message:

ERROR: Target architecture mismatch. Please delete or regenerate sys.{so,dll,dylib}

its-pointless commented 6 years ago

im uploading a newer version which is based on dev 7.0. Which is what im using going forward since it doesn't require libunwind aka it will work with i686.

The recent versions use LD_LIBRARY_PATH during build process which makes things not work i have to get around that at some point.

its-pointless commented 6 years ago

@Ismael-VC for emulating x86 i use virtualbox images as its slightly faster and im building on device so i need that. For arm there are available emulators. Aarch64 is the tricky one.

its-pointless commented 6 years ago

ok try updating now moises

moises-santillan commented 6 years ago

@its-pointless Sorry to bother you. After upgrading I get this error message: ERROR: Unable to find compatible target in system image.

its-pointless commented 6 years ago

that's fine fixing bugs is what i am doing here. could you show output of julia -C help
and llc -version ?

moises-santillan commented 6 years ago

Thank you @its-pointless. The output of julia -C help is: ERROR: Unable to find compatible target in system image And the output of llc -version is:

LLVM (http://llvm.org/):
LLVM version 5.0.0. Optimized build. Default target: x86_64--linux-android Host CPU: silvermont

Registered Targets: aarch64 - AArch64 (little endian) aarch64_be - AArch64 (big endian) amdgcn - AMD GCN GPUs arm - ARM arm64 - ARM64 (little endian) armeb - ARM (big endian) bpf - BPF (host endian) bpfeb - BPF (big endian) bpfel - BPF (little endian) hexagon - Hexagon lanai - Lanai mips - Mips mips64 - Mips64 [experimental] mips64el - Mips64el [experimental] mipsel - Mipsel msp430 - MSP430 [experimental] nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit ppc32 - PowerPC 32 ppc64 - PowerPC 64 ppc64le - PowerPC 64 LE r600 - AMD GPUs HD2XXX-HD6XXX sparc - Sparc sparcel - Sparc LE sparcv9 - Sparc V9 systemz - SystemZ thumb - Thumb thumbeb - Thumb (big endian) x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 xcore - XCore

its-pointless commented 6 years ago

i think the issue is julia does optimizations according to the host. So because im using a virtual box image its using a cpu that does things yours does not... means i have to set MARCH in Make.user

tomaklutfu commented 6 years ago

New target system in julia is designed for multiple architecture of the same kind. It should work for all x86_64 cpus. julia --sysimage-native-code=no should start it nevertheless but works slower than usual.

its-pointless commented 6 years ago

K source is here https://github.com/its-pointless/julia/tree/android Should be relatively straight forward

its-pointless commented 6 years ago

k i have it working some what on all 4 archs now...

dm319 commented 6 years ago

Hi there, sorry for newbie request, but where I start with getting julia to work on android in termux for a 64bit ARM processor? Do I need to build it on my system?

its-pointless commented 6 years ago

The 0.7 alpha is available on my 3rd party apt repo. Instructions available in readme.txt in the github.com/its-pointless/gcc_termux

On Thu., 14 Jun. 2018, 11:07 pm dm319, notifications@github.com wrote:

Hi there, sorry for newbie request, but where I start with getting julia to work on android in termux for a 64bit ARM processor? Do I need to build it on my system?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/termux/termux-packages/issues/58#issuecomment-397289400, or mute the thread https://github.com/notifications/unsubscribe-auth/AP-Ot6mgtrZsTB-uYHIjoZ4rt1OxUM-2ks5t8mAcgaJpZM4GjFVT .

dm319 commented 6 years ago

Thank you, that worked!

Seems like base Julia is working, but I can't add the DataFrames module - getting this error:

ERROR: LoadError: CodecZlib.jl is not installed properly, run Pkg.build("CodecZlib") and restart Julia. in expression starting at /data/data/com.termux/files/home/.julia/packages/CodecZlib/3REr/src/CodecZlib.jl:38 ERROR: LoadError: LoadError: Failed to precompile CodecZlib to /data/data/com.termux/files/home/.julia/compiled/v0.7/CodecZlib/1TI3.ji. in expression starting at /data/data/com.termux/files/home/.julia/packages/DataFrames/Pv1t/src/deprecated.jl:26 in expression starting at /data/data/com.termux/files/home/.julia/packages/DataFrames/Pv1t/src/DataFrames.jl:105 ERROR: Failed to precompile DataFrames to /data/data/com.termux/files/home/.julia/compiled/v0.7/DataFrames/AR9o.ji.

julia> Pkg.build("CodecZlib") WARNING: Base.Pkg is deprecated, run using Pkg instead in module Main Building CodecZlib β†’ ~/.julia/packages/CodecZlib/3REr/deps/build.log β”Œ Error: Error building CodecZlib; see log file for further info β”” @ Pkg.Operations Operations.jl:874

Any pointers here? I found a log file in ~/.julia/packages/CodecZlib/3REr/deps/usr/logs, not sure if that is the one it is referring to. Zlib.log

its-pointless commented 6 years ago

Until this version (0.7) is out of alpha and then beta some stuff is not going to work unfortately. I can't use julia version 0.6.3 either. A lot of modules need updating to be compatible with 0.7 and until all the depreciations and femtoclean (i think thats the name) is done its not straight forward for maintainers. Sorry.

On Sat., 16 Jun. 2018, 8:00 pm dm319, notifications@github.com wrote:

Thank you, that worked!

Seems like base Julia is working, but I can't add the DataFrames module - getting this error:

ERROR: LoadError: CodecZlib.jl is not installed properly, run Pkg.build("CodecZlib") and restart Julia. in expression starting at /data/data/com.termux/files/home/.julia/packages/CodecZlib/3REr/src/CodecZlib.jl:38 ERROR: LoadError: LoadError: Failed to precompile CodecZlib to /data/data/com.termux/files/home/.julia/compiled/v0.7/CodecZlib/1TI3.ji. in expression starting at /data/data/com.termux/files/home/.julia/packages/DataFrames/Pv1t/src/deprecated.jl:26 in expression starting at /data/data/com.termux/files/home/.julia/packages/DataFrames/Pv1t/src/DataFrames.jl:105 ERROR: Failed to precompile DataFrames to /data/data/com.termux/files/home/.julia/compiled/v0.7/DataFrames/AR9o.ji.

julia> Pkg.build("CodecZlib") WARNING: Base.Pkg is deprecated, run using Pkg instead in module Main Building CodecZlib β†’ ~/.julia/packages/CodecZlib/3REr/deps/build.log β”Œ Error: Error building CodecZlib; see log file for further info β”” @ Pkg.Operations Operations.jl:874

Any pointers here? I found a log file in ~/.julia/packages/CodecZlib/3REr/deps/usr/logs, not sure if that is the one it is referring to. Zlib.log https://github.com/termux/termux-packages/files/2108021/Zlib.log

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/termux/termux-packages/issues/58#issuecomment-397802112, or mute the thread https://github.com/notifications/unsubscribe-auth/AP-Ot429-KfeePZmPqm9vPV1chRX0iXJks5t9NckgaJpZM4GjFVT .

dm319 commented 6 years ago

Ah fairpoint! Great to have base Julia anyway - thanks for making it happen.

kkmin1 commented 6 years ago

I've tried install julia with archlinux

pacman -Ss julia

I have get an error message; "error: duplicated database entry 'haveged'' what's the problem?

SDRausty commented 6 years ago

I have get an error message; "error: duplicated database entry 'haveged'' what's the problem?

Simply delete the duplicate entry.

kkmin1 commented 6 years ago

-----Original Message----- λ³΄λ‚Έμ‚¬λžŒ: "S D Rausty" notifications@github.com λ°›λŠ”μ‚¬λžŒ: "termux/termux-packages" termux-packages@noreply.github.com μ°Έμ‘°: "kkmin1" kkmin1@naver.com,"Comment" comment@noreply.github.com λ‚ μ§œ: 2018.08.11 μ˜€ν›„ 08:32:45 제λͺ©: Re: [termux/termux-packages] Package request: julia (#58)

I have get an error message; "error: duplicated database entry 'haveged'' what's the problem?

Simply delete the duplicate entry. β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

SDRausty commented 6 years ago
[09:49 ar ]$ cd /var/lib/pacman/local/
[09:51 local ]$ l haveged-1.9.*
haveged-1.9.1-4.1:
total 20
drwxr-xr-x   2 root 4096 Aug 10 01:13 .
drwxr-xr-x 141 root 4096 Aug 11 09:49 ..
-rw-r--r--   1 root  354 Aug  1 03:26 desc
-rw-r--r--   1 root  394 Aug  1 03:26 files
-rw-r--r--   1 root  835 May 28 22:22 mtree

haveged-1.9.2-1:
total 20
drwxr-xr-x   2 root 4096 Aug 10 00:30 .
drwxr-xr-x 141 root 4096 Aug 11 09:49 ..
-rw-r--r--   1 root  351 Aug 10 00:30 desc
-rw-r--r--   1 root  394 Aug 10 00:30 files
-rw-r--r--   1 root  834 Aug  5 16:37 mtree
[09:51 local ]$ rf haveged-1.9.1-4.1/

Reference

kkmin1 commented 6 years ago

넀이버 메일 μ•±μ—μ„œ λ³΄λƒˆμŠ΅λ‹ˆλ‹€. -----Original Message----- λ³΄λ‚Έμ‚¬λžŒ: "S D Rausty" notifications@github.com λ°›λŠ”μ‚¬λžŒ: "termux/termux-packages" termux-packages@noreply.github.com μ°Έμ‘°: "kkmin1" kkmin1@naver.com,"Comment" comment@noreply.github.com λ‚ μ§œ: 2018.08.11 μ˜€ν›„ 11:07:13 제λͺ©: Re: [termux/termux-packages] Package request: julia (#58)

[09:49 ar ]$ cd /var/lib/pacman/local/ [09:51 local ]$ l haveged-1.9.* haveged-1.9.1-4.1: total 20 drwxr-xr-x 2 root 4096 Aug 10 01:13 . drwxr-xr-x 141 root 4096 Aug 11 09:49 .. -rw-r--r-- 1 root 354 Aug 1 03:26 desc -rw-r--r-- 1 root 394 Aug 1 03:26 files -rw-r--r-- 1 root 835 May 28 22:22 mtree haveged-1.9.2-1: total 20 drwxr-xr-x 2 root 4096 Aug 10 00:30 . drwxr-xr-x 141 root 4096 Aug 11 09:49 .. -rw-r--r-- 1 root 351 Aug 10 00:30 desc -rw-r--r-- 1 root 394 Aug 10 00:30 files -rw-r--r-- 1 root 834 Aug 5 16:37 mtree [09:51 local ]$ rf haveged-1.9.1-4.1/ Reference β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

oschulz commented 5 years ago

This would be very nice to have - any news on an "official" termux Julia package?

KestutisMa commented 5 years ago

Are there any updates on this issue? Julia v1.2 has been released with good ARM 32/64 bit support.

its-pointless commented 5 years ago

Yeah i will update my release in a day or 2. Had some pc issues. Which i have solved.

Ismael-VC commented 5 years ago

Julia can be installed right now with:

$ pkg install wget
$ wget https://its-pointless.github.io/setup-pointless-repo.sh
$ bash setup-pointless-repo.sh
$ pkg install julia  # julia 1.2.0 fork right now!

It has some linker warnings.

oschulz commented 5 years ago

Works wonderfully. The only problem is that a lot of Julia packages with binary deps (or depending on such packages) won't install - some of those are quite important (e.g. Distributions). I'm not sure if we could get linux-android added to the binary builder for those packages, though.

robsmith11 commented 5 years ago

Are the GNU linux aarch64 binaries compatible with termux? Maybe they can be used as-is to get packages like Distributions working.

oschulz commented 5 years ago

I think the special termux Julia binary is necessary because Android uses a different glibc (is that correct, @its-pointless ?). I assume that would affect binary package deps as well.

I tried using the standard Julia arm64 build in an Ubuntu proot environment under termux, but the package management fails, there's some permission it wants that it can't get under proot (at least on android). Should check if that affects proot on PC-Linux as well, in that case, something should be done about it.

its-pointless commented 5 years ago

Android uses bionic libc not glibc. This makes normal linux binary packages unsuable so we have to compile it ourselves. This is hard since the source for those packages have to be changed slightly to work. Some a lot more than others.

oschulz commented 5 years ago

I feared that would be the case. I wonder why the PROOT approach fails with Julia v1.2, though.

tomaklutfu commented 5 years ago

PROOT approach needs comaptible system files from a regular linux distribution because regular Julia v1.2 downloads from the website is compiled with either glibc or musl-libc. Beside, you may not need proot at all if you pull needed glibc system linker and librarires and run julia with the glibc linker.

SDRausty commented 2 years ago

I have get an error message; "error: duplicated database entry 'haveged'' what's the problem?

Simply delete the duplicate entry.

Pardon me for asking; Why is this message minimized?