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

Fixes shader creation with Ubuntu+nvidia #131

Closed
wants to merge 1 commit into from
Closed

Fixes shader creation with Ubuntu+nvidia #131

wants to merge 1 commit into from

Conversation

Patola
Copy link
Contributor

@Patola Patola commented Jul 10, 2015

This fixes issue #88 with Ubuntu + nvidia

@daid
Copy link
Contributor

daid commented Jul 10, 2015

I do think this needs a tiny platform dependeny check, as on linux adding this is most likely fine (as the package is easy to install) but on Mac and Windows adding python-opengl as a dependency isn't that great. (And it will possibly break "angle" support on windows)

@awhiemstra
Copy link
Contributor

Hmm, the problem I have with this is that it is an Ubuntu-specific bug that we are now solving by adding a global dependency. A simple platform.system() == "Linux" check would at least reduce it to "just" Linux but for Fedora or Arch users that would still introduce an additional dependency. Ideally this would just be fixed upstream, but until it is I would be fine with introducing this workaround as long as it is limited to Ubuntu/Debian based systems.

@Patola
Copy link
Contributor Author

Patola commented Jul 10, 2015

I will remake the patch. Thanks

@thopiekar
Copy link
Contributor

Think something like

if platform.system() == "Linux":
    if platform.linux_distribution()[0] in ("Ubuntu", ): # Just in case it also happens on Debian, so it can be added
        from OpenGL import GL

thopiekar added a commit to thopiekar/Cura that referenced this pull request Sep 11, 2015
For any reason this problem seems to be Ubuntu-specific and is also present since pyqt4.
* Updated the Ultimaker#131 pull request and added platform.linux_distribution to check for "Ubuntu"
* Added notice about the bug report above the if-clause
* Added comment why <platform.system() == "Linux"> is needed
@BurtonQin
Copy link

This problem occurred to me after I installed NVDIA driver. Thanks to the answers above, I found it easy to deal with.

  1. ldconf -p | grep libGL.so
    I found that the first entry was still
    libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
    instead of
    libGL.so (libc6,x86-64) => /usr/lib/nvidia-340-updates/libGL.so
  2. cd /etc/ld.so.conf.d
    I found many conf files, including
    i386-linux-gnu_GL.conf and x86_64-linux-gnu_GL.conf
    cat x86_64-linux-gnu_GL.conf
    /usr/lib/nvidia-340-updates
    /usr/lib32/nvidia-340-updates
    but i386-linux-gnu_GL.conf is empty.
    So I just copied the contents in x86-linux-gnu_GL.conf to i386-linux-gnu_GL.conf
  3. sudo ldconfig
    Everything is OK now☺

@thopiekar
Copy link
Contributor

I'll test it today.
Can you report this problem at launchpad? Would be great to have it fixed
in Ubuntu itself.
Another important question: to you still get this segmentation fault, when
closing Cura?

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.

5 participants