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

Creating flatpak package #161

Open
eunos-1128 opened this issue Oct 4, 2024 · 143 comments
Open

Creating flatpak package #161

eunos-1128 opened this issue Oct 4, 2024 · 143 comments

Comments

@eunos-1128
Copy link
Contributor

eunos-1128 commented Oct 4, 2024

Hello,

Thank you very much for your wonderful software.

I thought that if coot could be used with modern GUI app runtimes such as Flatpak or Snap, many people would be able to easily install without building from source.

Since, I have created a Flatpak manifest for Coot 1.1 (GTK4-based) (not yet complete though). I have also confirmed that it works on my local PC.

If I can get permission, I would like to register the package to Flathub so that many people can access this app.

Regards,

@pemsley
Copy link
Owner

pemsley commented Oct 7, 2024

Great news! This was on my todo list.
Nice to see guile, dwarf and coordgen on the dependencies.
You can drop raster3d if needed - that is a "nice to have" not vital. I haven't tested it in Coot 1.
You have my permission.
And thanks!

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 7, 2024

@pemsley

Thanks for your approval.

I have a question on different coot sources.

Each of Release-1.1.10 source in git repo and Release-1.1.10 one in the homepage has different md5 checksum.

Should I use which source to build the flatpak package?

@pemsley
Copy link
Owner

pemsley commented Oct 7, 2024

The one on lmb-mrc web site. The other (from github) contains a lot of extra devel stuff.

However, I notice that there the effects.shader and instanced-meshes-for-shadow-map.shader have lost the copyright notice. I should investigate that. I don't think it will be problematic for you.

Note that 1.1.11 is on the horizon (i.e. 2 to 8 weeks away).

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 8, 2024

I submitted PR to flathub as I confirmed the package built locally using the manifest I made worked.

flathub/flathub#5690

Coot v1.1.10 will be available on Flathub after review.

@pemsley
Could you check if it lacks any dependent packages and make sure that the overall build configuration is OK?
(I added some packages after you checked first.)

@pemsley
Copy link
Owner

pemsley commented Oct 8, 2024

Coot is for macromolecular model building, model completion and validation, particularly suitable for protein modelling using X-ray data

Add "and cryo-EM reconstructions"

Let's talk about the domain id. I don't have a web server for the domain id. I understand that I should have. Is that your understanding too? I am OK with buying one.

@eunos-1128
Copy link
Contributor Author

I think the ID is merely for namespace purposes.

Therefore, there is no need to purchase a web server. The domain name and ID are solely for identification, and there is no need to actually buy a domain or set up a server to publish an app on Flathub.

@pemsley
Copy link
Owner

pemsley commented Oct 8, 2024

Remove - --with-enhanced-ligand-tools for version 1.1.11 and later (current HEAD doesn't use it - it is now not an option).

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 9, 2024

Remove - --with-enhanced-ligand-tools for version 1.1.11 and later (current HEAD doesn't use it - it is now not an option).

OK, we will remove it when bumping to version 1.1.11.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 11, 2024

@pemsley

Which icon file should I use for coot desktop app that appear in the menubar/launcher?

I've chosen pixmaps/icons/hicolor_apps_scalable_coot.svg but there seems some files representing Coot icon.

However, coot.desktop define default icon file as coot.png. Thie means I should use coot.png?

@pemsley
Copy link
Owner

pemsley commented Oct 11, 2024

I think I need to do a better job at properly comprehending the coordgen configuration of the rdkit, so that the correct libraries are linked.

@pemsley
Copy link
Owner

pemsley commented Oct 11, 2024

pixmaps/icons/hicolor_apps_scalable_coot.svg

This one. But it doesn't have the ATP. I should if see if the ATP version can be used.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 11, 2024

I think ATP version is better, too.

It makes clear this app is related to Chemistry/Biology.

@eunos-1128
Copy link
Contributor Author

This file depicts a coot holding a ATP altough the format is png.

https://github.com/pemsley/coot/blob/main/pixmaps/coot-icon.png

@pemsley
Copy link
Owner

pemsley commented Oct 14, 2024

I see that you've been making progress.
There seems to be a lot of changes/edits that I don't understand.
If you need me to do something, let me know.

@pemsley
Copy link
Owner

pemsley commented Oct 15, 2024

Is flapak for non-gui apps? How about Servalcat?
https://servalcat.readthedocs.io/en/latest/
Coot can work together with Servalcat. Servalcat is based on Python and GEMMI (as is Coot, as you know).

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 15, 2024

As far as I know, Flatpak is mainly for packaging GUI apps, but I believe CLI apps can be used as a part of the packaged app.

I think you can use servalcat as a module in a Coot package using Flatpak, and use it as a CLI command, too.

The servalcat executable binary should be placed in /app/bin/, which is included PATH by default in Flatpak sandbox environment.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 22, 2024

@pemsley
As you may know, it seems that the PR I submitted to Flathub has been merged.
In order to display the authentication badge on the Coot page on Flathub, it seems that you need to signin the following Flathub site page with your Github account.

https://flathub.org/apps/manage/io.github.pemsley.coot
image

Could you do this when you have time?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 22, 2024

Coot is now available on Flathub!

https://flathub.org/apps/io.github.pemsley.coot

@pemsley
Copy link
Owner

pemsley commented Oct 22, 2024

Could you do this when you have time?

I logged into flathub.org via github, but I can't see the page, haha

Whoops!

You are unauthorized to view this content.
You might want to retry or go back home.

@jianghaizhu
Copy link

This is excellent news. Thank you for your work. @eunos-1128

After the installation in Ubuntu 24.04, I ran flatpak run io.github.pemsley.coot and got the following error.

OOPS:: real_path_for_coot_executable is empty
OOPS:: real_path_for_coot_executable is empty
Failed to open /app/share/coot/share/coot/data/metal/metal-O-distance.table
OOPS:: real_path_for_coot_executable is empty
Failed to open /app/share/coot/share/coot/data/metal/metal-N-distance.table
OOPS:: real_path_for_coot_executable is empty
Failed to open /app/share/coot/share/coot/data/metal/metal-S-distance.table
INFO:: built with GTK 4.16.2
here with p_2 /app
pdd /app/share/coot
here with p_2 /app
here with p_2 /app
here with p_2 /app
here with p_2 /app
INFO:: Using Standard CCP4 Refmac dictionary from CLIBD_MON: /home/zhuj6/ccp4-9/lib/data/monomers/
There are 243 data in /home/zhuj6/ccp4-9/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ALA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLY.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PHE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HIS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/i/ILE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LEU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MET.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MSE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PRO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ARG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SER.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/THR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/v/VAL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TRP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TYR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GOL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CIT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/e/EDO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/A.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/C.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/G.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/u/U.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DC.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HOH.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/n/NA.cif
here with p_2 /app
here with p_2 /app
here with p_2 /app
here with p_2 /app
debug:: in setup_python()    pydirectory is /app/share/coot/lib/python3.12/site-packages
debug:: in setup_python() pkgpydirectory is /app/share/coot/lib/python3.12/site-packages/coot
###################################################### init_coot_as_python_module()
here with p_2 /app
here with p_2 /app
here with p_2 /app
here with p_2 /app
here with p_2 /app
INFO:: Using Standard CCP4 Refmac dictionary from CLIBD_MON: /home/zhuj6/ccp4-9/lib/data/monomers/
There are 243 data in /home/zhuj6/ccp4-9/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ALA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLY.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PHE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HIS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/i/ILE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LEU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MET.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MSE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PRO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ARG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SER.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/THR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/v/VAL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TRP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TYR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GOL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CIT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/e/EDO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/A.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/C.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/G.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/u/U.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DC.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HOH.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/n/NA.cif
here with p_2 /app
here with p_2 /app
ERROR:: add_python_scripting_entry_completion() coot_utils import failure
ModuleNotFoundError: No module named 'coot_utils'
here with p_2 /app

Coot launched with the error Unable to create a GL context.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 25, 2024

@jianghaizhu

Are you using NVIDIA GPUs?

if so, try flatpak install org.freedesktop.Platform.GL.nvidia and then start Coot.

@jianghaizhu
Copy link

@eunos-1128 Yes, I am using Nvidia GPUs. I already have Nvidia driver 550-107-02 installed in flatpak.

flatpak list --all
Name                                              Application ID                                                  Version             Branch                 Installation
Coot                                              io.github.pemsley.coot                                          1.1.10              stable                 system
Mesa                                              org.freedesktop.Platform.GL.default                             24.2.5              23.08                  system
Mesa (Extra)                                      org.freedesktop.Platform.GL.default                             24.2.5              23.08-extra            system
Mesa                                              org.freedesktop.Platform.GL.default                             24.2.5              24.08                  system
Mesa (Extra)                                      org.freedesktop.Platform.GL.default                             24.2.5              24.08extra             system
nvidia-550-107-02                                 org.freedesktop.Platform.GL.nvidia-550-107-02                                       1.4                    system
openh264                                          org.freedesktop.Platform.openh264                               2.1.0               2.2.0                  system
openh264                                          org.freedesktop.Platform.openh264                               2.4.1               2.4.1                  system

I have uninstalled and reinstalled nvidia-550-107-02 in flatpak and still got the same errors.

ERROR:: add_python_scripting_entry_completion() coot_utils import failure
ModuleNotFoundError: No module named 'coot_utils'

and

Unable to create a GL context

The PyMOL from flatpak utilized Nvidia GPUs just fine, so I don't think there are any problems with the flatpak Nvidia driver.

@eunos-1128
Copy link
Contributor Author

@jianghaizhu

I made a change to the Flatpak manifest and rebuilt coot.

Could you reinstall coot and test it again?

@jianghaizhu
Copy link

@eunos-1128 Thanks! I just uninstalled and reinstalled Coot in flatpak and still got the same errors.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 25, 2024

@eunos-1128 Yes, I am using Nvidia GPUs. I already have Nvidia driver 550-107-02 installed in flatpak.

flatpak list --all
Name                                              Application ID                                                  Version             Branch                 Installation
Coot                                              io.github.pemsley.coot                                          1.1.10              stable                 system
Mesa                                              org.freedesktop.Platform.GL.default                             24.2.5              23.08                  system
Mesa (Extra)                                      org.freedesktop.Platform.GL.default                             24.2.5              23.08-extra            system
Mesa                                              org.freedesktop.Platform.GL.default                             24.2.5              24.08                  system
Mesa (Extra)                                      org.freedesktop.Platform.GL.default                             24.2.5              24.08extra             system
nvidia-550-107-02                                 org.freedesktop.Platform.GL.nvidia-550-107-02                                       1.4                    system
openh264                                          org.freedesktop.Platform.openh264                               2.1.0               2.2.0                  system
openh264                                          org.freedesktop.Platform.openh264                               2.4.1               2.4.1                  system

I have uninstalled and reinstalled nvidia-550-107-02 in flatpak and still got the same errors.

ERROR:: add_python_scripting_entry_completion() coot_utils import failure
ModuleNotFoundError: No module named 'coot_utils'

and

Unable to create a GL context

The PyMOL from flatpak utilized Nvidia GPUs just fine, so I don't think there are any problems with the flatpak Nvidia driver.

@pemsley
This error is critical for the app?
Do you have any idea why the import failed?

ERROR:: add_python_scripting_entry_completion() coot_utils import failure
ModuleNotFoundError: No module named 'coot_utils'

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Oct 25, 2024

@jianghaizhu

It seems that this has not yet been reflected in the official Flathub build.

Could you try the test build with the following command after uninstalling coot?

flatpak install --user https://dl.flathub.org/build-repo/139895/io.github.pemsley.coot.flatpakref

@jianghaizhu
Copy link

@eunos-1128 Thanks!

I just tried the test build and got the same errors.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Nov 13, 2024

@pemsley

Maybe it's to do with XWayland? Maybe I should start the destop in X11 and not wayland - I don't know how to do that.

You can choose x11 or Wayland on login screen like this (this is for lightDM but you should be able to do so also on other display managers).

You might want to try logging in to your Arch Linux with X11 and verify whether XWayland causes some problems.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Nov 23, 2024

@pemsley

@pemsley

Maybe it's to do with XWayland? Maybe I should start the destop in X11 and not wayland - I don't know how to do that.

You can choose x11 or Wayland on login screen like this (this is for lightDM but you should be able to do so also on other display managers).

You might want to try logging in to your Arch Linux with X11 and verify whether XWayland causes some problems.

Did you try it?

@pemsley
Copy link
Owner

pemsley commented Dec 5, 2024

Yes... I did try it (at last).
And Coot looked/behaved just the same.
Frustrating.

@jianghaizhu
Copy link

@eunos-1128

Will you update the flatpak coot version to 1.1.11? Thanks!

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 1, 2025

@eunos-1128

Will you update the flatpak coot version to 1.1.11? Thanks!

@jianghaizhu

Sorry for delayed reply. Now I'm working on it.

After finishing to update Coot on flathub, I'll note here.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 1, 2025

@pemsley

Remove - --with-enhanced-ligand-tools for version 1.1.11 and later (current HEAD doesn't use it - it is now not an option).

Can I remove this option for building Release-1.1.11 though it still remains in build script for 1.1.11?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 2, 2025

@pemsley

https://github.com/pemsley/coot/blob/main/build-it-3-3#L3804-L3805

This issue of build failure due to not including numeric_cast.hpp seems to have been addressed in the latest version of RDKit.

rdkit/rdkit#7389

For Flatpak builds I don't see any problem with changing the RDKit version from Release_2023_09_4 to Release_2024_09_4, which is the latest version at the moment.

Can I get your opinion?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 3, 2025

@jianghaizhu (@pemsley)

I've updated Coot on flathub to 1.1.11.

In case one wants to use more recent version, commit 990078d is currently adapted to Beta build.

@jianghaizhu
Copy link

@eunos-1128 Thanks!

I encountered the old error. "Unable to create a GL context" in the display window.

flatpak run io.github.pemsley.coot
Failed to open /app/share/coot/share/coot/data/metal/metal-O-distance.table
Failed to open /app/share/coot/share/coot/data/metal/metal-N-distance.table
Failed to open /app/share/coot/share/coot/data/metal/metal-S-distance.table
Unrecognized value "gl-glx". Try GDK_DEBUG=help
INFO:: built with GTK 4.16.7

@pemsley
Copy link
Owner

pemsley commented Jan 3, 2025

@jianghaizhu
I get that error message too on Arch.
I think it is because of the Nvidia drivers.
Try launching coot with --opengl-es

And related to your above messages, I will see if I can find out what is going wrong with the metal distances.

@pemsley
Copy link
Owner

pemsley commented Jan 3, 2025

@eunos-1128,

This issue of build failure due to not including numeric_cast.hpp seems to have been addressed in the latest version of RDKit.

Hooray!

For Flatpak builds I don't see any problem with changing the RDKit version from Release_2023_09_4 to Release_2024_09_4, which is the latest version at the moment.

That seems like a good thing to do.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 4, 2025

@jianghaizhu

@jianghaizhu I get that error message too on Arch. I think it is because of the Nvidia drivers. Try launching coot with --opengl-es

And related to your above messages, I will see if I can find out what is going wrong with the metal distances.

Try these ones first.

flatpak run io.github.pemsley.coot --opengl-es
flatpak run io.github.pemsley.coot -- --opengl-es

In bumping to 1.1.11, it seemed that Python 3.12 was required, so I adopted GNOME Runtime 47, which ships with Python 3.12.8, instead of GNOME 46.
(Is my understanding correct that Python 3.12 is required for 1.1.11, @pemsley?)

With that, the version of gtk4 included in GNOME47 was also increased, and it seems that gl-glx can no longer be used for the value of GDK_DEBUG. (You can see it here.)

If the commands with --opengl-es do not work, please also try the following every command to check if it has the same effect as GDK_DEBUG=gl-glx.

1. flatpak run --env=GDK_DEBUG=opengl io.github.pemsley.coot
2. flatpak run --env=GDK_DEBUG=gl-prefer-gl io.github.pemsley.coot
3. flatpak run --env=GDK_DEBUG=glx io.github.pemsley.coot
4. flatpak run --env=GDK_BACKEND=x11 --env=GDK_DEBUG=opengl io.github.pemsley.coot
5. flatpak run --env=GDK_BACKEND=x11 --env=GDK_DEBUG=gl-prefer-gl io.github.pemsley.coot
6. flatpak run --env=GDK_BACKEND=x11 --env=GDK_DEBUG=glx io.github.pemsley.coot

Could you share each result of the commands here?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 4, 2025

@pemsley

Remove - --with-enhanced-ligand-tools for version 1.1.11 and later (current HEAD doesn't use it - it is now not an option).

Can I remove this option for building Release-1.1.11 though it still remains in build script for 1.1.11?

How about this? I've shipped 1.1.11 with --with-enhanced-ligand-tools. Is the option still needed?

@pemsley
Copy link
Owner

pemsley commented Jan 5, 2025

@eunos-1128,

How about this? I've shipped 1.1.11 with --with-enhanced-ligand-tools. Is the option still needed?

In 1.1.11, this option is no longer an option, it is now a non-optional dependency - because it was needed by the new ligand tools.

So, I think you should see a warning saying unknown option or some such, when you run configure.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 5, 2025

@pemsley

@eunos-1128,

How about this? I've shipped 1.1.11 with --with-enhanced-ligand-tools. Is the option still needed?

In 1.1.11, this option is no longer an option, it is now a non-optional dependency - because it was needed by the new ligand tools.

So, I think you should see a warning saying unknown option or some such, when you run configure.

OK, I will remove this option for running configure.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 5, 2025

@pemsley

Now you are invited to Coot flatpak repo for verifying Coot on Flathub.

flathub/flathub#5978

Please remember to complete the following procedures before the deadline, and after joining the repo try to login porovider verification with your GitHub account.

Added, make sure to enable 2FA for your github account and accept the invite within a week. @pemsley

@jianghaizhu
Copy link

@eunos-1128
flatpak run io.github.pemsley.coot --opengl-es worked.

flatpak run io.github.pemsley.coot -- --opengl-es didn't.

For your 6 commands, only 2 and 5 worked. The rest failed.

@jianghaizhu
Copy link

@eunos-1128 @pemsley

After I launched Coot 1.1.11 with flatpak run io.github.pemsley.coot --opengl-es , I got some errors shown below.

Failed to open /app/share/coot/share/coot/data/metal/metal-O-distance.table
Failed to open /app/share/coot/share/coot/data/metal/metal-N-distance.table
Failed to open /app/share/coot/share/coot/data/metal/metal-S-distance.table
Unrecognized value "gl-glx". Try GDK_DEBUG=help
INFO:: built with GTK 4.16.7
pdd /app/share/coot
debug:: in setup_python()    pydirectory is /app/share/coot/lib/python3.12/site-packages
debug:: in setup_python() pkgpydirectory is /app/share/coot/lib/python3.12/site-packages/coot
INFO:: Using Standard CCP4 Refmac dictionary from CLIBD_MON: /home/zhuj6/ccp4-9/lib/data/monomers/
There are 243 data in /home/zhuj6/ccp4-9/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ALA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ASN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLN.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLY.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GLU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PHE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HIS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/i/ILE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LYS.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/l/LEU.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MET.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/m/MSE.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PRO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/ARG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SER.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/THR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/v/VAL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TRP.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/t/TYR.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/p/PO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/s/SO4.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/GOL.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/CIT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/e/EDO.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/a/A.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/c/C.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/g/G.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/u/U.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DA.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DC.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DG.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/d/DT.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/h/HOH.cif
There are 2 data in /home/zhuj6/ccp4-9/lib/data/monomers/n/NA.cif
debug():: ============ get_atom_selection() with file "/app/share/coot/standard-residues.pdb" use_gemmi 0
INFO:: monitor 1 no description 
INFO:: monitor 1 connection HDMI-0
INFO:: monitor 1 refresh rate 59950 mHz
INFO:: monitor 1 scale_factor 1
INFO:: monitor 1 scale 1
INFO:: GL Version:                  OpenGL ES 3.2 NVIDIA 550.120
INFO:: GL Shading Language Version: OpenGL ES GLSL ES 3.20
INFO:: GL Renderer:                 NVIDIA GeForce RTX 3090/PCIe/SSE2
INFO:: GL Vendor:                   NVIDIA Corporation
Shader compile         meshes-with-shadows.shader success
Shader compile       meshes-for-shadow-map.shader success
Shader compile instanced-meshes-for-shadow-map.shader success
Shader compile             meshes-for-ssao.shader success
Shader compile   instanced-meshes-for-ssao.shader success
Shader compile     texture-meshes-for-ssao.shader success
Shader compile texture-meshes-with-shadows.shader success
Shader compile   texture-meshes-shadow-map.shader success
Shader compile              texture-meshes.shader success
Shader compile    shadow-map-image-texture.shader success
Shader compile             9.ssao_geometry.shader success
Shader compile                      9.ssao.shader success
Shader compile                 9.ssao_blur.shader success
Shader compile instanced-meshes-with-shadows.shader success
Shader compile   outline-of-active-residue.shader success
Shader compile                         map.shader success
Shader compile                draw-map-cap.shader success
Shader compile                       model.shader success
Shader compile                central-cube.shader success
Shader compile                central-cube.shader success
Shader compile                    hud-text.shader success
Shader compile                    hud-bars.shader success
Shader compile                  hud-labels.shader success
Shader compile           hud-image-texture.shader success
Shader compile                  atom-label.shader success
Shader compile        moleculestotriangles.shader success
Shader compile                       lines.shader success
Shader compile                 lines-pulse.shader success
Shader compile                  rama-balls.shader success
Shader compile                   particles.shader success
Shader compile           instanced-objects.shader success
Shader compile   extra-distance-restraints.shader success
Shader compile   hud-geometry-tooltip-text.shader success
Shader compile             residue-markers.shader success
Shader compile    residue-markers-for-ssao.shader success
Shader compile                 ligand-view.shader success
Shader compile               model-as-mesh.shader success
Shader compile        symmetry-atoms-lines.shader success
Shader compile                    hud-bars.shader success
Shader compile    rama-plot-axes-and-ticks.shader success
Shader compile   rama-plot-phi-psi-markers.shader success
Shader compile                   hud-lines.shader success
Shader compile            background-image.shader success
Shader compile                      meshes.shader success
Shader compile              texture-meshes.shader success
error:: Failed to compile Fragment shader: 0(67) : error C7531: global variable gl_FragDepth requires "#extension GL_NV_fragdepth : enable" before use

WARNING:: validation failed: effects.shader validation status 0
GL ERROR:: Shader::Use() "effects.shader" err 1282 for program_id 137
Shader compile                     effects.shader validation-failed
Shader compile                      blur-x.shader success
Shader compile                      blur-y.shader success
Shader compile              depth-of-field.shader success
Shader compile rotation-centre-cross-hairs-for-ssao.shader success
---- generate_framebuffer_object() post generate_depthtexture() SSAO-gBuffer-framebuffer err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "SSAO-gBuffer-framebuffer" width 500 height 500 is not complete
Framebuffer for SSAO GBuffer not complete!500 500
ERROR init_joey_ssao_stuff() end err is 1280
GL ERROR:: Mesh::setup_buffers() --- start --- 
ERROR:: failed to find preferences_bond_width_combobox 
ERROR:: failed to find preferences_font_size_combobox
DEBUG:: in set_clipping_front() now planes: front: 1 back: 1 eye-position vec3(0.000000, 0.000000, 95.000000)
WARNING:: Error reading 70S_MD57_BX_5.cif-coot-0.cif
WARNING:: No such molecule number 0
WARNING:: no molecule for imol = 0
WARNING:: atom with name "MG  " alt-loc "empty", res-no: 4248, ins-code "", chain: "A" not found in molecule 0
DEBUG:: --- new_startup_on_glarea_resize() 551 682
---- generate_framebuffer_object() post generate_depthtexture() screen err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "screen" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-x err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-x" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-y err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-y" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() combine err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "combine" width 551 height 682 is not complete
--- start framebuffer  init() err is 1280
---- generate_framebuffer_object() post generate_depthtexture()  err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-x err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-x" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-x" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-y err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-y" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-y" width 551 height 682 is not complete
---- generate_framebuffer_object() post generate_depthtexture() combine err is 1282
GL ERROR:: generate_framebuffer_object() E "combine" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "combine" width 551 height 682 is not complete
error draw_rotation_centre_crosshairs() A0 err 1280
DEBUG:: --- new_startup_on_glarea_resize() 892 961
---- generate_framebuffer_object() post generate_depthtexture() screen err is 1282
GL ERROR:: generate_framebuffer_object() E "screen" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "screen" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-x err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-x" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-x" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-y err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-y" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-y" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() combine err is 1282
GL ERROR:: generate_framebuffer_object() E "combine" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "combine" width 892 height 961 is not complete
--- start framebuffer  init() err is 1280
---- generate_framebuffer_object() post generate_depthtexture()  err is 1282
GL ERROR:: generate_framebuffer_object() E "" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-x err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-x" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-x" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() blur-y err is 1282
GL ERROR:: generate_framebuffer_object() E "blur-y" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "blur-y" width 892 height 961 is not complete
---- generate_framebuffer_object() post generate_depthtexture() combine err is 1282
GL ERROR:: generate_framebuffer_object() E "combine" err is 1282
xxxxxxx GL ERROR:: framebuffer::generate_framebuffer_object() FrameBuffer "combine" width 892 height 961 is not complete
error draw_rotation_centre_crosshairs() A0 err 1280

@pemsley
Copy link
Owner

pemsley commented Jan 6, 2025

flatpak run io.github.pemsley.coot -- --opengl-es didn't.

OK noted. Coot should handle --

@pemsley
Copy link
Owner

pemsley commented Jan 6, 2025

@jianghaizhu ... OK, but more importantly can you see things now?

The error messages that you see are the framebuffers failing to be setup correctly. I see messages like that myself. They are harmless in Basic mode. I will make a not to clean them up with --opengl-es.

@jianghaizhu
Copy link

@pemsley

It works fine so far with limited usage.

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 7, 2025

@pemsley

Now you are invited to Coot flatpak repo for verifying Coot on Flathub.

flathub/flathub#5978

Please remember to complete the following procedures before the deadline, and after joining the repo try to login porovider verification with your GitHub account.

Added, make sure to enable 2FA for your github account and accept the invite within a week. @pemsley

@pemsley Could you deal with this within the expiration date?

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 7, 2025

@jianghaizhu

Try this test build, in which the current stable build fault for NVIDIA OpenGL should be fixed.

flatpak install --user https://dl.flathub.org/build-repo/155614/io.github.pemsley.coot.flatpakref

I guess running even without --opengl-es would work.

And can you share the log on running?

@csteinmetzger
Copy link

I got the same GL context error as @jianghaizhu with an Nvidia GPU on Ubuntu 22.04. The test build suggested by @eunos-1128 works for me, even without --opengl-es

Coot opens with the following terminal output:

pdd /app/share/coot
debug:: in setup_python()    pydirectory is /app/lib/python3.12/site-packages
debug:: in setup_python() pkgpydirectory is /app/lib/python3.12/site-packages/coot
There are 243 data in /app/share/coot/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /app/share/coot/lib/data/monomers/a/ALA.cif
There are 2 data in /app/share/coot/lib/data/monomers/a/ASP.cif
There are 2 data in /app/share/coot/lib/data/monomers/a/ASN.cif
There are 2 data in /app/share/coot/lib/data/monomers/c/CYS.cif
There are 2 data in /app/share/coot/lib/data/monomers/g/GLN.cif
There are 2 data in /app/share/coot/lib/data/monomers/g/GLY.cif
There are 2 data in /app/share/coot/lib/data/monomers/g/GLU.cif
There are 2 data in /app/share/coot/lib/data/monomers/p/PHE.cif
There are 2 data in /app/share/coot/lib/data/monomers/h/HIS.cif
There are 2 data in /app/share/coot/lib/data/monomers/i/ILE.cif
There are 2 data in /app/share/coot/lib/data/monomers/l/LYS.cif
There are 2 data in /app/share/coot/lib/data/monomers/l/LEU.cif
There are 2 data in /app/share/coot/lib/data/monomers/m/MET.cif
There are 2 data in /app/share/coot/lib/data/monomers/m/MSE.cif
There are 2 data in /app/share/coot/lib/data/monomers/p/PRO.cif
There are 2 data in /app/share/coot/lib/data/monomers/a/ARG.cif
There are 2 data in /app/share/coot/lib/data/monomers/s/SER.cif
There are 2 data in /app/share/coot/lib/data/monomers/t/THR.cif
There are 2 data in /app/share/coot/lib/data/monomers/v/VAL.cif
There are 2 data in /app/share/coot/lib/data/monomers/t/TRP.cif
There are 2 data in /app/share/coot/lib/data/monomers/t/TYR.cif
There are 2 data in /app/share/coot/lib/data/monomers/p/PO4.cif
There are 2 data in /app/share/coot/lib/data/monomers/s/SO4.cif
There are 2 data in /app/share/coot/lib/data/monomers/g/GOL.cif
There are 2 data in /app/share/coot/lib/data/monomers/c/CIT.cif
There are 2 data in /app/share/coot/lib/data/monomers/e/EDO.cif
There are 2 data in /app/share/coot/lib/data/monomers/a/A.cif
There are 2 data in /app/share/coot/lib/data/monomers/c/C.cif
There are 2 data in /app/share/coot/lib/data/monomers/g/G.cif
There are 2 data in /app/share/coot/lib/data/monomers/u/U.cif
There are 2 data in /app/share/coot/lib/data/monomers/d/DA.cif
There are 2 data in /app/share/coot/lib/data/monomers/d/DC.cif
There are 2 data in /app/share/coot/lib/data/monomers/d/DG.cif
There are 2 data in /app/share/coot/lib/data/monomers/d/DT.cif
There are 2 data in /app/share/coot/lib/data/monomers/h/HOH.cif
There are 2 data in /app/share/coot/lib/data/monomers/n/NA.cif
debug():: ============ get_atom_selection() with file "/app/share/coot/standard-residues.pdb" use_gemmi 0
INFO:: monitor 1 no description 
INFO:: monitor 1 connection DP-2.8
INFO:: monitor 1 refresh rate 74970 mHz
INFO:: monitor 1 scale_factor 1
INFO:: monitor 1 scale 1
INFO:: monitor 2 no description 
INFO:: monitor 2 connection DP-4.8
INFO:: monitor 2 refresh rate 74970 mHz
INFO:: monitor 2 scale_factor 1
INFO:: monitor 2 scale 1
INFO:: GL Version:                  4.6.0 NVIDIA 550.127.08
INFO:: GL Shading Language Version: 4.60 NVIDIA
INFO:: GL Renderer:                 NVIDIA GeForce RTX 3080/PCIe/SSE2
INFO:: GL Vendor:                   NVIDIA Corporation
Shader compile         meshes-with-shadows.shader success
Shader compile       meshes-for-shadow-map.shader success
Shader compile instanced-meshes-for-shadow-map.shader success
Shader compile             meshes-for-ssao.shader success
Shader compile   instanced-meshes-for-ssao.shader success
Shader compile     texture-meshes-for-ssao.shader success
Shader compile texture-meshes-with-shadows.shader success
Shader compile   texture-meshes-shadow-map.shader success
Shader compile              texture-meshes.shader success
Shader compile    shadow-map-image-texture.shader success
Shader compile             9.ssao_geometry.shader success
Shader compile                      9.ssao.shader success
Shader compile                 9.ssao_blur.shader success
Shader compile instanced-meshes-with-shadows.shader success
Shader compile   outline-of-active-residue.shader success
Shader compile                         map.shader success
Shader compile                draw-map-cap.shader success
Shader compile                       model.shader success
Shader compile                central-cube.shader success
Shader compile                central-cube.shader success
Shader compile                    hud-text.shader success
Shader compile                    hud-bars.shader success
Shader compile                  hud-labels.shader success
Shader compile           hud-image-texture.shader success
Shader compile                  atom-label.shader success
Shader compile        moleculestotriangles.shader success
Shader compile                       lines.shader success
Shader compile                 lines-pulse.shader success
Shader compile                  rama-balls.shader success
Shader compile                   particles.shader success
Shader compile           instanced-objects.shader success
Shader compile   extra-distance-restraints.shader success
Shader compile   hud-geometry-tooltip-text.shader success
Shader compile             residue-markers.shader success
Shader compile    residue-markers-for-ssao.shader success
Shader compile                 ligand-view.shader success
Shader compile               model-as-mesh.shader success
Shader compile        symmetry-atoms-lines.shader success
Shader compile                    hud-bars.shader success
Shader compile    rama-plot-axes-and-ticks.shader success
Shader compile   rama-plot-phi-psi-markers.shader success
Shader compile                   hud-lines.shader success
Shader compile            background-image.shader success
Shader compile                      meshes.shader success
Shader compile              texture-meshes.shader success
Shader compile                     effects.shader success
Shader compile                      blur-x.shader success
Shader compile                      blur-y.shader success
Shader compile              depth-of-field.shader success
Shader compile rotation-centre-cross-hairs-for-ssao.shader success
GL ERROR:: Mesh::setup_buffers() --- start --- 
ERROR:: failed to find preferences_bond_width_combobox 
ERROR:: failed to find preferences_font_size_combobox
Coot Python Scripting GUI code found and loaded.
DEBUG:: in set_clipping_front() now planes: front: 2 back: 1 eye-position vec3(0.000000, 0.000000, 95.000000)
WARNING:: Error reading /usr/software/ccp4-9/coot_py3/share/coot/data/tutorial-modern.pdb
WARNING:: No such molecule number 0
WARNING:: Can't find file /usr/software/ccp4-9/coot_py3/share/coot/data/rnasa-1.8-all_refmac1.mtz
No maps available for the setting of colour
No maps available for the setting of contour
No maps available for the setting of contour step
WARNING:: Can't find file /usr/software/ccp4-9/coot_py3/share/coot/data/rnasa-1.8-all_refmac1.mtz
No maps available for the setting of colour
No maps available for the setting of contour
No maps available for the setting of contour step
WARNING:: no molecule for imol = 0
WARNING:: atom with name " CA " alt-loc "empty", res-no: 89, ins-code "", chain: "A" not found in molecule 0
DEBUG:: --- new_startup_on_glarea_resize() 2118 911

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 7, 2025

@csteinmetzger

Thank you for your cooperation!

@jianghaizhu

I've merged the fixed one, which will be available as the stable build about 5-6 hours later on flathub.

@pemsley
Copy link
Owner

pemsley commented Jan 7, 2025

@pemsley Could you deal with this within the expiration date?

OK, I checked out https://github.com/flathub/io.github.pemsley.coot

and followed the instructions. Coot starts up OK when I use --opengl-es
flatpak run io.github.pemsley.coot --opengl-es
but crashes when I try to refine the structure:
CalculateLoad Tutorial Model and Data
RefineRSR Sphere

app window keypressed! 65505 50
on_glarea_key_controller_key_pressed() keyval: 82
on_glarea_key_controller_key_pressed() control_is_pressed 0 shift_is_pressed 1
INFO:: key-binding for key: 82 : 0 Sphere Refine
INFO:: Reading rotamer probability tables...
/usr/include/c++/14.2.0/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = Instanced_Markup_Mesh_attrib_t; _Alloc = std::allocator<Instanced_Markup_Mesh_attrib_t>; const_reference = const Instanced_Markup_Mesh_attrib_t&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa522704, in gdk_surface_handle_event
#30   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaac2ec2, in g_signal_emit
#29   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaac2e00, in g_signal_emit_valist
#28   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaabc8f1, in signal_emit_valist_unlocked
#27   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaabb5c2, in signal_emit_unlocked_R.isra.0
#26   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaaa6919, in g_closure_invoke
#25   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa51e755, in gdk_surface_event_marshaller
#24   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa482e02, in _gdk_marshal_BOOLEAN__POINTER
#23   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa1eb4a2, in gtk_main_do_event
#22   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa1eaf19, in gtk_propagate_event_internal
#21   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa2da8d5, in gtk_widget_run_controllers
#20   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa171bdb, in gtk_event_controller_handle_event
#19   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa172ce8, in gtk_event_controller_key_handle_event
#18   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaac2ec2, in g_signal_emit
#17   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaac2e00, in g_signal_emit_valist
#16   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaabc3e2, in signal_emit_valist_unlocked
#15   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x7b4caaaa6b31, in _g_closure_invoke_va
#14   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x7b4caa0e3f4c, in _gtk_marshal_BOOLEAN__UINT_UINT_FLAGSv
#13   Object "/app/libexec/coot-1", at 0x58c0b40d7881, in on_glarea_key_controller_key_pressed(_GtkEventControllerKey*, unsigned int, unsigned int, unsigned int, _GtkButton*)
#12   Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab8b4fd2, in graphics_info_t::on_glarea_key_controller_key_pressed(_GtkEventControllerKey*, unsigned int, unsigned int, unsigned int)
#11   Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4caba2665e, in key_bindings_t::run() const
#10   Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab90777c, in 
#9    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cabbc36f2, in rsr_sphere_refine_plus()
#8    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab63bc17, in refine_residues_with_alt_conf(int, std::vector<coot::residue_spec_t, std::allocator<coot::residue_spec_t> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#7    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab9822da, in graphics_info_t::refine_residues_vec(int, std::vector<mmdb::Residue*, std::allocator<mmdb::Residue*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mmdb::Manager*)
#6    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab981e61, in graphics_info_t::generate_molecule_and_refine(int, std::vector<mmdb::Residue*, std::allocator<mmdb::Residue*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mmdb::Manager*, bool)
#5    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4cab8ebcd4, in graphics_info_t::make_moving_atoms_graphics_object(int, atom_selection_container_t const&, unsigned int, unsigned int)
#4    Object "/app/lib/libcootsumo.so.0.0.0", at 0x7b4caba24fde, in Instanced_Markup_Mesh::update_instancing_buffers(std::vector<Instanced_Markup_Mesh_attrib_t, std::allocator<Instanced_Markup_Mesh_attrib_t> > const&)
#3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x7b4ca90e8c1c, in std::__glibcxx_assert_fail(char const*, int, char const*, char const*)
#2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7b4ca8e29881, in abort
#1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7b4ca8e4208d, in raise
#0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7b4ca8e9adb4, in __pthread_kill_implementation
Aborted (Signal sent by tkill() 3 1000)
/app/bin/coot: line 7:     3 Aborted                 (core dumped) ${exec_prefix}/libexec/coot-1 "$@"

I have a core dump don't know how to use the debugger (I mean I don't know where the binary is).

Note that this part of the code is about as close as software gets to hardware, so the issue might actually be the graphics drivers and not coot.

@pemsley
Copy link
Owner

pemsley commented Jan 7, 2025

I logged into Flathub, but I get this message:

image

@csteinmetzger
Copy link

Like @pemsley I also see such a crash when trying to do a tandem refinement

INFO:: Reading rotamer probability tables...
/usr/include/c++/14.2.0/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = Instanced_Markup_Mesh_attrib_t; _Alloc = std::allocator<Instanced_Markup_Mesh_attrib_t>; const_reference = const Instanced_Markup_Mesh_attrib_t&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4c1bf, in signal_emit_valist_unlocked
#30   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f35b31, in _g_closure_invoke_va
#29   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f38de4, in g_cclosure_marshal_VOID__BOXEDv
#28   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x761b525a70a2, in gtk_gesture_click_end
#27   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51ec2, in g_signal_emit
#26   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51e00, in g_signal_emit_valist
#25   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4c1bf, in signal_emit_valist_unlocked
#24   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f35b31, in _g_closure_invoke_va
#23   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x761b524e69fb, in _gtk_marshal_VOID__INT_DOUBLE_DOUBLEv
#22   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51ec2, in g_signal_emit
#21   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51e00, in g_signal_emit_valist
#20   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4c070, in signal_emit_valist_unlocked
#19   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4a5c2, in signal_emit_unlocked_R.isra.0
#18   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f35919, in g_closure_invoke
#17   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x761b52775c67, in gtk_popover_item_activate
#16   Object "/usr/lib/x86_64-linux-gnu/libgtk-4.so.1.1600.7", at 0x761b52779a16, in gtk_menu_tracker_item_activated
#15   Object "/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.8200.2", at 0x761b523079d4, in g_simple_action_activate
#14   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51ec2, in g_signal_emit
#13   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f51e00, in g_signal_emit_valist
#12   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4c070, in signal_emit_valist_unlocked
#11   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f4a5c2, in signal_emit_unlocked_R.isra.0
#10   Object "/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.8200.2", at 0x761b52f35919, in g_closure_invoke
#9    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53fc95cc, in rsr_refine_tandem_3()
#8    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53a3bc17, in refine_residues_with_alt_conf(int, std::vector<coot::residue_spec_t, std::allocator<coot::residue_spec_t> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#7    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53d822da, in graphics_info_t::refine_residues_vec(int, std::vector<mmdb::Residue*, std::allocator<mmdb::Residue*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mmdb::Manager*)
#6    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53d81e61, in graphics_info_t::generate_molecule_and_refine(int, std::vector<mmdb::Residue*, std::allocator<mmdb::Residue*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mmdb::Manager*, bool)
#5    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53cebcd4, in graphics_info_t::make_moving_atoms_graphics_object(int, atom_selection_container_t const&, unsigned int, unsigned int)
#4    Object "/app/lib/libcootsumo.so.0.0.0", at 0x761b53e24fde, in Instanced_Markup_Mesh::update_instancing_buffers(std::vector<Instanced_Markup_Mesh_attrib_t, std::allocator<Instanced_Markup_Mesh_attrib_t> > const&)
#3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x761b514e8c1c, in std::__glibcxx_assert_fail(char const*, int, char const*, char const*)
#2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x761b51229881, in abort
#1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x761b5124208d, in raise
#0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x761b5129adb4, in __pthread_kill_implementation
Aborted (Signal sent by tkill() 3 1002)
/app/bin/coot: line 7:     3 Aborted                 (core dumped) ${exec_prefix}/libexec/coot-1 "$@"

@pemsley
Copy link
Owner

pemsley commented Jan 7, 2025

Update:

I have learned how to use the debugger in flatpak.

#9  0x00007b4ca90e8c1d in std::__glibcxx_assert_fail
    (file=file@entry=0x7b4cabc35b58 "/usr/include/c++/14.2.0/bits/stl_vector.h", line=line@entry=1149, function=function@entry=0x7b4cabc689f8 "std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = Instanced_Markup_Mesh_attrib_t; _Alloc = std::allocator<Instanced_Markup_Mesh_attrib_t>; con"..., condition=condition@entry=0x7b4cabc1f078 "__n < this->size()") at ../../../../../libstdc++-v3/src/c++11/assert_fail.cc:41
#10 0x00007b4caba24fdf in std::vector<Instanced_Markup_Mesh_attrib_t, std::allocator<Instanced_Markup_Mesh_attrib_t> >::operator[] (this=0x7fff6f6690e0, __n=0) at /usr/include/c++/14.2.0/bits/stl_vector.h:1147
#11 std::vector<Instanced_Markup_Mesh_attrib_t, std::allocator<Instanced_Markup_Mesh_attrib_t> >::operator[]
    (this=0x7fff6f6690e0, __n=0) at /usr/include/c++/14.2.0/bits/stl_vector.h:1147
#12 Instanced_Markup_Mesh::update_instancing_buffers
    (this=0x7b4cabd890c0 <graphics_info_t::rama_balls_mesh>, balls=std::vector of length 0, capacity 0)
    at Instanced-Markup-Mesh.cc:237
#13 0x00007b4cab8ebcd5 in graphics_info_t::make_moving_atoms_graphics_object
    (this=this@entry=0x7fff6f6695c0, imol=imol@entry=0, asc=..., do_rama_markup_in=do_rama_markup_in@entry=2, do_rota_markup_in=do_rota_markup_in@entry=2) at graphics-info.cc:2441
#14 0x00007b4cab981e62 in graphics_info_t::generate_molecule_and_refine

I have added protection to stop glBufferSubData() being called if balls is empty:
10f9720

@eunos-1128
Copy link
Contributor Author

eunos-1128 commented Jan 8, 2025

@pemsley

I logged into Flathub, but I get this message:

image

Have you taken the following steps?

make sure to enable 2FA for your github account and accept the invite within a week.

Could you tell me which commands you used to debug?

I have learned how to use the debugger in flatpak.

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

4 participants