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

sigtimedwait not supported in the Termux headers (supported on devices since api 23) #899

Closed
fornwall opened this issue Apr 5, 2017 · 9 comments

Comments

@fornwall
Copy link
Member

fornwall commented Apr 5, 2017

From @abijahm on March 28, 2017 15:26

am trying to compile nimlang on android i get an error

undefined reference to sigtimedwait

Copied from original issue: termux/termux-app#288

@fornwall
Copy link
Member Author

fornwall commented Apr 5, 2017

From @MeinFuehrer on March 28, 2017 22:31

Were you following these instructions?

http://stisa.space/articles/compile-nim-on-android/

@fornwall
Copy link
Member Author

fornwall commented Apr 5, 2017

From @abijahm on March 29, 2017 5:35

yah i followed the instruction they solve the issue with glob.h it seems that the function sigtimedwait is not in the signal.h included in termux , could you have the solution to this

@fornwall
Copy link
Member Author

fornwall commented Apr 5, 2017

From @MeinFuehrer on March 29, 2017 15:2

Those instructions are out of sync in two respects, namely, aarch64 is already a supported target and it's not reveant anyway as we're trying to compile for armhf.

Might be a good idea posting a build log in the Nim forum.

@fornwall
Copy link
Member Author

fornwall commented Apr 6, 2017

sigtimedwait is in the unified headers, marked as supported from api level 23.

@fornwall fornwall changed the title sigtimedwait sigtimedwait not supported in the Termux headers (supported on devices since api 23) Apr 6, 2017
@MineFuehrer
Copy link

I believe the issue has already found a satisfactory fix on the Nim side.

@fornwall
Copy link
Member Author

fornwall commented Apr 6, 2017

@MineFuehrer Great! I'll keep this open issue until sigtimedwait has been fixed.

@MineFuehrer
Copy link

You mean a different approach from nim-lang/Nim#5646 ?

@fornwall
Copy link
Member Author

fornwall commented Apr 7, 2017

Right - that workaround should work, but a proper solution here would mean that no workaround is needed! For that the plan is:

  1. Wait for NDK r15, which hopefully should have ironed out the issues with unified headers.
  2. Switch to providing the unified headers in Termux.

We will then have sigtimedwait (and another couple of missing functions) in the headers and libc.

@fornwall
Copy link
Member Author

I'm closing this now, as Termux has switched to the unified headers.

By default the C compiler in Termux targets API level 21, so sigtimedwait is not exposed by signal.h. By compiling with -D__ANDROID_API__=23 this function is exposed.

vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* This is for compiling docker-tini, who is asking for sigtimedwait,
  which wasn't exposed in signal.h until API 23.
  termux#899

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* Upgrading is needed in order to fix the stupid situation we're in
  with docker-tini:
  * Needs to have API >= 23 for sigtimedwait
    (termux#899)
  * Needs to have API <= 21 for static linking
    (android/ndk#272)
* The latter of the 2 above restrictions was removed in NDK r17, so
  that's why we're upgrading.
* The other changes (removed headers and patches) are according to
  Mr. Fornwall himself:
  termux#1905

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* This is for compiling docker-tini, who is asking for sigtimedwait,
  which wasn't exposed in signal.h until API 23.
  termux#899

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* Upgrading is needed in order to fix the stupid situation we're in
  with docker-tini:
  * Needs to have API >= 23 for sigtimedwait
    (termux#899)
  * Needs to have API <= 21 for static linking
    (android/ndk#272)
* The latter of the 2 above restrictions was removed in NDK r17, so
  that's why we're upgrading.
* The other changes (removed headers and patches) are according to
  Mr. Fornwall himself:
  termux#1905

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* This is for compiling docker-tini, who is asking for sigtimedwait,
  which wasn't exposed in signal.h until API 23.
  termux#899

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 3, 2018
* Upgrading is needed in order to fix the stupid situation we're in
  with docker-tini:
  * Needs to have API >= 23 for sigtimedwait
    (termux#899)
  * Needs to have API <= 21 for static linking
    (android/ndk#272)
* The latter of the 2 above restrictions was removed in NDK r17, so
  that's why we're upgrading.
* The other changes (removed headers and patches) are according to
  Mr. Fornwall himself:
  termux#1905

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to vladimiroltean/termux-packages that referenced this issue May 31, 2018
* This is for compiling docker-tini, who is asking for sigtimedwait,
  which wasn't exposed in signal.h until API 23.
  termux#899

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
vladimiroltean added a commit to ContainerDroid/termux-packages that referenced this issue Sep 1, 2018
* This is for compiling docker-tini, who is asking for sigtimedwait,
  which wasn't exposed in signal.h until API 23.
  termux#899

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants