Windows build issues

18 views
Skip to first unread message

Ryan Nett

unread,
Nov 25, 2020, 8:09:23 PM11/25/20
to SIG JVM
I'm trying to build everything (including the tensorflow binaries) locally, to look into eager gradient tapes (i.e. how javacpp handles https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/eager/tape.h).  However, during the bazel build, I get `api-ms-win-crt-locale-l1-1-0.dll: cannot open shared object file: No such file or directory`.  However, api-ms-win-crt-locale-l1-1-0.dll exists in `C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64` and is registered in the registry.  Anyone have any hints?

Samuel Audet

unread,
Nov 25, 2020, 8:40:32 PM11/25/20
to Ryan Nett, SIG JVM
Try with a different version of Bazel? It works fine with 2.0.0:
https://github.com/tensorflow/java/blob/master/.github/workflows/ci.yml#L144

Ryan Nett

unread,
Nov 25, 2020, 9:11:38 PM11/25/20
to SIG JVM, samuel...@gmail.com, Ryan Nett
Still happens.  I am using VS 2019 build tools and the 2019 C++ redistributable (which lists itself as the 2015-2019  redistributable and says it includes 2015 and 2017), do you think that would cause issues?  I'm not sure which C++ the windows image uses, but it's using 2019 VS so I don't think that's the issue.

Samuel Audet

unread,
Nov 25, 2020, 9:26:03 PM11/25/20
to Ryan Nett, SIG JVM
Maybe try to disable the "sandbox" with `--spawn_strategy=standalone`
like this?
https://github.com/bytedeco/javacpp-presets/blob/master/tensorflow/cppbuild.sh#L313

Ryan Nett

unread,
Nov 25, 2020, 9:44:20 PM11/25/20
to SIG JVM, samuel...@gmail.com, Ryan Nett
Nope, didn't help.  I tried manually registering the DLL (with regsvr32.exe)  and got "The module "api-ms-win-crt-locale-l1-1-0.dll" was loaded but the entrypoint DllRegisterServer was not found.  Make sure " api-ms-win-crt-locale-l1-1-0.dll" is a valid DLL.   Is it just corrupt?

Ryan Nett

unread,
Nov 25, 2020, 9:52:00 PM11/25/20
to SIG JVM, Ryan Nett, samuel...@gmail.com
Well, I tried copying it into C:\Windows\System32 and that didn't help.  Seems more likely that it's corrupt rather than not being found, if bazel checks C:\Windows\System32  like I'd think it would. 

Ryan Nett

unread,
Nov 25, 2020, 9:59:47 PM11/25/20
to SIG JVM, Ryan Nett, samuel...@gmail.com
Well, I lied, if I copy it into System32 the build now fails with api-ms-win-crt-math-l1-1-0.dll not found, so it does seem to be just not finding them.

Ryan Nett

unread,
Nov 25, 2020, 10:05:15 PM11/25/20
to SIG JVM, Ryan Nett, samuel...@gmail.com
I don't have much experience working with windows DLLs, but if I open up the exe that's failing (gen_git_source.exe) with Dependencies I get this, which makes it seem like bazel isn't doing the redirections.

Message has been deleted

Ryan Nett

unread,
Nov 25, 2020, 10:06:44 PM11/25/20
to SIG JVM, Ryan Nett, samuel...@gmail.com
Since the image doesn't want to load: https://i.ibb.co/dGjFMSm/image.png
Reply all
Reply to author
Forward
0 new messages