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

Cannot initialize GLFW3 #46

Open
pwh124 opened this issue Aug 6, 2024 · 11 comments
Open

Cannot initialize GLFW3 #46

pwh124 opened this issue Aug 6, 2024 · 11 comments

Comments

@pwh124
Copy link

pwh124 commented Aug 6, 2024

Describe the bug
A clear and concise description of what the bug is.

When trying to run gw, GLFW3 cannot be initialized.

To Reproduce
Steps to reproduce the behavior:

Installation

mamba create -n gw
mamba activate gw
mamba install -c bioconda -c conda-forge gw

Running

gw
# then entered 0 for ce11 genome

Expected behavior
A clear and concise description of what you expected to happen.

gw runs

Screenshots
If applicable, add screenshots to help explain your problem.

Screen Shot 2024-08-06 at 10 45 07 AM

System (please complete the following information):

  • GW version: 1.0.1
  • OS: Ubuntu 22.04

Additional context
Add any other context about the problem here.

Two other people in my lab can run this (installed from conda) on the same remote server

@kcleal
Copy link
Owner

kcleal commented Aug 6, 2024

Hi @pwh124,
The conda recipie has just been updated, would you mind trying the install again just to double check if the latest change has resolved it? Also, Ive noticed that the order of conda channels can sometimes resolve install issues:

mamba install -c condo-forge -c bioconda gw

The previous conda recipe was not including the "core dependency tree" libraries, so for minimal installations (miniforge) this lead to missing libraries. I have updated the recipe, but I have not had a chance to test it yet.

Alternatively, if the conda package is not yet fixed, building from source should work:

mamba install -c conda-forge -c bioconda htslib glfw
git clone https://github.com/kcleal/gw && cd gw
make prep
CONDA_PREFIX=/pathTo/mamba make -j4

@kcleal
Copy link
Owner

kcleal commented Aug 21, 2024

Hi @pwh124,
I believe v1.0.2 fixes this issue. Let me know if this is not the case and I will re-open!

@kcleal kcleal closed this as completed Aug 21, 2024
@kcleal kcleal reopened this Aug 21, 2024
@pwh124
Copy link
Author

pwh124 commented Aug 22, 2024

Apologies for not checking up on this sooner.

I have reinstalled gw v1.0.2 on a fresh server in a fresh mamba environment.

I receive the same error:

GLFW Error: Failed to detect any supported platform
ERROR: could not initialize GLFW3
terminate called without an active exception
Aborted (core dumped)

@kcleal
Copy link
Owner

kcleal commented Aug 22, 2024

OK thanks @pwh124.

I will add some more debugging code to try and help resolve this. Thanks for your patience

@pwh124
Copy link
Author

pwh124 commented Aug 22, 2024

No worries! Happy to try to help run stuff to see if it works.

@kcleal
Copy link
Owner

kcleal commented Aug 29, 2024

Hi @pwh124,
v1.0.3 has been released might help debug the issue. Ive added some details in issue #38

Your issue is slightly different though and occurs when creating a window. GLFW3 library indicates that it cannot detect any supported platform. I suspect this is because the correct X11 lib cannot be found, or perhaps you may be running a Wayland session?

Happy to provide more details if needs be.

@kcleal
Copy link
Owner

kcleal commented Jan 27, 2025

Hi @pwh124,
There have been some changes to window management for gw recently, so I'm hoping this issue might be resolved in v1.1.2....

@pwh124
Copy link
Author

pwh124 commented Mar 13, 2025

Hi @kcleal,

Sorry for leaving this for a bit, but I had a use case i thought gw would be helpful with so I thought I'd try.

I installed using conda as recommended (v1.1.4) and just tried to run gw hg38

❯ gw hg38
                                                                                                                                               
█▀▀ █ █ █                                                                                                                                      
█▄█ ▀▄▀▄▀ v1.1.4                                                                                                                               
GLFW Error: Failed to detect any supported platform                                                                                            
Error: could not initialize GLFW3                                                                                                              
terminate called without an active exception                                                                                                   
Aborted (core dumped)  

This has to be something very specific to our set up, but this was in a fresh conda env.

Paul

@kcleal
Copy link
Owner

kcleal commented Mar 13, 2025

Hi @pwh124,
Thanks for trying again, it is always useful to get feedback. Is this using the same issue using the Ubuntu server you mentioned before, and if so are you ssh'ing to the server from a Mac/Linux machine using X11 forwarding?

GLFW seems to run into issues quite frequently when using remote connections using ssh X forwarding. It usually happens between Linux-MacOS connections.

Another way to get GW to work over remote connections is to mount your remote data on your local machine using sshfs. There are some details in the documentation https://kcleal.github.io/gw/docs/guide/Remote.html, but basically allows GW to load data as though it is on your local machine and seems to work really well if you are able to set it up.

If you are just using local data then the GLFW error is usually caused by outdated graphics drivers.

@pwh124
Copy link
Author

pwh124 commented Mar 13, 2025

No problem... yes, its the same as before ssh'ing onto a remote server running Ubuntu (from a Mac).

I will take a look at the remote set up! Thanks!

@kcleal
Copy link
Owner

kcleal commented Mar 13, 2025

If you are able to install the gw Debian package on your server, it may have more chance of working over X forwarding. The sshfs solution will actually give you much better rendering performance though. X11 forwarding is really slow!

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