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

[BUG] windows python prebuilt no longer has datetime module, breaking shaderc #1291

Closed
DanAlbert opened this issue Jun 25, 2020 · 11 comments
Closed
Assignees
Labels
Projects
Milestone

Comments

@DanAlbert
Copy link
Member

On Windows:

> python run_test.py --rebuild --filter shaderc_libcxx
...
FAIL shaderc_libcxx [x86-16-deprecated]: fcntl(): Bad file descriptor
"[x86] Generate enum<->string mapping <= grammar JSON files"
fcntl(): Bad file descriptor
"[x86] Vendor extended instruction set: debuginfo tables <= grammar"
fcntl(): Bad file descriptor
"[x86] Grammar (from unified1)  : instructions & operands <= grammar JSON files"
fcntl(): Bad file descriptor
"[x86] Grammar (from unified1)  : instructions & operands <= grammar JSON files"
fcntl(): Bad file descriptor
"[x86] Vendor extended instruction set: opencl.debuginfo.100 tables <= grammar"
fcntl(): Bad file descriptor
"[x86] Vendor extended instruction set: spv-amd-shader-trinary-minmax tables <= grammar"
fcntl(): Bad file descriptor
"[x86] Vendor extended instruction set: spv-amd-shader-explicit-vertex-parameter tables <= grammar"
fcntl(): Bad file descriptor
Traceback (most recent call last):
  File "C:/Users/Dan/Desktop/android-ndk-r22-canary/build//../sources/third_party/shaderc/third_party/spirv-tools/utils/update_build_version.py", line 32, in <module>
    import datetime
ImportError: No module named datetime
...

If I run the Python that's in the NDK's prebuilts directory and just try to import datetime it shows the same error. Seems we're missing that?

@DanAlbert DanAlbert added the bug label Jun 25, 2020
@DanAlbert DanAlbert added this to the r22 milestone Jun 25, 2020
@hhb
Copy link
Collaborator

hhb commented Jun 25, 2020

datetime module failed the build for windows:

build/temp.win32-2.7/src/ndk/toolchain/python/Python-2.7.5/Modules/datetimemodule.o:datetimemodule.c:(.text+0x84c3): undefined reference to 'gmtime'
build/temp.win32-2.7/src/ndk/toolchain/python/Python-2.7.5/Modules/datetimemodule.o:datetimemodule.c:(.text+0x85e6): undefined reference to 'localtime'

Investigating...

@DanAlbert
Copy link
Member Author

(I hate the the python build doesn't fail when it fails to build...)

@hhb
Copy link
Collaborator

hhb commented Jun 26, 2020

Looks like this is a MinGW bug. gmtime / localtime is decorated with __forceinline so there's no symbol generated for them. But in datetimemodule.c they try to get the pointer to the functions.

This is fixed by 6988d73a95fbbd97a0bdbb517008cf18f4eb5f02. Cherrypicked in aosp/1350713

@DanAlbert
Copy link
Member Author

Thanks for the quick fix!

@hhb hhb reopened this Jun 26, 2020
@hhb
Copy link
Collaborator

hhb commented Jun 26, 2020

Let's leave this open until we have a new mingw prebuilts. (Just in case I forget to upload it)

@DanAlbert
Copy link
Member Author

Ah, sorry, forgot that was needed.

@stephenhines
Copy link
Collaborator

The patch actually broke the mingw build, so we probably need another fix before we get prebuilts.

@pirama-arumuga-nainar
Copy link
Collaborator

@hhb
Copy link
Collaborator

hhb commented Jun 27, 2020

@DanAlbert DanAlbert added this to Merged in r22 via automation Jul 7, 2020
@DanAlbert DanAlbert reopened this Sep 24, 2020
r22 automation moved this from Merged to Triaged Sep 24, 2020
@DanAlbert
Copy link
Member Author

I'm still (again?) seeing this.

@hhb hhb closed this as completed Oct 1, 2020
r22 automation moved this from Triaged to Merged Oct 1, 2020
@hhb
Copy link
Collaborator

hhb commented Oct 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
r22
  
Merged
Development

No branches or pull requests

4 participants