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

Building on linux #3

Closed
nicokoch opened this issue Feb 27, 2016 · 7 comments
Closed

Building on linux #3

nicokoch opened this issue Feb 27, 2016 · 7 comments

Comments

@nicokoch
Copy link
Contributor

Ok, so I ran into several problems when building on linux, one of which is easily solved:

  1. KhronosGroup/glslang does not compile on linux with your included version. This issue was fixed by fix #171 - error: ‘isinf’ was not declared in this scope KhronosGroup/glslang#172 , so you should update that.
  2. There is an error when building winit. I'm using multirust so I'm not really sure if this happens with a normal rust install. This is the output:
Compiling winit v0.4.8 (https://github.com/tomaka/winit#b4d4fee8)
/home/kokxx/.multirust/toolchains/nightly/cargo/git/checkouts/winit-a80c9921f4b7860e/master/src/api/x11/ffi.rs:14:5: 14:60 error: environment variable `OUT_DIR` not defined
/home/kokxx/.multirust/toolchains/nightly/cargo/git/checkouts/winit-a80c9921f4b7860e/master/src/api/x11/ffi.rs:14     include!(concat!(env!("OUT_DIR"), "/glx_bindings.rs"));
                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kokxx/.multirust/toolchains/nightly/cargo/git/checkouts/winit-a80c9921f4b7860e/master/src/api/x11/ffi.rs:14:5: 14:60 error: couldn't read "/home/kokxx/.multirust/toolchains/nightly/cargo/git/checkouts/winit-a80c9921f4b7860e/master/src/api/x11/0/glx_bindings.rs": No such file or directory (os error 2)
/home/kokxx/.multirust/toolchains/nightly/cargo/git/checkouts/winit-a80c9921f4b7860e/master/src/api/x11/ffi.rs:14     include!(concat!(env!("OUT_DIR"), "/glx_bindings.rs"));
                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not compile `winit`.

To learn more, run the command again with --verbose.
@tomaka
Copy link
Member

tomaka commented Feb 27, 2016

  1. Will do!
  2. I haven't updated winit to compile on Linux yet.

Also note that the VK_KHR_surface_win32 extension is hardcoded in the library for the moment, so you'll likely get a failed initialization.

@tomaka tomaka mentioned this issue Feb 27, 2016
@nicokoch
Copy link
Contributor Author

Ah, thanks! I could probably hack around the VK_KHR_surface_win32 thing. About winit I know nothing

@nicokoch
Copy link
Contributor Author

Thanks for the quick support!
I fixed most of the problems, but I'm not really sure how to create the surface.
I can't do Surface::from_hwnd, because that's windows only. Can I somehow use from_display_mode, or should I implement a linux version manually?

@tomaka
Copy link
Member

tomaka commented Feb 27, 2016

Oh I forgot to push my commit where I add the missing Surface constructors. It should be good now.

@nicokoch
Copy link
Contributor Author

Works now, thanks a lot!

tomaka added a commit that referenced this issue Apr 11, 2016
@tomaka tomaka closed this as completed Apr 28, 2016
@tomaka
Copy link
Member

tomaka commented Apr 28, 2016

The examples should now work out-of-the-box on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants