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

compile error: sys/timeb.h not found #261

Closed
victorlee129 opened this issue Aug 20, 2014 · 6 comments
Closed

compile error: sys/timeb.h not found #261

victorlee129 opened this issue Aug 20, 2014 · 6 comments

Comments

@victorlee129
Copy link

It seems that in the android-ndk-r10, the file timeb.h is removed, which leads to a compiling failure.
Has no idea of how to fix it besides downloading a r9 version of ndk...

P.S.: And in r10, the API dir has been changed into Android-L from Android-14 or so, which I made a link to solve the problem.

Thanks for any suggestion.

@cherez
Copy link

cherez commented Oct 13, 2014

That include looks to be wrapped in #ifdef HAVE_FTIME, is there a way we could force that flag to be undefined?

@toufikovich
Copy link

experimenting the same issue as well! sys/timeb.h not found when i use api level 21 and ndk-r10c! also cython 0.21 is not supported by kivy < 1.9.

@rdoursenaud
Copy link
Contributor

The workaround for now (as least for me) is to set android.api < 21 (I'm using buildozer)

@Samureus
Copy link

The error message that appears is:

ccache arm-linux-androideabi-gcc -DANDROID -mandroid  -fomit-frame-pointer --sysroot /home/samo/Dev/android-ndk-r10d/platforms/android-21/arch-arm -fno-strict-aliasing -DANDROID -mandroid  -fomit-frame-pointer --sysroot /home/samo/Dev/android-ndk-r10d/platforms/android-21/arch-arm -DNDEBUG   -I. -IInclude -I./Include  -fPIC -DPy_BUILD_CORE  -I/home/samo/Dev/python-for-android/build/python-install/include -c ./Modules/zlibmodule.c -o Modules/zlibmodule.o
./Modules/timemodule.c:31:23: fatal error: sys/timeb.h: No such file or directory
 #include <sys/timeb.h>
                       ^
compilation terminated.
make: *** [Modules/timemodule.o] Error 1

Which is required here:

https://github.com/python/cpython/blob/2.2/Modules/timemodule.c#L28

but not in the latest version, there seems to be a workaround here:

https://github.com/python/cpython/blob/2.7/Modules/timemodule.c#L919

After checking /android-ndk-r10d/platforms/android-21/arch-arm/usr/include/sys/, timeb.h is indeed missing in API 21, but it's available in API 19 and lower. This looks like a bad combination of the latest API and Python 2.7.2.

@franciscod
Copy link

same here on api 21!

@inclement
Copy link
Member

This should be fixed by the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants