-
Notifications
You must be signed in to change notification settings - Fork 47
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
Suggestion: Homebrew formula for gtk3 (now GTK4) installation on macOS (or Linux) #33
Comments
Hi YoshitakaMo, I just saw this. Usually the way to communicate with me is via email or the Coot mailing list. However, I see that Github is increasingly being use to communicate with me and I should read it more often. Now, I think I have fixed the error draw_central_cube() bug. I think it is due to an Apple bug. I used a function that shouldn't produce but error does so. It seems to me that your framebuffer is taking up one quarter of the GL widget (by width). I don't know why that should be. You could investigate by looking at the size of GL widget in on_glarea_resize() and changing framebuffer_scale. Paul. |
Hi Paul, I'm sorry to neglect the reply for a long time. I made an updated formula on https://gist.github.com/YoshitakaMo/d07056febca81fc2ca73c6f379fce4b0, and installed the Gtk3-Coot on Intel Mac (NOT M1 Mac) with the formula on this Jan 5 https://twitter.com/Ag_smith/status/1478567242749325314 . But today the installation failed on its Here is the installation step using my Homebrew formulae.
Here, to get the coot.rb formula to work perfectly, I'd like to know that which build procedure is the best way to install. I'm reading https://github.com/pemsley/coot/blob/refinement/build-it now, but is it the best one? Or, it would be helpful if you could write the command to build it directly here. I also found another potential obstacles to install Gtk3-Coot on any platform. |
Ah, I accidentally tried to build from the 'refinement' branch, not 'gtk3'. Now I've fixed the After the installation, boot Coot using this command Thanks to the Coot community, libccp4 was successfully built on M1 Mac ( brewsci/homebrew-bio#1450 ). I updated the Formula of libccp4. However, installation of Coot on M1 Mac has not been tested yet because [email protected] cannot be installed properly on it... |
Congratulations. To test that the refinement works, click on the blue circle/sphere on the right and then click on 2 residues. You should be able to pull atoms around and see geometry "health bars" move.
Where is the path not correct? Most of the coot.in/coot script is to try to handle installation in an arbitrary directory - you don't need that so just use a "one-liner" to exec $libexec_prefix/coot-bin |
@YoshitakaMo Many thanks for the update. Finally I managed to install COOT, but the window looked like yours in the first post. Here is my installation note which may be my environment specific. I am using macOS Catalina 10.15.7. I followed your instruction: # download Formula of [email protected] and [email protected] first
brew install wget
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost%401.74.rb
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost-python3%401.74.rb
# install them
brew install ./[email protected] --verbose
brew install ./[email protected] --verbose Then an error occurred:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb looked like def install
args = ["--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--enable-static",
"--disable-glibtest",
"--enable-introspection=yes",
<<<<<<< Updated upstream
"--with-gdktarget=#{backend}",
"--disable-visibility"]
=======
#"--with-gdktarget=quartz",
#"--disable-visibility"
"--with-gdktarget=x11",
"--enable-x11-backend"
]
>>>>>>> Stashed changes So I ran following command brew unlink boost-python3
brew link --overwrite [email protected]
brew update-reset and finally # install coot
wget https://gist.githubusercontent.com/YoshitakaMo/d07056febca81fc2ca73c6f379fce4b0/raw/6b6838c9aa5790b963327e8482101c8153687b41/coot.rb
brew install ./coot.rb --verbose --HEAD --debug --keep-tmp with success. As @YoshitakaMo mentioned, if [ $systype = Darwinx ] ; then
COOT_PREFIX="$(cd "$(dirname "$current_exe_dir")" 2>/dev/null && pwd)"
else
unlinked_exe=$(readlink -f $0)
unlinked_exe_dir=$(dirname $unlinked_exe)
COOT_PREFIX=$(dirname $unlinked_exe_dir)
fi to unlinked_exe=$(readlink -f $0)
unlinked_exe_dir=$(dirname $unlinked_exe)
COOT_PREFIX=$(dirname $unlinked_exe_dir) but then following error occurred:
I was able to start COOT from |
Indeed! I was wondering how @YoshitakaMo made that work because I don't think that I have pushed the fix yet. |
So you have fixed it but not yet pushed? |
It was not pushed because it was not coded up with on-Mac-only test. I intend to make an update shortly - but it might be more complicated than I hope. |
I have pushed a simple-minded fix for the widget size vs framebuffer size problem (by by-passing the AO framebuffer). But it is not the same one that @YoshitakaMo has used because you can see in the twitter video that his version still uses the AO framebuffer. |
I upgraded COOT to 050e7dd (not knowing if this is the right way)
and it worked so nicely! |
Hmm.. Please use the argument |
What is this option for? |
With |
So is it an option of |
It's an argument to coot - sorry that that was not clear. |
OK thanks. The appearance has changed a bit, but the resizing problem remains the same. |
Yep, I can confirm that the resizing problem remains on macOS Coot 1.0 (commit e55c6b9) Screen.Recording.2022-04-01.at.18.19.47.squish.mp4I hope this video helps you identify where the issue might be in the code? |
I'm happy to hear that Coot 1 has been released. However, this Homebrew Formula was developed before the release and I haven't tested yet for the latest version. The window-resize issue on macOS is a known bug, but I've not found the solution yet. |
Hi Blake, can you try a couple of things for me? What happens when you are "Plain" render mode? (Edit → Shader Preferences) and try to resize? Try turning on the FPS meter (under Draw menu). Thanks. |
The problem is in In "Plain" render mode it seems that |
More pixels, more time to draw a frame. Here's another video (so you can check out the FPS meter): |
Resize issue: On my Mac Book Pro Retina, the scale factor is 1. After the graphics is messed up, I can recover by clicking the top part of the window where you would have menus (even if the menu is invisible in the screwed up window). |
Hi, I'm aware there may be a lot of people waiting for a one-liner installation using Homebrew.
I guess the |
Curious that blake-riley didn't have the same problem: |
@huwjenkins, Thanks! Patches of https://sources.debian.org/patches/fftw/2.1.5-6/ (especially "05_ac_define_syntax.diff") and |
Sorry for not mentioning it. I threw in
to clipper4coot.rb (ahead of the |
FWIW I was also able to drop the |
Hi All Im just documenting here what I wrote on Twitter: https://twitter.com/klausenhauser/status/1510655605115179010?s=20&t=KOufKUDc17tJGqIkQXZvzQ I am on a Macbook Pro, Intel, running Big Sur 12.3.1. I am for sure not an expert in any of this, but I could make out most of what I see on here. I followed @YoshitakaMo original commands
Everything up to the final brew install for coot was completely A-OK for me. During COOT installation I ran into an error in which I ignored. After the ignore, everything seemed to be successful but under I tried to
|
@Species10C: there is a race condition in |
@pemsley Yes, you are right that Coot is using a software renderer instead of the native GPU. This is very curious since Pymol installed by linuxbrew also uses llvmpipe.
However, ChimeraX installed form .deb file uses the native NVIDIA renderer.
And
I wonder if this has something to do with the linuxbrew installation process. I will try to compile Coot directly from the source code and see if it will make a difference. |
@pemsley I am having trouble compiling coot 1.1.0.9 from source code on Ubuntu #126 (comment). |
I've created wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/coot%401.1.09.rb
brew install ./[email protected] --verbose (--HEAD) This formula executes the installation of Coot 1.1.09 and the latest commit version if @pemsley About your comment #33 (comment),
I removed Finally, I'm happy to announce that the CI for brewsci/bio has been fully restored, so I am on track to register Coot there. Once the above issues are resolved, distribution and maintenance of Homebrew's Coot will be much easier. |
In my Ubuntu 22.04 environment, I couldn't launch Coot 1.1.08 and 1.1.09 after installation using Homebrew: $ coot
libEGL warning: DRI2: failed to authenticate
INFO:: built with GTK 4.14.4
pdd /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot
There are 143 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/a/ALA.cif
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/a/ASP.cif
...
...
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/d/DT.cif
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/h/HOH.cif
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/n/NA.cif
(Coot:597509): Gtk-WARNING **: 16:32:11.857: No IM module matching GTK_IM_MODULE=ibus found
(Coot:597509): GLib-GIO-ERROR **: 16:32:11.971: Settings schema 'org.gtk.gtk4.Settings.FileChooser' does not contain a key named 'view-type'
Stack trace (most recent call last):
#29 Object "", at 0xffffffffffffffff, in
#28 Object "/home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/libexec/Coot", at 0x64474ef9a224, in _start
#27 Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7d467f029e3f]
#26 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7d467f029d8f]
#25 Object "/home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/libexec/Coot", at 0x64474ef9991c, in main
#24 Object "/home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/libexec/Coot", at 0x64474efb8f3b, in new_startup(int, char**) It should have worked fine before... |
@YoshitakaMo I had the same problem on Ubuntu 22.04.
I solved this problem by adding |
@jianghaizhu Thanks for writing about the solution. This worked in my environment! Also, I've found the cause of the non-executable coot issue!! The @pemsley Could you incorporate these two lines into P.S. @pemsley, I've found two monomer library files in your server. Which one is preferred?
|
@YoshitakaMo I am glad this helped. How is your FPS in Coot on Ubuntu 22.04? Mine is very low since Coot won't use the native GPU. |
@jianghaizhu In my environment, Coot uses llvmpipe as a renderer, though I have a GPU of RTX3090 in this Linux PC. $ coot
libEGL warning: DRI2: failed to authenticate
INFO:: built with GTK 4.14.4
pdd /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot
There are 143 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /home/linuxbrew/.linuxbrew/Cellar/coot/1.1.09/share/coot/lib/data/monomers/a/ALA.cif
...
...
INFO:: GL Version: 4.5 (Core Profile) Mesa 24.1.3
INFO:: GL Shading Language Version: 4.50
INFO:: GL Renderer: llvmpipe (LLVM 18.1.8, 256 bits)
INFO:: GL Vendor: Mesa
Shader compile meshes-with-shadows.shader success
Shader compile meshes-for-shadow-map.shader success
Shader compile instanced-meshes-for-shadow-map.shader success However, I think this is normal behavior. The software packages built with Homebrew do not use any third-party drivers such as Nvidia or CUDA. The reason why the PyMOL installed with Homebrew uses llvmpipe is probably the same. Since I am only interested in establishing a way to install coot with Homebrew, I hope that someone else will solve the problem. |
Wow! What a lot to catch up on!
Agh! Edit: OK, the shebang fix has been pushed. |
This is what it says for me, for the record
|
I see - sorry for the confusion. Let's make that happen soon. |
@jianghaizhu I am sorry that I cannot be helpful - I don't have the same hardware. |
@pemsley I first tried installing Coot using Homebrew on Ubuntu 22.04. Once installed, it was barely usable due to the software rendering. Now, I am trying to compile Coot directly from the source code using the |
I'm excited to announce that Coot 1.1.09 has been merged into brewsci/bio ! You can now install the latest Coot with When a new version of Coot is released in the future, please submit a new formula by following the instructions at https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request. |
Crikey! Yay! Woot! 🎉🎉🎉 |
This is great @YoshitakaMo & @pemsley!! Is there an easy way to run the homebrew Coot 1.x version alongside an existing 0.9x install? I want to have Coot 1 available to test and learn, but will still need 0.9x for a while, so it would be good to have both running side by side |
@olibclarke If your Coot 0.9x is not installed using Homebrew, the two can coexist. Homebrew's Coot 1 will be installed in |
Thanks - I have coot installed with CCP4, & the homebrew version was overriding it - to fix it I just added an alias at the end of my
|
My Homebrew installation is non-standard. Due to institutional policy, I can only install Homebrew under my home directory. However, I could still install Coot 1.1.0.9 on my M2 MacBook Pro with Ventura 13.6.7 using
Here is the console output from Coot.
|
@YoshitakaMo (and interested others) I have released Coot 1.1.10 https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/releases/coot-1.1.10.tar.gz |
There was a macOS 14 update (either .1 or .2) that made this go away for me.
This is common/expected/routine on macOS (I don't understand why).
I don't understand what is going on here - frustrating. |
Is it expected that left click doesn't do anything on MacOS? I can only zoom in with pinching on track pad or keyboard shortcut. |
@rpiwowarczyk If you don't have a mouse
|
Coot 1.1.10 is available in Homebrew. I'd like to thank @huwjenkins for helping to improve the Homebrew Formula. |
@pemsley I upgraded to macOS 14.6.1, and all these are fixed.
Rama plot still froze Coot for me. Is there a way to let Coot print out more information for debugging? |
@pemsley Can we redefine the mouse functions? Say, make it work the same way as Coot 0.9. |
100% please please bring back coot 0.9 controls for picking, slabbing & rotation |
Yes... sort of, anyway. |
@LucreziaCatapano recently returned from a meeting where there were requests for the old key-bindings. The new key-binding mechanism is flexible enough to allow this. |
@pemsley Thanks! This made both left- and right-mouse click for view rotating. Muscle memory is hard to overcome :)
Could we define the functions for left-, middle-, right-mouse click and click-and-hold, and wheel scroll in coot_preferences.py? |
Dear Paul,
I am a researcher in the field of bioinformatics, specifically structural biology.
I'm interested in the Coot software and want to use it. For my own interest and for the convenience of other macOS users, I have created a Homebrew formula to install Coot-gtk3 from the source code by referring to
build-3-3
autobuild script in the gtk3 branch.To start the installation of Coot-Gtk3 on a macOS with Homebrew, run the following command on the terminal app:
July 17, 2024, Now Coot can be installed from brewsci/homebrew-bio!
(May 14, 2024, Update the installation command. I provide coot bottles for macOS sonoma and Linux users)
(May 9, 2023, Update: Coot gtk3 now requires gtk 3.24.34, not the latest version. To use and pin it, see #33 (comment))
I would like to thank @wgscott and @keitaroyam for their support in creating this Formula. I would like to complete this Homebrew Formula for Coot so that Coot users can easily get access to the latest functions.
The text was updated successfully, but these errors were encountered: