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

Windows 10: Error: A dynamic link library (DLL) initialization routine failed. #1356

Closed
timkonieczny opened this issue Aug 5, 2019 · 50 comments
Labels
bug Something isn't working

Comments

@timkonieczny
Copy link
Contributor

timkonieczny commented Aug 5, 2019

Describe the bug
What happened, and what did you expect to happen?

I'm getting the following Error: A dynamic link library (DLL) initialization routine failed. when running the A-Frame Painter example.
Similar issue to #608 and #924 , my CPU is newer though, from 2017. I don't have the Leap Motion SDK installed.

Steps to reproduce
Installed exokit on Windows 10 from get.exokit.org.
In CMD, ran C:\exokit\scripts> exokit https://aframe.io/a-painter/

Got:
`C:\exokit\scripts>IF EXIST "C:\exokit\scripts..\node\node.exe" ("C:\exokit\scripts..\node\node.exe" "--experimental-worker" "C:\exokit\scripts..\src\index.js" ) ELSE (node "--experimental-worker" "C:\exokit\scripts..\src\index.js" )
internal/modules/cjs/loader.js:750
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: A dynamic link library (DLL) initialization routine failed.
\?\C:\exokit\build\Release\exokit.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:750:18)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:22:18)
at C:\exokit\src\native-bindings.js:19:18
at Object. (C:\exokit\src\native-bindings.js:26:3)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)`

System information:

  • OS: Windows 10 Home 1903

  • Node version: v12.2.0

  • Npm version: 6.9.0

  • Is your Exokit downloaded or built? Downloaded.

  • CPU: Intel Pentium Silver N5000

Cheers!

@avaer
Copy link
Member

avaer commented Aug 5, 2019

Are you able to build exokit locally with git clone and npm install?

We haven't published releases in a long time and many things have been fixed since the last one.

@timkonieczny
Copy link
Contributor Author

I'll give it a go.

@timkonieczny
Copy link
Contributor Author

I couldn't get it to build. It crashed with this error:

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\timko\Documents\showhow-project\exokit
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node ./scripts/preinstall.js && node-gyp configure --msvs_version=2017 && node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\timko\AppData\Roaming\npm-cache_logs\2019-08-05T01_49_57_694Z-debug.log

Here's the full log:
2019-08-05T01_49_57_694Z-debug.log

@avaer
Copy link
Member

avaer commented Aug 5, 2019

Are the windows build tools installed? (either via the node installer checkbox, or manual install of Visual Studio 2017)

@timkonieczny
Copy link
Contributor Author

Yup, installed them via npm install --global --production [email protected]. (4.0.0 because the current version doesn't install)

@avaer
Copy link
Member

avaer commented Aug 5, 2019

Looks like the compiler is not executing. Can you try:

node-gyp configure --msvs_version=2017

and

node-gyp rebuild

To see what the error is?

@avaer
Copy link
Member

avaer commented Aug 5, 2019

(node-gyp can be gotten from npm install -g node-gyp)

@timkonieczny
Copy link
Contributor Author

It was a bit of a mission but I got it built.
Turns out npm install --global --production [email protected] uses VS2015 as a default. You can pass a parameter to use VS2017, but it doesn't install. So I installed VS2017 manually. To get it working I had to set an environment variable called VCTargetsPath to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets .
Then the built ran through with warnings, but without errors.

I tried to run exokit https://aframe.io/a-painter/ again, but nothing happens. No window opens and no error is displayed. Any thoughts?

@avaer
Copy link
Member

avaer commented Aug 5, 2019

That one works for me. When you do exokit https://aframe.io/a-painter/, what is the binary being run here?

For me it's:

Capture 55

@avaer
Copy link
Member

avaer commented Aug 5, 2019

Additionally, if there was a build failure in the past in this directory it's probably not sufficient to just rebuild.

Could you also try wiping node_modules and package.json and doing npm install successfully again?

@chrislatorres
Copy link
Contributor

chrislatorres commented Aug 5, 2019

You should not be running exokit <site url> to run the locally built (git clone and npm i) exokit, you would run it by doing in the cloned exokit directory:

node . <site url here>

@timkonieczny
Copy link
Contributor Author

what is the binary being run here?

I ran exokit.cmd all along, forgot to mention that.

Building it

I grabbed a fresh clone and built it. I've noticed, that during the build I'm getting the following warnings, maybe those cause some of the issues:

Warning: Missing input files:
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\videocontext\src\win*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\leapmotion\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\webrtc\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\threadpool\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\videocontext\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\openvr\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\oculus\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\canvas\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\util\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\platform\windows\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\webglcontext\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\nanosvg\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\bindings\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\canvascontext\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\glfw\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\cache\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\webaudiocontext\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\browser\src*.cpp
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\console\src*.cc
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\windowsystem\src*.cc

Running it

I'm getting a similar error as before when running node . (thanks @chrisplatorres ):

internal/modules/cjs/loader.js:800
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: A dynamic link library (DLL) initialization routine failed.
\?\C:\Users\timko\Documents\showhow-project\exokit\build\Release\exokit.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:800:18)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (C:\Users\timko\Documents\showhow-project\exokit\src\native-bindings.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)

node-gyp rebuilding it

I've also run node-gyp configure --msvs_version=2017 and node-gyp rebuild. Then the build fails with:

c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\map(597): fatal error C
1001: An internal error has occurred in the compiler. [C:\Users\timko\Documents\showhow-project\exokit\build\exokit.vcx
proj]
(compiler file 'msc1.cpp', line 1518)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information (compiling source file ..\deps\exokit-bindin
gs\webaudiocontext\src\AudioParam.cpp)
c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\map(620): note: see r
eference to class template instantiation 'std::multimap<_Kty,_Ty,_Pr,_Alloc>' being compiled (compiling source file .
.\deps\exokit-bindings\webaudiocontext\src\AudioParam.cpp)
Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bi
n\HostX64\x64\CL.exe. You will be prompted to send an error report to Microsoft later.
INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\b
in\HostX64\x64\CL.exe'
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
cl : Command line error D8040: error creating or communicating with child process [C:\Users\timko\Documents\showhow-pro
ject\exokit\build\exokit.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\timko\AppData\Roaming\nvm\v12.2.0\node_modules\node-gyp\lib\build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\timko\Documents\showhow-project\exokit
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR!

@avaer
Copy link
Member

avaer commented Aug 5, 2019

It looks like there is something wrong with that checkout. Does the glob deps\exokit-bindings\videocontext\src\win*.cpp match any files?

@timkonieczny
Copy link
Contributor Author

Only this one: \exokit\deps\exokit-bindings\videocontext\src\win\VideoMode_win.cpp

@avaer
Copy link
Member

avaer commented Aug 5, 2019

And the command being run is simply npm install?

@timkonieczny
Copy link
Contributor Author

Yup, that's all I'm running

@timkonieczny
Copy link
Contributor Author

I've added an environment variable for node-gyp, as described here. Now I don't get the node-gyp errors anymore. Still getting those missing input file warnings though. Also, the build doesn't finish (no errors, just doesn't finish). The last console output is:

c:\users\timko\documents\showhow-project\exokit\deps\exokit-bindings\leapmotion\src\leapmotion.cc(246): warning C4996:
'v8::Object::Set': was declared deprecated [C:\Users\timko\Documents\showhow-project\exokit\build\exokit.vcxproj]
  c:\users\timko\.node-gyp\12.2.0\include\node\v8.h(3367): note: see declaration of 'v8::Object::Set'

@avaer
Copy link
Member

avaer commented Aug 5, 2019

VS 2015 is not supported (our bins are linked against 2017), so adding GYP_MSVS_VERSION=2015 would probably break the build/link, if I recall correctly.

However, build.. seems very suspicious to me. I'm not aware of any npm version that creates such a path. Does deleting it help?

@timkonieczny
Copy link
Contributor Author

Sorry, I've added the variable GYP_MSVS_VERSION=2017, so that should be good.

@timkonieczny
Copy link
Contributor Author

Actually I don't have a build.. folder, just build. That explains the missing files. Maybe the path for finding the files is built wrong?

Also, the build did just run through, as opposed to not finishing without errors. Running node . after still gives the same error though.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

The paths come from binding.gyp:

'deps/exokit-bindings/bindings/src/*.cc',

However, I've never seen npm getting it wrong in this manner before.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Running node . after still gives the same error though.

I believe that error is simply because the actual build has not occured, so there is nothing to start.

@timkonieczny
Copy link
Contributor Author

timkonieczny commented Aug 6, 2019

I've changed binding.gyp from

'exokit.cpp',
'deps/exokit-bindings/bindings/src/*.cc',
'deps/exokit-bindings/util/src/*.cc',
'deps/exokit-bindings/console/src/*.cc',
'deps/exokit-bindings/cache/src/*.cc',
'deps/exokit-bindings/threadpool/src/*.cc',
'deps/exokit-bindings/browser/src/*.cpp',
'deps/exokit-bindings/canvas/src/*.cpp',
'deps/exokit-bindings/nanosvg/src/*.cpp',
'deps/exokit-bindings/canvascontext/src/*.cc',
'deps/exokit-bindings/webglcontext/src/*.cc',
'deps/exokit-bindings/platform/windows/src/*.cpp',
'deps/exokit-bindings/webaudiocontext/src/*.cpp',
'deps/exokit-bindings/videocontext/src/*.cpp',
'deps/exokit-bindings/videocontext/src/win/*.cpp',
'deps/exokit-bindings/windowsystem/src/*.cc',
'deps/exokit-bindings/glfw/src/*.cc',
'deps/exokit-bindings/webrtc/src/*.cc',
'deps/oculus/src/*.cpp',
'deps/openvr/src/*.cpp',
'deps/exokit-bindings/leapmotion/src/*.cc',

to

'/exokit.cpp',
'/deps/exokit-bindings/bindings/src/*.cc',
'/deps/exokit-bindings/util/src/*.cc',
'/deps/exokit-bindings/console/src/*.cc',
'/deps/exokit-bindings/cache/src/*.cc',
'/deps/exokit-bindings/threadpool/src/*.cc',
'/deps/exokit-bindings/browser/src/*.cpp',
'/deps/exokit-bindings/canvas/src/*.cpp',
'/deps/exokit-bindings/nanosvg/src/*.cpp',
'/deps/exokit-bindings/canvascontext/src/*.cc',
'/deps/exokit-bindings/webglcontext/src/*.cc',
'/deps/exokit-bindings/platform/windows/src/*.cpp',
'/deps/exokit-bindings/webaudiocontext/src/*.cpp',
'/deps/exokit-bindings/videocontext/src/*.cpp',
'/deps/exokit-bindings/videocontext/src/win/*.cpp',
'/deps/exokit-bindings/windowsystem/src/*.cc',
'/deps/exokit-bindings/glfw/src/*.cc',
'/deps/exokit-bindings/webrtc/src/*.cc',
'/deps/oculus/src/*.cpp',
'/deps/openvr/src/*.cpp',
'/deps/exokit-bindings/leapmotion/src/*.cc',

So now instead of looking in
C:\Users\timko\Documents\showhow-project\exokit\build..\deps\exokit-bindings\videocontext\src\win*.cpp
it should look in
C:\Users\timko\Documents\showhow-project\exokit\build\..\deps\exokit-bindings\videocontext\src\win*.cpp,
which is where those files actually are.

However, when running npm install, I'm still getting missing file warnings (Although there are matching files in those directories):

if not defined npm_config_node_gyp (node "C:\Users\timko\AppData\Roaming\nvm\v12.2.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\timko\AppData\Roaming\nvm\v12.2.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\deps\exokit-bindings\webrtc\src\*.cc
C:\deps\exokit-bindings\bindings\src\*.cc
C:\exokit.cpp
C:\deps\exokit-bindings\videocontext\src\win\*.cpp
C:\deps\exokit-bindings\canvas\src\*.cpp
C:\deps\exokit-bindings\cache\src\*.cc
C:\deps\exokit-bindings\util\src\*.cc
C:\deps\exokit-bindings\glfw\src\*.cc
C:\deps\openvr\src\*.cpp
C:\deps\oculus\src\*.cpp
C:\deps\exokit-bindings\webglcontext\src\*.cc
C:\deps\exokit-bindings\platform\windows\src\*.cpp
C:\deps\exokit-bindings\leapmotion\src\*.cc
C:\deps\exokit-bindings\browser\src\*.cpp
C:\deps\exokit-bindings\webaudiocontext\src\*.cpp
C:\deps\exokit-bindings\videocontext\src\*.cpp
C:\deps\exokit-bindings\nanosvg\src\*.cpp
C:\deps\exokit-bindings\canvascontext\src\*.cc
C:\deps\exokit-bindings\threadpool\src\*.cc
C:\deps\exokit-bindings\windowsystem\src\*.cc
C:\deps\exokit-bindings\console\src\*.cc

I'm getting this warning twice actually. And then shortly after, node-gyp crashes.

c1xx : fatal error C1083: Cannot open source file: '\exokit.cpp': No such file or directory [C:\Users\timko\Documents\s
howhow-project\exokit\build\exokit.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\timko\AppData\Roaming\nvm\v12.2.0\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\timko\\AppData\\Roaming\\nvm\\v12.2.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\timko\Documents\showhow-project\exokit
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./scripts/preinstall.js && node-gyp configure --msvs_version=2017 && node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\timko\AppData\Roaming\npm-cache\_logs\2019-08-06T00_28_49_424Z-debug.log

Where is node-gyp looking for exokit.cpp? In exokit\exokit.cpp (That's where it actually is) or in exokit\build\exokit.cpp?
Also I'm not sure why those missing file warnings still pop up...

That's all run on a fresh clone of the repo btw.

@timkonieczny
Copy link
Contributor Author

I accidentally closed the issue, sorry

@timkonieczny timkonieczny reopened this Aug 6, 2019
@avaer
Copy link
Member

avaer commented Aug 6, 2019

Thanks for the investigation! Though I can't reproduce it, his might be a legitimate bug/interaction with Windows.

node-gyp should be compiling exokit/exokit.cpp, not exokit/build/exokit.cpp. Prefixing with / will probably use the root directory (which we don't want).

Maybe it makes a difference if we use some of the npm-specific resolutions for the path? For example using <(module_root_dir) as the root path prefix:

'<(module_root_dir)/deps/exokit-bindings',

@timkonieczny
Copy link
Contributor Author

I've just tried it, it doesn't make a difference. The odd thing is, that the files it says it's missing in the warning, are actually there, and also in those exact locations.
E.g. C:\Users\timko\Documents\showhow-project\exokit\deps\exokit-bindings\browser\src\*.cpp should find something.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Hm, if node is complaining about files that are legitimately there, I'm running out of suggestions. There must be something weird with the filesystem or node's view of it (most likely) or this might be a bug with node (probably less likely).

Does getting rid of the glob and using the manual paths (as a test) change the error?

@timkonieczny
Copy link
Contributor Author

I think the globs are actually the problem. I just replaced one with the full file paths, and it found it.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Could it be some camel casing? Which terminal is this being run from (e.g. cmd, bash, Powershell)?

@timkonieczny
Copy link
Contributor Author

I've tried it in powershell and cmd.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

I don't understand why globs don't work for you, but if there are systems that simply do not allow them, I think it would be ok to use one of the hacks to get around that.

For example, I found this: https://stackoverflow.com/a/15419176

@timkonieczny
Copy link
Contributor Author

Actually I went ahead and replaced all the globs quickly. That seemed to have fixed all missing file warnings, but one:

Warning: Missing input files:
C:\Users\timko\Documents\showhow-project\exokit\build\..\deps\exokit-bindings\platform\windows\src\*.cpp

That one actually isn't present at that path.
The build finished, but the AFrame Painter example still gives me an error, probably because of that missing file.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Thanks, C:\Users\timko\Documents\showhow-project\exokit\build\..\deps\exokit-bindings\platform\windows\src\*.cpp looks like a bug in binding.gyp -- will fix.

If you have a (seemingly) successful build, could you share the build log for it?

@timkonieczny
Copy link
Contributor Author

Where do I find the log?

@avaer
Copy link
Member

avaer commented Aug 6, 2019

I think this might be enough:

Capture 57

(or however the shell works)

@avaer avaer added the bug Something isn't working label Aug 6, 2019
@avaer
Copy link
Member

avaer commented Aug 6, 2019

Cleaning up the dead path: #1380

@timkonieczny
Copy link
Contributor Author

npminstall.log

The terminal buffer is too small so it's not the entire log. I'll try and generate a proper one though.

@timkonieczny
Copy link
Contributor Author

Here's the full log
full_log.txt

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Ok, that build looks clean.

Now that we have the build completing, I'm thinking back to whether it could be the CPU that is the blocker (Intel Pentium Silver N5000) and the instructions it supports (Our FFMpeg build depends on some newer ones).

One way to verify would be to use windbg to see the actual binary that is failing to load -- which might be some Ffmpeg DLL.

An one way to "fix" it might be to comment out the usage of Ffmpeg/video code in the bindings:

I think if that's the issue the non-video parts of Exokit would probably just work on that CPU. However, if this is the issue, since the main purpose of Exokit is to be a high-performance XR engine, supporting low-thermal chipsets with less instructions like Pentium Silver might be out of scope for Exokit releases. 🤔

@timkonieczny
Copy link
Contributor Author

Fair enough. I was going to use exokit to compile for standalone headsets, never planned to plug in a non-standalone HMD. I'll look into the FFMpeg stuff though. Thanks a lot for your help anyway.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

Exokit does run on several standalone headsets, but the Windows x64 build was never intended for that purpose. (I wasn't aware of such headsets)

If you could provide more details, I'd love to help figure out what the Ffmpeg build requirements for it would be.

@timkonieczny
Copy link
Contributor Author

Basically, I want to compile a WebXR web application built with AFrame and Three.js, to an Oculus Go app. The app features 360 videos and UI in form of meshes.

@avaer
Copy link
Member

avaer commented Aug 6, 2019

I see, in that case, since Oculus mobile is supported, that wouldn't require dealing with the Windows x64 at all -- the Oculus binaries are unrelated.

The build scripts are here and use a totally different system: https://github.com/exokitxr/exokit/blob/master/scripts/oculusmobile/build-android.sh

(But for testing on Windows with that CPU, we would indeed need to figure out a way to remove Ffmpeg or recompile it for the instructions supported)

@timkonieczny
Copy link
Contributor Author

I switched to a different machine in the meantime. It's got a 8th gen i5, so the CPU APIs shouldn't be an issue anymore. I'm still running into problems building exokit though. Here's the error I'm getting now:
Annotation 2019-08-07 164421

@avaer
Copy link
Member

avaer commented Aug 7, 2019

That looks good, but one of the FFmpeg DLL's looks like it's not linked. It could be a wrong compiler version, or a previous build failure was not cleaned up (meaning the DLL would not be downloaded).

Is this a clean build environment with no changes?

@timkonieczny
Copy link
Contributor Author

It's a fresh clone. Any build files would only be saved to the working directory, right? I don't need to clean up any other directories?
Other than that, I'm using Node.js 12.2.0, and the node-gyp version that comes with the dependencies. I've also manually installed Visual Studio 2017 and Python 2.7 beforehand. There shouldn't be any other junk, its a clean Windows installation.
I still need to change the globs to paths on this system though BTW.

Cheers.

@avaer
Copy link
Member

avaer commented Aug 7, 2019

Any build files would only be saved to the working directory, right? I don't need to clean up any other directories?

Correct, Exokit should be contained to its own checkout.

Does the file exokit/deps/exokit-bindings/videocontext/src/Video.cpp exist, and is it included in the binding.gyp/build log? That's what the above error is referencing.

@timkonieczny
Copy link
Contributor Author

It was missing the videocontext directory in binding.gyp. I must've missed that one when I converted the globs. The AFrame Painter example works as expected now. Hooray!

Just for reference, here's the binding.gyp that worked for me (ignore the .txt ending):
binding.gyp.txt

Thanks.

@avaer
Copy link
Member

avaer commented Aug 8, 2019

Phew 😅, thanks for bearing with.

If you still have those binding.gyp edits would you mind opening a PR for it? I have a feeling there might be other folks that would need that solution, even though I'm not able to reproduce it on my machine. 🙏

@timkonieczny
Copy link
Contributor Author

#1404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants