Re: Help in compiling nim on android termux

2017-04-02 Thread NastyRigger
@cheatfate Well done! 32-bit works as expected: [https://s29.postimg.org/fdbzy8xav/Screenshot_2017-04-02-14-14-23.png](https://s29.postimg.org/fdbzy8xav/Screenshot_2017-04-02-14-14-23.png) What's the preferred fix for Nimble?

Re: Help in compiling nim on android termux

2017-04-01 Thread cheatfate
Made this for you guys, but i dont have android to test it properly. [https://github.com/nim-lang/Nim/pull/5646](https://github.com/nim-lang/Nim/pull/5646).

Re: Help in compiling nim on android termux

2017-04-01 Thread NastyRigger
@stisa Ah, ok! Thought you couldn't decide between **-d:termux** and **-d:android** as the name of this custom configuration

Re: Help in compiling nim on android termux

2017-04-01 Thread stisa
@NastyRigger: that's what `-d:android` does: [https://github.com/nim-lang/Nim/blob/c480505797f9d82b9b19a72b5a5abde9c0cb0fd4/lib/posix/posix.nim#L2426](https://github.com/nim-lang/Nim/blob/c480505797f9d82b9b19a72b5a5abde9c0cb0fd4/lib/posix/posix.nim#L2426) @cheatfate : thanks for the pointer,

Re: Help in compiling nim on android termux

2017-04-01 Thread cheatfate
If you really want to fix it, you need to find way how to properly pass arguments to **__NR_rt_sigtimedwait** syscall, which is available since **Android SDK Level 3**.

Re: Help in compiling nim on android termux

2017-04-01 Thread NastyRigger
@stisa I believe we need to patch the nim's transpiler to always output __rt_sigtimedwait instead of sigtimedwait.

Re: Help in compiling nim on android termux

2017-04-01 Thread stisa
@amedeo : try compiling koch with `nim c -d:android koch` , if it works you can add `define:android` to `config/nim.cfg` so you won't need to define it every time you compile something.

Re: Help in compiling nim on android termux

2017-04-01 Thread amedeo
**@NastyRigger** it compiles fine now but when trying to compile koch.nim you get the same error /data/data/com.termux/files/home/Nim/nimcache/stdlib_osproc.o: In function `nospwaitForExit': /data/data/com.termux/files/home/Nim/nimcache/stdlib_osproc.c:(.text+0x45f8):

Re: Help in compiling nim on android termux

2017-04-01 Thread NastyRigger
Well guessed, @stisa! The nim compiler bootstraps successfully on 32-bit now. I've updated the sed command two posts back.

Re: Help in compiling nim on android termux

2017-03-31 Thread stisa
@NastyRigger : This is just a guess, and I can't test it, but you could try changing `sigtimedwait` into `__rt_sigtimedwait` . Looks like `sigtimedwait` is present in `signal.h` starting from android api 23. @Araq : I could try making a PR, I'm guessing the part in `nim.cfg` should go in a

Re: Help in compiling nim on android termux

2017-03-31 Thread NastyRigger
@Araq Look at the screenshot, the original issue is still there. Could you suggest a workaround?

Re: Help in compiling nim on android termux

2017-03-31 Thread Araq
In config/nim.cfg add passL=" -landroid-glob " and define:termux In lib/posix/posix.nim : line 283: when defined(macosx) or defined(termux): and on line 1623: when not defined(macosx) and not defined(termux) ( you just need to add the termux part ) In lib/pure/osproc.nim "bin/sh" ->

Re: Help in compiling nim on android termux

2017-03-31 Thread NastyRigger
Ok, so here's the automated version of the 32-bit termux Nim bootstrap part (also fixing the **64-bit kernel/32-bit userspace** scenario) that reproduces the OP's error during the final link: apt install clang apt install git apt install libandroid-glob && apt install

Re: Help in compiling nim on android termux

2017-03-31 Thread stisa
Just removed termux and reinstalled from scratch ( I can only test on my phone, android 7 ), here are my steps: apt install git apt install clang git clone https://github.com/nim-lang/Nim cd Nim && git clone https://github.com/nim-lang/csources apt install

Re: Help in compiling nim on android termux

2017-03-30 Thread Libman
I was able to get Nim working in Termux after some trial and error. [Stisa's article](http://stisa.space/articles/compile-nim-on-android/) helped with some of it, but I think I had to implant some additional code. I also had to [patch getTempDir](https://github.com/nim-lang/Nim/issues/5260) to

Re: Help in compiling nim on android termux

2017-03-30 Thread vonH
Seeing that you use Termux, I have a question to ask you. When I use termux, keystrokes are not entered directly into the terminal. I have to choose one from the selected options before it gets typed into the terminal. Have you experiended this problem?

Re: Help in compiling nim on android termux

2017-03-29 Thread amedeo
i have tried nim-0.15.2 and nim-0.16.0 my android version is 5.1 armv71 32 bit cpu