PhoneVR icon indicating copy to clipboard operation
PhoneVR copied to clipboard

Fix errors during linux compilation (does not link properly yet)

Open gaycodegal opened this issue 3 years ago • 10 comments

Fixes errors during linux compilation. Allows the program to be compiled to a certain extent, it does not link properly but the changes should be non-harmful and provide a starting platform for others who want linux support.

The main thing different for windows is I used C++17 filesystem path, so do be sure to test this code to make sure it compiles, or upgrade to C++17

gaycodegal avatar Nov 26 '21 18:11 gaycodegal

related to #51 : but only very basic, as it still is mostly non-functional. And obviously no changes were made for hard coded windows specific paths

gaycodegal avatar Nov 26 '21 18:11 gaycodegal

Ok, there was some issues with appveyor CI. It should build this PR on you next commit to this PR.

ShootingKing-AM avatar Nov 26 '21 22:11 ShootingKing-AM

Can I ask how to build the linux driver? I just don't understand makefiles and the other magic stuff.

LosVocelos avatar Jan 03 '22 21:01 LosVocelos

Can I ask how to build the linux driver? I just don't understand makefiles and the other magic stuff.

Linux is still in experimental stage for overall OpenVR based developement. So even PhoneVR is not ready for linux users.

Regarding linux developemnt of PhoneVR, if you dont understand Makefiles, it will be hard for you to build linux version or help in its development.

ShootingKing-AM avatar Jan 04 '22 07:01 ShootingKing-AM

Yea, I know that, but I just want to make VR headset from my phone... I've already tried LinusTrinus, but for some reason every time I launch SteamVR it gives me error 307. I tried different forks, but nothing helped, so I was trying to find some other projects.

LosVocelos avatar Jan 05 '22 17:01 LosVocelos

And about the makefiles, I know something about them. It's just that I usually see makefiles that are runnable, they give me some errors, then I fix it, and then it works. But I have never seen a makefile, that looks like this: obrazek

LosVocelos avatar Jan 05 '22 17:01 LosVocelos

Sad to hear linusTrinus does not work. The makefile you screenshot is fairly standard, it includes some variables on the left. For instance CC is the name of the executable compiler to run GCC or g++ OBJS is the object files that will be created, CXXFLAGS are c++ compiler flags, LDFLAGS are linker flags (there are none).

A make rule with object files after it is syntactic sugar for make that let's it know you want those object files compiled before it runs the make command. This helps with partial recompiles usually. Then it's just a basic command that combines all of our variables into executing the GCC compiler.

If you were wondering what -I means, that's the c compilers include directory in search paths command. If you have further questions on make files i would reccomend googling it.

Also, there's no point trying to compile this project as is for Linux, the underlying code relies on directx. There is no Linux directx library. It would have to be rewritten for vulkan which is an extra 1000+ lines of code (literally).

I was hoping to learn how linusTrinus works and maybe figure out how that could work instead of using directx but if that doesn't work, i couldn't do anything on top then.

Best of luck!

gaycodegal avatar Jan 17 '22 00:01 gaycodegal

Oh and if you're wondering if the make file builds successfully, no it does not, because directx among other things.

gaycodegal avatar Jan 17 '22 00:01 gaycodegal

That being said running make driver is how you execute this if you wanted to see the errors for yourself

gaycodegal avatar Jan 17 '22 00:01 gaycodegal

Oh, ok. Thanks for the explanation.

LosVocelos avatar Jan 29 '22 21:01 LosVocelos

Server is now ALVR #113 - which can be now built on linux.

ShootingKing-AM avatar Apr 22 '23 13:04 ShootingKing-AM