cootをソースから作ってみる
https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/web/build-install-coot-from-scratch.htmlにあるように このスクリプトを使えば一応できるみたい.
っが一筋縄ではいかない...
cootのversion 0.9.x なら https://raw.githubusercontent.com/pemsley/coot/refinement/build-it
version 1.1.x なら https://raw.githubusercontent.com/pemsley/coot/main/build-it-3-3 の構築用スクリプトを使います
っでまずは version 0.9.x を構築してみた. OS構築時は「Server with GUI」を選んでいます
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.4 (Blue Onyx)
[root@rockylinux9 ~]#
[root@rockylinux9 ~]# dnf groupinstall "Development Tools"
[root@rockylinux9 ~]# dnf install epel-release
[root@rockylinux9 ~]# dnf install --enablerepo=devel cmake freetype-devel libpng-devel gtk2-devel libXt-devel mesa-libGLU-devel ncurses-devel gfortran libjpeg-turbo-devel libXpm-devel
[root@rockylinux9 ~]# dnf install http://mirror.ghettoforge.org/distributions/gf/el/9/gf/x86_64/libgnomecanvas-2.30.3-26.gf.el9.x86_64.rpm
[root@rockylinux9 ~]# mkdir script
[root@rockylinux9 ~]# cd script/
[root@rockylinux9 script]# wget https://raw.githubusercontent.com/pemsley/coot/refinement/build-it
[root@rockylinux9 script]# vi build-it
この「build-it」でcootのbuildに必要なパッケージがdownloadされてmake/installされます。
そのままでは上手く作ってくれいないのでこの「build-it」に修正を加えてます.
ただ、、「--no-check-certificate」を付けても「libccp4-6.5.1.tar.gz」がdownloadできない時がたまにあった...
|
その上で
|
途中「~/public_html/build-logs/Linux-rockylinux9/gtk2-python-gcc-11_and_g++-11/」に各コンポーネントのコンパイルサマリが列挙されます.
全部を一つ一つ見て各コンポーネントが正常にコンパイルされてたかを確認します
[root@rockylinux9 ~]# ls -l autobuild/
total 0
drwxr-xr-x. 4 root root 62 Nov 22 01:41 building
drwxr-xr-x. 9 root root 94 Nov 22 02:25 coot-Linux-x86_64-rocky-9.4-gtk2-python
drwxr-xr-x. 10 root root 112 Nov 22 02:20 Linux-rockylinux9-gtk2-python
[root@rockylinux9 ~]#
実際のコンパイル場所は「~/autobuild/building/rockylinux9_2024-08-26__THH_MM_SS」フォルダで行われて、 「~/autobuild/Linux-rockylinux9-gtk2-python/」をprefixとしてここにインストールされるみたい.
その後に必要なファイルだけがコピーされた「~/autobuild/coot-Linux-x86_64-rocky-9.4-gtk2-python」が用意され、これを /apps/ にコピーすれば完了.
[root@rockylinux9 ~]#
[root@rockylinux9 ~]# cd autobuild/
[root@rockylinux9 autobuild]# ls -l
total 0
drwxr-xr-x. 4 root root 62 Nov 22 01:41 building
drwxr-xr-x. 9 root root 94 Nov 22 02:25 coot-Linux-x86_64-rocky-9.4-gtk2-python
drwxr-xr-x. 10 root root 112 Nov 22 02:20 Linux-rockylinux9-gtk2-python
[root@rockylinux9 autobuild]#
[root@rockylinux9 autobuild]#
[root@rockylinux9 autobuild]# cd coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/
[root@rockylinux9 monomers]# find . -type d -exec chmod 755 {} \;
[root@rockylinux9 monomers]# find . -type f -exec chmod 644 {} \;
[root@rockylinux9 monomers]# cd $HOME/autobuild/
[root@rockylinux9 autobuild]# chown -R root. ./coot-Linux-x86_64-rocky-9.4-gtk2-python/
[root@rockylinux9 autobuild]# tar cfz /apps/src/coot-Linux-x86_64-rocky-9.4-gtk2-python.tar.gz ./coot-Linux-x86_64-rocky-9.4-gtk2-python
[root@rockylinux9 autobuild]# ls -lh /apps/src/coot-Linux-x86_64-rocky-9.4-gtk2-python.tar.gz
-rw-r--r--. 1 root root 448M Nov 22 02:39 /apps/src/coot-Linux-x86_64-rocky-9.4-gtk2-python.tar.gz
[root@rockylinux9 autobuild]#
[root@rockylinux9 autobuild]# cd /apps/
[root@rockylinux9 apps]#
[root@rockylinux9 apps]# tar xf src/coot-Linux-x86_64-rocky-9.4-gtk2-python.tar.gz
っで起動してみると
となります。 MobaXtermのXは正しく表示される. Xmingだと背景色が白のままで一見動いていないように見える..MobaXtermの方がいいかも
起動時のメッセージはこんな感じ.
[illya@rockylinux9 ~]$ /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/bin/coot
There are 223 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/list/mon_lib_list.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/a/ALA.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/a/ASP.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/a/ASN.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/c/CYS.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/g/GLN.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/g/GLY.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/g/GLU.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/p/PHE.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/h/HIS.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/i/ILE.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/l/LYS.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/l/LEU.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/m/MET.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/m/MSE.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/p/PRO.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/a/ARG.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/s/SER.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/t/THR.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/v/VAL.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/t/TRP.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/t/TYR.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/p/PO4.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/s/SO4.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/g/GOL.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/c/CIT.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/e/EDO.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/a/A.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/c/C.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/g/G.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/u/U.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/d/DA.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/d/DC.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/d/DG.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/d/DT.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/h/HOH.cif
There are 2 data in /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/share/coot/lib/data/monomers/n/NA.cif
Spacegroup: P 1
*** Cannot find the double-buffered visual.
*** Trying single-buffered visual.
(filter-fileselection-filenames-state)
(get-active-map-drag-flag)
(use-graphics-interface-state)
INFO:: coot.py imported
INFO:: coot_python initialized
Running python script /apps/coot-Linux-x86_64-rocky-9.4-gtk2-python/lib/python2.7/site-packages/coot/coot_load_modules.py
Good Morning Illya, Welcome to Coot version 0.9.8.95
(set-display-intro-string "Good Morning Illya, Welcome to Coot version 0.9.8.95")
Coot Python Scripting GUI code found and loaded.
Coot Python Scripting GUI code found and loaded.
(use-graphics-interface-state)
INFO:: preferences directory /home/illya/.coot-preferences does not exist. Won't read preferences.
(filter-fileselection-filenames-state)
(get-active-map-drag-flag)
(use-graphics-interface-state)
Coot Scheme Scripting GUI code found and loaded.
Good morning illya. Welcome to Coot 0.9.8.95.
(set-display-intro-string "Good morning illya. Welcome to Coot 0.9.8.95")
(set-display-lists-for-maps 1)
(filter-fileselection-filenames-state)
(get-active-map-drag-flag)
(use-graphics-interface-state)
State file 0-coot-history.py written.
State file 0-coot-history.scm written.
[illya@rockylinux9 ~]$
libvpx-develは入れてはダメ. libgdのコンパイルに必要かなと入れたら他のコンパイルに支障が発生
version1.1.x向けのbuildスクリプトを入手します
#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.4 (Blue Onyx)
[root@rockylinux9 ~]# dnf groupinstall "Development Tools"
[root@rockylinux9 ~]# dnf install epel-release
[root@rockylinux9 ~]# dnf install --enablerepo=devel cmake texinfo scl-utils autoconf271 gtk4-devel gobject-introspection-devel gfortran libepoxy-devel swig blas-devel re2c
[root@rockylinux9 ~]# mkdir script
[root@rockylinux9 ~]# cd script/
[root@rockylinux9 script]#
[root@rockylinux9 script]# wget https://raw.githubusercontent.com/pemsley/coot/main/build-it-3-3
[root@rockylinux9 script]# vi ./build-it-3-3
libffiにtexinfoは必要で、python3.11.4向けにlibffiは必要
gfortranはnumpyに必要. numpyがないとrdkitができない
gobject-introspection-develは内製されるgobject-introspectionの代わり. 内製品だとPyGobjectでmeson,ninjaでエラーになる
libepoxy-devel, swig, blas-develはcootに必要
re2cはninjaに必要
|
修正が終わったらautoconfをversion 2.71に変更して実行します.
[root@rockylinux9 script]# source scl_source enable autoconf271
[root@rockylinux9 script]# bash ./build-it-3-3
一応これでver1.1は作れるけど、、、正しく動かない...ファイルを読み込もうとするとフリーズ、aboutを出そうと操作するとフリーズ...こちらは様子見かな.