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

opensubdiv: fix glew paths #30515

Merged
merged 1 commit into from Oct 17, 2017
Merged

opensubdiv: fix glew paths #30515

merged 1 commit into from Oct 17, 2017

Conversation

guibou
Copy link
Contributor

@guibou guibou commented Oct 17, 2017

Include and lib are not in ${glew} but in ${glew.dev}.

This changes what is found by the cmake of opensubdiv and some features
are now enabled, such as OpenGL 4.2 support.

Motivation for this change

Get opensubdiv right.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Include and lib are not in ${glew} but in ${glew.dev}.

This changes what is found by the cmake of opensubdiv and some features
are now enabled, such as OpenGL 4.2 support.
@Mic92
Copy link
Member

Mic92 commented Oct 17, 2017

How can I check that opengl 4.2 is enabled?

@guibou
Copy link
Contributor Author

guibou commented Oct 17, 2017

@Mic92 Well, OpenGL 4.2 was an example.

If I'm building opensubdiv with the current nixpkgs, I got this log:

...
-- Found GLEW: /nix/store/dxsxz9bh2n945viqpy82bx6m02ld1x46-glew-2.0.0-bin/include
...
CMake Warning at CMakeLists.txt:413 (message):
  OpenGL 4.2 was not found : support for GLSL transform feedback kernels will
  be disabled in Osd.  If you have an OpenGL SDK installed (version 4.2 or
  above), please refer to the FindOpenGL.cmake shared module in your cmake
  installation.


CMake Warning at CMakeLists.txt:428 (message):
  OpenGL 4.3 was not found : support for GLSL compute shader kernels will be
  disabled in Osd.  If you have an OpenGL SDK installed (version 4.3 or
  above), please refer to the FindOpenGL.cmake shared module in your cmake
  installation.

Observe how it complains about OpenGL 4.2 and 4.3 not enabled. See also how it has found GLEW in a totally wrong path:

$ ls /nix/store/dxsxz9bh2n945viqpy82bx6m02ld1x46-glew-2.0.0-bin/include
ls: cannot access '/nix/store/dxsxz9bh2n945viqpy82bx6m02ld1x46-glew-2.0.0-bin/include': No such file or directory

On the other hand, building with the fix:

...
-- Found GLEW: /nix/store/brs5lckc7rwq2njrlsqz0w9585xfjf4y-glew-2.0.0-dev/include
...

There is no error about OpenGL being disable AND the GLEW path is correct:

$ ls /nix/store/brs5lckc7rwq2njrlsqz0w9585xfjf4y-glew-2.0.0-dev/include
GL

But simply, we can check what's inside glew and glew.dev:

$ nix-build -A glew
/nix/store/dxsxz9bh2n945viqpy82bx6m02ld1x46-glew-2.0.0-bin
$ ls /nix/store/dxsxz9bh2n945viqpy82bx6m02ld1x46-glew-2.0.0-bin
bin
$ nix-build -A glew.dev
/nix/store/brs5lckc7rwq2njrlsqz0w9585xfjf4y-glew-2.0.0-dev
$ ls /nix/store/brs5lckc7rwq2njrlsqz0w9585xfjf4y-glew-2.0.0-dev
include  lib  nix-support

@Mic92
Copy link
Member

Mic92 commented Oct 17, 2017

Thanks. Now I see the difference.

@Mic92 Mic92 merged commit 05dc430 into NixOS:master Oct 17, 2017
@Mic92
Copy link
Member

Mic92 commented Oct 17, 2017

Does this also affect 17.09?

@guibou
Copy link
Contributor Author

guibou commented Oct 17, 2017

@Mic92 I think it also affect 17.09. I quickly checked and GLEW was already splitted in 17.09 AND building opensubdiv leads to the same errors.

@Mic92
Copy link
Member

Mic92 commented Oct 17, 2017

fixed also there.

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

Successfully merging this pull request may close these issues.

None yet

2 participants