SieR-VR/openvr.js

undefined symbol: VR_InitInternal2

Closed this issue · 14 comments

NodeJS version: 16.13.1 / Linux
openvr.js version: 0.3.1

When trying to run the following code:

ivrSystem = vr.VR_Init(vr.EVRApplicationType.VRApplication_Overlay);

I receive the following error:

node: symbol lookup error: […]/node_modules/openvr.js/build/Release/openvr.node: undefined symbol: VR_InitInternal2

I've implemented these stuffs for windows, so It will not works on linux. I'll add some linux features in gyp.

I changed files but I couldn't test it. Can you run it and notify me?

This looks slightly better:

Error: libopenvr_api.so: cannot open shared object file: No such file or directory

Umm.. was openvr.node file generated?

Yeah:

image

It will work maybe. I added copying dynamic library files.

Still no dice. I googled for that, and other gyp users seem to struggle with the same issue, although with no solution attached:

nodejs/node-gyp#2258

By the way, I assume you could test this on Windows with the Linux Subsystem for Windows? Just an idea, but I have no issue testing for you :)

image
I tested it on wsl. When I ejected dynamic library file to project root, There's some progress.

That one should usually be supplied by the host system, so you could potentially ignore that.

Well, I don't know which linux distribution are you using, you'll need add openvr dynamic library to global.

I guess that's fair enough :)

By the way, this makes we wonder, where does Windows take the libopenvr_api.dll from?

npm package contains openvr_api.dll. I guess this difference came from difference of method of searching library file.

I'll do some more investigation to figure out how to properly link it. If I can get it working directly, I'll open a PR.

Thanks!