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

GLEW could not be initialized: Unknown error #7282

Open
weiyshay opened this issue Oct 13, 2023 · 6 comments
Open

GLEW could not be initialized: Unknown error #7282

weiyshay opened this issue Oct 13, 2023 · 6 comments
Labels
Type: Bug Something isn't working correctly

Comments

@weiyshay
Copy link

Summary

I successfully built Slicer(latest mater by the day) and it prompts some messages in the terminal after launching it.

Steps to reproduce

Building:

sudo apt install git subversion build-essential cmake cmake-curses-gui cmake-qt-gui   qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qtwebengine5-dev qtscript5-dev   qtbase5-private-dev libqt5x11extras5-dev libxt-dev libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-Linux-x86_64.sh
chmod  +x cmake-3.27.1-Linux-x86_64.sh
sudo ./cmake-3.27.1-Linux-x86_64.sh --skip-license --prefix=/usr/local
cd Slicer-SuperBuild-Debug/
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE:STRING=Debug ../Slicer

Logs:

Slicer-build$ ./Slicer
QSocketNotifier: Can only be used with threads started with QThread
qt.network.ssl: Incompatible version of OpenSSL (built with OpenSSL >= 3.x, runtime version is < 3.x)
[SSL] SSL support disabled - Failed to load SSL library !
[SSL] Failed to load Slicer.crt
QObject::connect: No such signal qSlicerSegmentationsSettingsPanel::setDefaultOverwriteMode(QString) in /data/2023/src/slicer/Slicer/Modules/Loadable/Segmentations/qSlicerSegmentationsSettingsPanel.cxx:122
QObject::connect:  (sender name:   'DefaultOverwriteModeComboBox')
QObject::connect:  (receiver name: 'qSlicerSegmentationsSettingsPanel')
Switch to module:  "Welcome"
GLEW could not be initialized: Unknown error
GLEW could not be initialized: Unknown error
GLEW could not be initialized: Unknown error
GLEW could not be initialized: Unknown error

Expected behavior

No error in the console.

Environment

  • Ubuntu 23.04
  • Slicer version:
commit 2800aeef881bab3366a0656f2fcaa8bf9cf78788 (HEAD -> main, origin/main, origin/HEAD)
Author: SET <set@chirvasc-60.pro>
Date:   Wed Jul 26 21:08:00 2023 +0200

    ENH: Add a setting for the overwrite mode masking option of the segment editor
    
    Co-authored-by: Andras Lasso <lasso@queensu.ca>
@weiyshay weiyshay added the Type: Bug Something isn't working correctly label Oct 13, 2023
@lassoan
Copy link
Contributor

lassoan commented Oct 16, 2023

  • SSL: you can use system SSL or use custom-built Qt that has the right SSL version
  • Qt connection: update Slicer from latest main version from github
  • GLEW: I don't know that is causing it, but it is most likely not specific to Slicer (but a Qt and/or VTK issue, so you may find hints online about what causes it and how to resolve)

Does Slicer run fine?

@weiyshay
Copy link
Author

weiyshay commented Oct 17, 2023

Thank your very much for your comment!

SSL: you can use system SSL or use custom-built Qt that has the right SSL version

Any option that I can configure to use system SSL? Better not to rebuild QT. :)

Qt connection: update Slicer from latest main version from github

It was the 'main' branch a few days ago and I will pull and give it a shot.

GLEW: I don't know that is causing it, but it is most likely not specific to Slicer (but a Qt and/or VTK issue, so you may find hints online about what causes it and how to resolve)

Yes, it might be OpenGL/VTK related. I searched around and couldn't resolve it.
Is there anyway to know that how the official release for linux is built? Preliminarily such as which OS and python env, building options, etc, that will be very helpful.
The binary that I tried without error is 'Slicer-5.4.0-linux-amd64.tar.gz' and this is the console output:

Slicer-5.4.0-linux-amd64$ ./Slicer 
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Switch to module:  "Welcome"

Some references:
https://discourse.vtk.org/t/glew-could-not-be-initialized-missing-gl-version-vtk-under-python-windows/4598/13

Does Slicer run fine?

Yes, it can be launched successfully. I am a starter and triedload a DICOM file so far.
I downloaded a release binary and run it via command line and didn't get any message in console.
I am not sure if there is something different comparing to the run the binary directly.

@weiyshay
Copy link
Author

btw, anyway to rebuild slicer without redownloading all the dependent libraries? I am switching to 5.4 and rebuild a version.

I tried deleting CMakeCache.txt and CMakefiles, 'cmake -DCMAKE_BUILD_TYPE:STRING=Debug --fresh', either not working.

@weiyshay
Copy link
Author

Log on a rebuild on 5.4 with system-ssl and it seems a bit different or less warnings/errors.
Any idea on how to debug?

#Slicer-build/Slicer
QSocketNotifier: Can only be used with threads started with QThread
Switch to module:  "Welcome"
Wayland does not support QWindow::requestActivate()
GLEW could not be initialized: Unknown error

@xaprier
Copy link

xaprier commented Nov 27, 2023

can you try this command and retry it?

export XDG_SESSION_TYPE=""
export QT_QPA_PLATFORM="xcb"

With that command you unset parameter from Wayland, then try to execute Slicer from the terminal where you execute command above.

@luzpaz
Copy link
Contributor

luzpaz commented Jan 26, 2024

@weiyshay 👆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working correctly
Development

No branches or pull requests

4 participants