GodotVR / godot_openvr

GDNative based Open VR module
MIT License
227 stars 35 forks source link

compiling and running on linux #17

Closed Olm-e closed 4 years ago

Olm-e commented 6 years ago

hello, I'm battling to get this working on linux, still some final things :

I can compile without problem godot and godot_openvr with a recent linux (mint18) but when run in steamvr runtime there is an error to load either godot entirely or linking the openvr_gdnative

   At: drivers/unix/os_unix.cpp:407.
ERROR: get_symbol: No valid library handle, can't get symbol from GDNative object
   At: modules/gdnative/gdnative.cpp:346.
ERROR: init_library: No godot_nativescript_init in "res://bin/libgodot_openvr.so" found
   At: modules/gdnative/nativescript/nativescript.cpp:1016.
ERROR: open_dynamic_library: Can't open dynamic library: /media/user/c33fcc09-6632-4e4f-b5ba-0bead6f9102a/godot/godot3/godot/bin/demo/bin/libgodot_openvr.so. Error: /usr/local/lib/libopenvr_api.so: symbol _ZTVNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
   At: drivers/unix/os_unix.cpp:407.

it happens the same if you build godot without adding some parameters to oblige CXX11 and run it from the steam runtime

the problem is linked to the fact that SteamVR is a chroot environment and is build on top of very old libs, based on ubuntu12.

so GCC/G++ are v.4.8 and std=c++11 max complient,

the procedure to build an application for steam(vr) seems that you create an entire chroot environment with the valve repo by apt install schroot getting the steam-runtime scripts here in your home : https://github.com/ValveSoftware/steam-runtime then running $ (sudo) setup-chroot.sh --amd64 (it will install a chroot in /etc/schroot)

then starting the dev environment (chroot) by ~$ schroot --chroot steamrt_scout_amd64 then compiling godot and godot_openvr in your home somewhere (~/godot3 and ~/godot_openvr f.ex. :) )

but then in godot_openvr SConstruct in linux section:

-- -std=c++14
++ -std=c++11

but then :

 ~/godot_openvr $ scons platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/Image.os -c -std=c++0x -fPIC -g -O3 -std=c++11 -fPIC -Iopenvr/headers -I. -Igodot_headers src/Image.cpp
In file included from src/Image.h:8:0,
                 from src/Image.cpp:9:
src/GodotCalls.h:8:37: fatal error: gdnative_api_struct.gen.h: No such file or directory
 #include <gdnative_api_struct.gen.h>
                                     ^
compilation terminated.
scons: *** [src/Image.os] Error 1
scons: building terminated because of errors.
BastiaanOlij commented 6 years ago

@beniwtv , any ideas ?

Olm-e commented 6 years ago

also it needs

platform/X11_32bit = "res://bin/libgodot_openvr.so" platform/X11_64bit = "res://bin/libgodot_openvr.so"

in godot_openvr.tres for it to register in godot as pluging ;)

BastiaanOlij commented 6 years ago

owh, did you initialize the submodules? (check if openvr and godot_headers subfolders are empty)

Also you need to use godot_headers from your godot install, the godot_headers repository is still in godot alpha2 state.

And yes godot_openvr.tres needs that change but I did just merge that in half an hour ago (along with a bundle of changes related to gdnative changes in godot)

Olm-e commented 6 years ago

yes I clone with --recursive ;)

Olm-e commented 6 years ago

wait wrong error ;) it's this one indeed

(steamrt_scout_amd64)user@user-P65xRP ~/godot_openvr $ scons platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/Image.os -c -std=c++0x -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -g -O3 -std=c++11 -fPIC -Iopenvr/headers -I. -Igodot_headers src/Image.cpp
In file included from src/Image.h:8:0,
                 from src/Image.cpp:9:
src/GodotCalls.h:18:14: error: 'godot_gdnative_nativearvr_api_struct' does not name a type
 extern const godot_gdnative_nativearvr_api_struct *arvr_api;
              ^
src/GodotCalls.h:19:14: error: 'godot_gdnative_nativescript_api_struct' does not name a type
 extern const godot_gdnative_nativescript_api_struct *nativescript_api;
              ^
scons: *** [src/Image.os] Error 1
scons: building terminated because of errors.
Olm-e commented 6 years ago

ok with a pull error changed a bit

(steamrt_scout_amd64)user@user-P65xRP ~/godot_openvr $ scons platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/Image.os -c -std=c++0x -fPIC -g -O3 -std=c++11 -fPIC -Iopenvr/headers -I. -Igodot_headers src/Image.cpp
In file included from src/Image.h:8:0,
                 from src/Image.cpp:9:
src/GodotCalls.h:17:14: error: 'godot_gdnative_core_api_struct' does not name a type
 extern const godot_gdnative_core_api_struct *api;
              ^
src/GodotCalls.h:18:14: error: 'godot_gdnative_ext_arvr_api_struct' does not name a type
 extern const godot_gdnative_ext_arvr_api_struct *arvr_api;
              ^
src/GodotCalls.h:19:14: error: 'godot_gdnative_ext_nativescript_api_struct' does not name a type
 extern const godot_gdnative_ext_nativescript_api_struct *nativescript_api;
              ^
src/Image.cpp: In function 'godot_object* Image_new()':
src/Image.cpp:12:9: error: 'api' was not declared in this scope
  return api->godot_get_class_constructor((char *)"Image")();
         ^
src/Image.cpp: In function 'void Image_create_from_data(godot_object*, int64_t, int64_t, bool, int64_t, const godot_pool_byte_array*)':
src/Image.cpp:18:8: error: 'api' was not declared in this scope
   mb = api->godot_method_bind_get_method("Image", "create_from_data");
        ^
scons: *** [src/Image.os] Error 1
scons: building terminated because of errors.
Olm-e commented 6 years ago

ok rebuilding godot and godot_openvr with last pull gives godot3 ok but godo_openvr the same error as above even after copying gdnative dir over godot_header dir I restress that these errors don"t appears when compiling with more recent gcc out of the chroot env, I'm not able to do more unfortunately...

beniwtv commented 6 years ago

@Olm-e You don't need any chroot for compiling - newer GCC is fine. Nor should you need to change any compiler settings. The original problem probably is due to your OpenVR library in /usr/local/lib/libopenvr_api.so not being compatible with what we expect - try to make sure it links against the one in the openvr/lib/linux64 subdirectory.

Also note that the headers in godot_headers aren't correct, these point to a repo that is, for now, for Godot version Alpha2.

Instead, point your build to your recently built Godot 3 master and do:

GODOT_HEADERS=/path/to/godot3/modules/gdnative/include scons platform=linux

Hope it helps.

Olm-e commented 6 years ago

mmmm .... well ... thanks, I'll try to get the pieces together ...

Olm-e commented 6 years ago

ok thanks you for support, It is very confusing with this driver bizare stack... I recompiled all from normal gcc, I could compile and run the hellovr_opengl with tracking in samples I had to play to get the right things in place, now it seems to track ! :) but strangely, I have a correct view on the screen and in the headset there is only a blue circle correctly tracked and displayed, on a fix monocular background like a screenshot of first frame ... Oo

edit : So yes, there is something wrong in the display for the demo I can use a vive controller with button visualisation, but I have the correct vue only on the pc screen, on the headset, I have the correct vue for a overlay circle, but the scene is freezed in first frame of camera in monoscopic.

I will see if it would be related to nvidia driver, (I'm on 381.26.13 recommended before, I'll test a newer one)

edit : updating driver to 384.90 does'nt solve and I need to launch another openvr app (like hellovr_opengl) for the driver to initialise in godot3, if not, it wait and fail

beniwtv commented 6 years ago

Line 7 is: https://github.com/BastiaanOlij/godot_openvr/blob/master/demo/ovr_controller/ovr_controller.gd#L7

On that line, it attempts to load a 3D model for the controller(s) attached, but that seems to be failing. Could you attach a screenshot of the HMD view and the window? (You can use the HMD mirror function in SteamVR to get the HMD screenshot).

Olm-e commented 6 years ago

here a screen where you can (barelly) see the chaperone overlay over fixed backround, and on the screen window, the correct scene view with controller

https://lut.im/gallery#SkhbYY6JTf/jnxqlOox4EsQOHRl.jpg

beniwtv commented 6 years ago

That looks indeed strange, I'll recompile myself in a bit (haven't done it in a few days as I've been busy), and see if I get the same thing now.

beniwtv commented 6 years ago

Just built, and all works fine. Controllers show up and scene does not freeze. I am on AMD Mesa though.

If you are currently on SteamVR beta, try the regular SteamVR. Or vice-versa.

screenshot from 2017-11-10 20-08-41

@BastiaanOlij Any ideas why that could be?

BastiaanOlij commented 6 years ago

Only just woke up, be aware that last night when @Olm-e was testing this (well night for me on this side of the world), Karroffel was in the middle of doing a few breaking changes to GDNative. I didn't have a chance to test all the changes so it is possible that there is a bug that sneaked in before i went to bed.

I also don't know if he did more changes during the night. It is possible that pulling in all latest changes from both godot and godot_openvr will fix things, or break it more :) I won't have a chance to test until this afternoon.

The new() error happens when the GDNS file for the render models class can't be loaded. Very possible I've missed a change related to Karroffels changes.

beniwtv commented 6 years ago

Yeah, could be. Everything from master (both Godot 3 and godot_openvr) as of 30 minutes does work for me, however.

@Olm-e Maybe check again all the repos are up to date - including the OpenVR submodule.

Olm-e commented 6 years ago

ok lets try ;) ... (some time later)

hello ... I made it works! !! \o/

actually it looks like the compositor (or vulkan or... don't know) doesn't like to have rescaled windows here...

so commenting line 14 in Main.gd let the correct image be drawn in the HMD (and deformed one in the computer screen) if you try to rescale it by hand, it freeze the image in the HMD screenshot for the record ;)

https://lut.im/gallery#wI3PQsH2TF/NDtbR2ruzMS4A0ym.png

thanks for the work attention, I should relook at all this and write a simple how-to at some point

now for something to be done with it :D

BastiaanOlij commented 6 years ago

Looks like Karroffel has made a few breaking changes, he's unfortunately not online atm so attempting to figure out what needs to be done :)

beniwtv commented 6 years ago

All should hopefully compile & work again since pull #19 - will test later today.

beniwtv commented 6 years ago

So I can report things seems to work. @Olm-e Did you get it working in the meantime?

BastiaanOlij commented 6 years ago

Yup, the master seems to work pretty well. I'm still having weird problems with the PR I'm still working on. I think it is related to the reference counting on the texture that is shared between the objects which indeed does not work correctly yet.

Olm-e commented 6 years ago

I have it working since the other day actually : I must pull and check the last commits since but it is working pretty well (in the version state I have) I'm working on a first project and will release a demo of my locomotion system in godot3 when all is in place ;)

https://mamot.fr/@Olm_e/98993741489082267

libreheadviewgif-godot3s

just one remark : could be nice to have it using same "platform" code as godot for compilation (had some stupid mistake with this): for godot3 it's "x11" or here it's "linux"

BastiaanOlij commented 6 years ago

Owh that looks nice @Olm-e !

what hardware are you running on?

Olm-e commented 6 years ago

I'm working on a tuxedo laptop with a nv 1060

I just can't test the last iteration, as the main godot3 master is not compiling now for me ... (posting issue there)

BastiaanOlij commented 6 years ago

Nice! I've got a 1060 based laptop as well but running windows.

yeah they're breaking the master a bit these last few days getting last features in before beta freeze is finalised :)

Olm-e commented 6 years ago

ok I could compile and run, but I have troubles now getting the image in the headset as before, disabling the rescaling of godot window is not helping anymore steamvr says godot is unresponsive, and the environment is "grayed" in the headset, although the tracking is working in the godot window...

BastiaanOlij commented 6 years ago

Make sure HDR is turned off on the viewport. OpenVR does not like the HDR buffers.

The size of godot window shouldn't matter, the output there is purely for spectating.

Olm-e commented 6 years ago

HDR is not on, I just try the demo project without touching for test, before I had to disable the godot viewport rescaling to get it working without freezing, now it's not doing any better...

here is the console output, with the godot viewport giving correct rendering and tracking (incl. controller) but vive headset giving a grayed out version of the "steamvr default non space" as like "indicating transition to somthing else not there yet... "

no error in godot output/debugger

ERROR: get_edited_scene_root: Indexcurrent_edited_scene=-1 out of size (edited_scene.size()=0) At: editor/editor_data.cpp:607. Running: /home/user/godot3b/godot/bin/godot.x11.tools.64 --path /home/user/godot3b/godot_openvr/godot_openvr/demo --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 5297 --position 448,240 OpenGL ES 3.0 Renderer: GeForce GTX 1060/PCIe/SSE2 GLES3: max ubo light: 409 GLES3: max ubo reflections: 455, ubo size: 144 Construct gdnative interface ARVR: Registered interface: OpenVR ARVR: Registered interface: Native mobile Creating render model resource OpenVR: initialising OpenVR context Main OpenVR interface has been initialized Main render models interface has been initialized. Creating render model resource OpenVR: increased use count to 2 OpenVR: increased use count to 3 Found openvr device 1 (vr_controller_vive_1_5) Found openvr device 2 (lh_basestation_vive) Primary interface set to: OpenVR Creating render model resource OpenVR: increased use count to 4 models: [arrow, dk2_camera, dk2_hmd, generic_controller, generic_hmd, generic_tracker, hard_bounds, laser_pointer, lh_basestation_01_boysandgirls, lh_basestation_02_batman, lh_basestation_03_robin, lh_basestation_vive, lighthouse_ufo, mptam_hmd_model, oculus_cv1_controller_left, oculus_cv1_controller_right, ref_controller, rift_camera, stage, steam_controller_02_freeman, steam_controller_03_gordon, vr_controller_01_mrhat, vr_controller_02_mrhat_puck, vr_controller_05_wireless_b, vr_controller_vive_1_5, {htc}vr_tracker_vive_1_0, {system}arrow, {system}dk2_camera, {system}dk2_hmd, {system}generic_controller, {system}generic_hmd, {system}generic_tracker, {system}hard_bounds, {system}laser_pointer, {system}lh_basestation_01_boysandgirls, {system}lh_basestation_02_batman, {system}lh_basestation_03_robin, {system}lh_basestation_vive, {system}lighthouse_ufo, {system}mptam_hmd_model, {system}oculus_cv1_controller_left, {system}oculus_cv1_controller_right, {system}ref_controller, {system}rift_camera, {system}stage, {system}steam_controller_02_freeman, {system}steam_controller_03_gordon, {system}vr_controller_01_mrhat, {system}vr_controller_02_mrhat_puck, {system}vr_controller_05_wireless_b, {system}vr_controller_vive_1_5] Releasing render model resource OpenVR: decreased use count to 3 Controller vr_controller_vive_1_5_1 became active Argument count: 1 Searching for: vr_controller_vive_1_5 OpenVR reports: 106 OpenVR reports: 106 OpenVR reports: 106 ...

screenshot from 2017-11-28 00-06-19

BastiaanOlij commented 6 years ago

Are you on a laptop that has a dual GPU? I don't know how things work on Linux but I've ran into trouble before that the NVidia driver doesn't select the correct GPU, so it will run Godot using the GTX and run steamVR using the onboard intel chip. They all need to run on the same GPU..

Error 106 is VRInitError_Init_InvalidInterface, could be that issue.

Olm-e commented 6 years ago

actually it seems it's SteamVR that is the problem, even the "steamvr tutorial" is doing the same and looking at the forum plenty of pleople complains, and specifically on linux same error as here https://steamcommunity.com/app/250820/discussions/5/1479856439039327893/ damn ... home we can soon get openHMD to get position tracking

ChristophHaag commented 6 years ago

I'll barge in and say that it's mostly the nvidia driver. Here on AMD (RX 480) it mostly just works, but the performance is not good.

screenshot_20171126_164450

BastiaanOlij commented 6 years ago

@ChristophHaag I don't know how the RX 480 compares to my GTX 1060, I'm actually testing around with Fracteeds demo at the moment. While i had to tone a few things down it's now running at over 60fps. Thats on Windows though, i don't know how much better SteamVR runs on Windows. I still have a few things I hope to try out in the coming weeks that may give things a speed boost. I also heard someone say there is a setting in steam VR where you can reduce the size Steam VR asks of games to render the eyes at.

@Olm-e make sure to test out: https://github.com/BastiaanOlij/godot_openhmd It should now compile and run, I was talking to another guy, name slipped my mind, who has been trying it out lately. There are still some issues because its a straight port of my earlier module version and it really needs to be changed so the 3rd party dependencies are compiled using their own build systems. The current way scons is building those libraries is really a hack. They are making headway on controller tracking and I wouldn't be surprised if you could use one of their branches to try it out. In theory the controller logic should work when added in.

I still see the openhmd gdnative module as very experimental, there are a bunch of things that have to be redone or improved upon. Would be great to get some extra hands on board:)

ChristophHaag commented 6 years ago

Performance issue are 99% because of deficiencies in the radv vulkan driver or its interaction with SteamVR. The slider is the Supersampling slider in the Developer settings: https://imgur.com/6qo6ULv

The funny thing is that the frametime graph actually shows much improvement when the RX 480 is set to the lowest clocks: 1288MHz: https://i.imgur.com/pAPDwSn.png 300MHz: https://i.imgur.com/0NWHO59.png Visually there's not much difference, there's slight stutter all around. So yea, almost surely a driver issue.

On the OpenHMD front there is some super WIP Vive lighthouse tracking code with opencv inside this repository https://github.com/lubosz/OSVR-Vive-Libre/commits/pnp that was used to create this youtube video https://www.youtube.com/watch?v=THpDpKPvZm0 but I do not believe it is hooked up anywhere yet, not even to the OSVR driver of that repository.

Olm-e commented 6 years ago

Ok ... installing latest NV driver 387.34 get it back somewhat working ... but now with really bad framerate (it was good before) and with bizarre systems hangups/freeze for multi seconds ... this is indeed the interaction between the driver and steamvr that makes this happening, but as it's 2 blackboxes... :/ great to see advancement on the Libre part, I have a contact that could be interested in funding if needed to makes it happens (send me a PM for info)

BastiaanOlij commented 6 years ago

@Olm-e does Github have PM functionality?

I'm afraid I'm a little hamstrung when it comes to Linux, I've had very little exposure to the platform. But it sounds like something Valve needs to be contacted on?

Olm-e commented 6 years ago

@BastiaanOlij ha yes, true I need to add some contact ;) I was talking about making the Libre stack happening, to not be tied to SteamVR that changes without notice and makes things break at random time f.ex. I am working on systems/projects that have more values in being stable than having the last thingies so a working OpenHMD/OSVR stack is best in my pov ;)

ChristophHaag commented 6 years ago

The thing is, everyone is using Valve's openvr API and that's not going to change until it's been superseded by OpenXR.

If people really want to be independent of the proprietary SteamVR runtime in the meantime, they can help finishing an independent OpenVR implementation. This is my start, but still a very early prototype: https://github.com/ChristophHaag/openvr_api-libre. Alone I surely won't finish this before OpenXR is out though.

Olm-e commented 6 years ago

Hi, to report, I get correct result with setting the Nvidia Driver 387.34 Powermizer to Max performance and not adaptive. It was making all the SteamVR/OpenVR really bad fps (like 0.3fps ... ! ) setting it manually solve this seen this as hint https://github.com/ValveSoftware/SteamVR-for-Linux/issues/82

BastiaanOlij commented 6 years ago

Cool!! This should probably go into the readme or into a troubleshooting FAQ:)

On Tue, 5 Dec 2017 at 9:50 pm, Olm-e notifications@github.com wrote:

also : tip to launch Godot with OpenVR without Steam in linux : from your home: cd .steam/steam/ubuntu12_32/steam-runtime/ ./run.sh ../../steamapps/common/SteamVR/bin/vrmonitor.sh

then launch godot as usual cd ~/godot3/bin ./godot.tools.x64

it will launch the VR monitor app and let godot hook in, without connecting to steam etc ... (will complain but no stopping error)

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/BastiaanOlij/godot_openvr/issues/17#issuecomment-349267809, or mute the thread https://github.com/notifications/unsubscribe-auth/AB2vacYU-brFq4IVR7IS3vHcwyPNBkITks5s9R_mgaJpZM4QZhKP .

-- Kindest regards,

Bastiaan Olij

https://www.facebook.com/bastiaan.olij https://www.youtube.com/channel/UCrbLJYzJjDf2p-vJC011lYw https://github.com/BastiaanOlij

BastiaanOlij commented 6 years ago

@beniwtv if you have time, could you see if this works for you: https://github.com/BastiaanOlij/godot-openvr-asset (it'll be added to the asset library soon I hope)

And maybe add a compiled version for linux?

beniwtv commented 6 years ago

@BastiaanOlij Sweet! Will check it out when I get home :) I probably can't add the compiled version for Linux unless I can solve the crash today (I feel I'm getting closer)

Olm-e commented 6 years ago

so for the time being, apparently for it to works on gnu-linux, at least on some, it needs being compiled with the 'use_llvm=yes' option added to scons for both godot and godot_openvr it works with clang 3.8 + llvm 5.0(.1) on manjaro and linux mint 18

calumk commented 6 years ago

Just wanted to drop in and confirm, I have managed to get the godot-openvr-asset working under Ubuntu Mate 16.04, with HTC VIVE + controllers.

Incase anyone new to this stumbles across this post, I wanted to outline steps i used to get it working

1. Install Steam

2. Download Godot from official website,

3. Follow @BastiaanOlij 's tutorial https://www.youtube.com/watch?v=267dRjEYliU

4. Have fun!

beniwtv commented 6 years ago

@calumk Thank you for confirming the Linux build I provided for the asset also works for someone else than me. Glad you have fun with it :)

lboklin commented 6 years ago

Compiling with scons platform=x11 on Ubuntu 17.10 produces a binary which doesn't work for me (but the binary from https://github.com/BastiaanOlij/godot-openvr-asset/ does). Adding use_llvm=yes fails - logs from that can be provided if desired.

Output from cd demo && godot -v:

No touch devices found                                                                                                                                                                                                                
PulseAudio: detected 2 channels                                                                                                                                                                                                       
PulseAudio: audio buffer frames: 512 calculated latency: 11ms                                                                                                                                                                         
failed cursor: size_bdiag                                                                                                                                                                                                             
failed cursor: size_fdiag                                                                                                                                                                                                             
Using GLES3 video driver                                                                                                                                                                                                              
OpenGL ES 3.0 Renderer: GeForce GTX 1070/PCIe/SSE2                                                                                                                                                                                    
load resource: res://bin/godot_openvr.gdnlib                                                                                                                                                                                          
Construct gdnative interface                                                                                                                                                                                                          
CORE API HASH: 5483915881153564253                                                                                                                                                                                                    
EDITOR API HASH: -5919760101651613804                                                                                                                                                                                                 
load resource: res://default_env.tres                                                                                                                                                                                                 
load resource: res://Main.tscn                                                                                                                                                                                                        
load resource: res://Main.gd                                                                                                                                                                                                          
load resource: res://bin/OpenVRRenderModel.gdns                                                                                                                                                                                       
load resource: res://bin/godot_openvr.gdnlib (cached)                                                                                                                                                                                 
load resource: res://bin/godot_openvr.gdnlib (cached)                                                                                                                                                                                 
load resource: res://Milkyway.png                                                                                                                                                                                                     
load resource: res://Table.tscn                                                                                                                                                                                                       
load resource: res://ovr/ovr_first_person.tscn                                                                                                                                                                                        
load resource: res://ovr/ovr_controller.tscn                                                                                                                                                                                          
load resource: res://bin/OpenVRRenderModel.gdns (cached)                                                                                                                                                                              
load resource: res://ovr/ovr_controller.tscn (cached)                                                                                                                                                                                 
load resource: res://ovr/ovr_controller.tscn (cached)                                                                                                                                                                                 
load resource: res://ovr/Function_Teleport.tscn          
load resource: res://ovr/Function_Teleport.gd            
load resource: res://ovr/teleport_arrow.png              
load resource: res://ovr/teleport_target.png             
load resource: res://ovr/teleport_arrow.png (cached)     
load resource: res://ovr/teleport_target.png (cached)    
load resource: res://ovr/Function_Teleport.gd (cached)   
load resource: res://ovr/Function_Direct_movement.tscn   
load resource: res://Milkyway.png (cached)               
load resource: res://Main.gd (cached)                    
load resource: res://Table.tscn (cached)                 
load resource: res://ovr/ovr_first_person.tscn (cached)  
load resource: res://ovr/Function_Teleport.tscn (cached) 
load resource: res://ovr/Function_Direct_movement.tscn (cached)                                                    
Creating render model resource                           
OpenVR: initialising OpenVR context                      
Main OpenVR interface has been initialized               
Main render models interface has been initialized.       
Creating render model resource                           
OpenVR: increased use count to 2                         
OpenVR: increased use count to 3                         
Found openvr device 1 (lh_basestation_vive)              
Found openvr device 2 (lh_basestation_vive)              
Primary interface set to: OpenVR                         
Creating render model resource                           
OpenVR: increased use count to 4                         
models: [arrow, dk2_camera, dk2_hmd, generic_controller, generic_hmd, generic_tracker, hard_bounds, laser_pointer, lh_basestation_01_boysandgirls, lh_basestation_02_batman, lh_basestation_03_robin, lh_basestation_vive, lighthouse_ufo, mptam_hmd_model, oculus_cv1_controller_left, oculus_cv1_controller_right, ref_controller, rift_camera, stage, steam_controller_02_freeman, steam_controller_03_gordon, vr_controller_01_mrhat, vr_controller_02_mrhat_puck, vr_controller_05_wireless_b, vr_controller_vive_1_5, {htc}vr_tracker_vive_1_0, {system}arrow, {system}dk2_camera, {system}dk2_hmd, {system}generic_controller, {system}generic_hmd, {system}generic_tracker, {system}hard_bounds, {system}l
aser_pointer, {system}lh_basestation_01_boysandgirls, {system}lh_basestation_02_batman, {system}lh_basestation_03_robin, {system}lh_basestation_vive, {system}lighthouse_ufo, {system}mptam_hmd_model, {system}oculus_cv1_controller_l
eft, {system}oculus_cv1_controller_right, {system}ref_controller, {system}rift_camera, {system}stage, {system}steam_controller_02_freeman, {system}steam_controller_03_gordon, {system}vr_controller_01_mrhat, {system}vr_controller_0
2_mrhat_puck, {system}vr_controller_05_wireless_b, {system}vr_controller_vive_1_5]
Releasing render model resource
OpenVR: decreased use count to 3                         
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. Framebuffer name must be generated before being bound.                         
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. Framebuffer name must be generated before being bound.                         
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. The required buffer is missing.                                                
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: operator[]: FATAL: Index p_index=0 out of size (size()=0)                                                   
   At: core/vector.h:138.                                
handle_crash: Program crashed with signal 4              
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues   
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x37140) [0x7fa5970cf140] (??:0)                                              
[2] godot() [0x887d67] (<artificial>:?)                  
[3] godot() [0x951f28] (<artificial>:?)                  
[4] godot() [0x18edcf6] (??:?)                           
[5] godot() [0x179393b] (??:?)                           
[6] godot() [0x18ef6e1] (<artificial>:?)                 
[7] godot() [0x4c5fd5] (??:?)                            
[8] godot() [0x45412d] (??:?)                            
[9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fa5970b91c1] (??:0)                                
[10] godot() [0x46061f] (??:?)                           
-- END OF BACKTRACE --                                   
[1]    14316 abort (core dumped)  godot -v
beniwtv commented 6 years ago

@lboklin You have to either use the asset or compile with --use_llvm=yes (and make sure you specifically compile with LLVM 5.0.1). GCC currently runs into a problem when compiling, and the resulting plugin will crash Godot.

If you want, provide your LLVM compiling logs here and we'll take a look.

lboklin commented 6 years ago

Output from scons platform=x11 use_llvm=yes:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o src/ARVRInterface.os -c -fPIC -Iopenvr/headers -I. -Igodot_headers src/ARVRInterface.cpp
In file included from src/ARVRInterface.cpp:8:
In file included from src/ARVRInterface.h:8:
In file included from src/OVRCalls.h:8:
openvr/headers/openvr.h:1444:104: error: use of undeclared identifier 'nullptr'
        virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0;
                                                                                                              ^
openvr/headers/openvr.h:1820:219: error: use of undeclared identifier 'nullptr'
                virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                                                                                                        ^
openvr/headers/openvr.h:1823:132: error: use of undeclared identifier 'nullptr'
                virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                 ^
openvr/headers/openvr.h:1826:138: error: use of undeclared identifier 'nullptr'
                virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                       ^
openvr/headers/openvr.h:1913:71: error: use of undeclared identifier 'nullptr'
                virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
                                                                                    ^
openvr/headers/openvr.h:1915:118: error: use of undeclared identifier 'nullptr'
                virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                   ^
openvr/headers/openvr.h:1916:122: error: use of undeclared identifier 'nullptr'
                virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                       ^
openvr/headers/openvr.h:1917:121: error: use of undeclared identifier 'nullptr'
                virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                      ^
openvr/headers/openvr.h:1918:129: error: use of undeclared identifier 'nullptr'
                virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                              ^
openvr/headers/openvr.h:1922:105: error: use of undeclared identifier 'nullptr'
                virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                      ^
openvr/headers/openvr.h:1923:109: error: use of undeclared identifier 'nullptr'
                virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                          ^
openvr/headers/openvr.h:1924:107: error: use of undeclared identifier 'nullptr'
                virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                        ^
openvr/headers/openvr.h:1925:160: error: use of undeclared identifier 'nullptr'
                virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                                                             ^
openvr/headers/openvr.h:1927:83: error: use of undeclared identifier 'nullptr'
                virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                ^
openvr/headers/openvr.h:1928:116: error: use of undeclared identifier 'nullptr'
                virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                 ^
openvr/headers/openvr.h:2589:19: error: use of undeclared identifier 'nullptr'
                : m_pImageData( nullptr )
                                ^
openvr/headers/openvr.h:3157:158: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                           ^
openvr/headers/openvr.h:3157:196: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                                                                 ^
openvr/headers/openvr.h:3157:234: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                                                                                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
scons: *** [src/ARVRInterface.os] Error 1
scons: building terminated because of errors.

clang --version:

clang version 5.0.0-3 (tags/RELEASE_500/final)                                                                                                                                                                                        
Target: x86_64-pc-linux-gnu                                                                                                                                                                                                           
Thread model: posix                                                                                                                                                                                                                   
InstalledDir: /usr/bin
lboklin commented 6 years ago

35 enabled me to build a working .so with scons platform=x11!

BastiaanOlij commented 6 years ago

35 has now been merged :)

fire commented 6 years ago

Is anyone able to run a demo? I get a purple screen for the default master and a crash for the blit branch.