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できない時がたまにあった...

--- build-it.orig       2024-08-29 18:51:23.863806034 +0900
+++ build-it    2024-08-30 00:00:10.078584839 +0900
@@ -1052,7 +1052,7 @@
 
    if [ -e /bin/rpm ] ; then
       if rpm -a ; then
-         for i in fedora-release redhat-release redhat-release-workstation centos-release sl-release openSUSE-release ; do
+         for i in fedora-release redhat-release redhat-release-workstation centos-release sl-release openSUSE-release rocky-release ; do
            dist=`rpm -q --qf '%{name}' ${i}`
            echo  dist is $dist
            dist=`rpm -q --qf '%{name}' ${i}`
@@ -1091,7 +1091,7 @@
     esac
     ;;
 
-    fedora | centos | openSUSE )
+    fedora | centos | openSUSE | rocky )
       systype=${architecture}-${dist_name}-${dist_ver}
     ;;
 
@@ -1524,8 +1524,8 @@
 # This setting of the alias fails.  It works on the command line.
 # WGET="LD_LIBRARY_PATH=/usr/lib wget -N -P ${AUTOBUILD_SOURCES}"
 # WGETO="LD_LIBRARY_PATH=/usr/lib wget   -P ${AUTOBUILD_SOURCES}"
-WGET="wget -N -P ${AUTOBUILD_SOURCES}"
-WGETO="wget   -P ${AUTOBUILD_SOURCES}"
+WGET="wget -N -P ${AUTOBUILD_SOURCES} --no-check-certificate"
+WGETO="wget   -P ${AUTOBUILD_SOURCES} --no-check-certificate"
 
 # latest version (without .tar.gz extension)
 coot_version=$fallback_coot_version
@@ -1619,6 +1619,7 @@
       coot_version=coot-0.9.8.9
       coot_version=coot-0.9.8.91
       coot_version=coot-0.9.8.92
+      coot_version=coot-0.9.8.95
       echo NNX:: coot_version $coot_version
 
    else
@@ -4593,8 +4594,8 @@
 # as is the case when one dose "make install"
 # So I will convert that to say just "../py-compile"
 #
-sed -ibackup -e 's/am__py_compile.*destdir.*/am__py_compile)/' pyrogen/Makefile
-sed -ibackup -e 's/am__py_compile.*destdir.*/am__py_compile)/' python/Makefile
+sed -ibackup -e 's/am__py_compile.*destdir.*/am__py_compile) \\/' pyrogen/Makefile
+sed -ibackup -e 's/am__py_compile.*destdir.*/am__py_compile) \\/' python/Makefile
 
 # these are no longer used
 #         --with-mmdb-prefix=$install_top_dir

その上で

[root@rockylinux9 script]# bash ./build-it
 :
(ティータイム)
 :
[root@rockylinux9 script]# cd ..
[root@rockylinux9 ~]# ls -l
total 4
-rw-------. 1 root root 1326 Nov 17 23:42 anaconda-ks.cfg
drwxr-xr-x. 5 root root  106 Nov 22 02:25 autobuild
drwxr-xr-x. 4 root root   40 Nov 22 01:41 public_html
drwxr-xr-x. 2 root root   22 Nov 22 01:41 script
[root@rockylinux9 ~]#

途中「~/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

っで起動してみると
2024y08m30d_014213313.png 2024y08m30d_014320246.png
となります。 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のコンパイルに必要かなと入れたら他のコンパイルに支障が発生

version 1.1.xを作ってみた.

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に必要

--- build-it-3-3.orig   2024-08-30 23:58:01.340924177 +0900
+++ build-it-3-3        2024-08-31 00:58:52.763620668 +0900
@@ -1092,8 +1092,8 @@
    if [ -e /bin/rpm ] ; then
       if rpm -a ; then
          if test -e /etc/os-release ; then
-             dist_name=$(grep ^ID= /etc/os-release | sed -e 's/ID=//')
-             dist_ver=$(grep ^VERSION_ID /etc/os-release | sed -e 's/VERSION_ID=//')
+             dist_name=$(grep ^ID= /etc/os-release | sed -e 's/ID=//' | tr -d '"')
+             dist_ver=$(grep ^VERSION_ID /etc/os-release | sed -e 's/VERSION_ID=//' | tr -d '"')
          else
              for i in fedora-release redhat-release redhat-release-workstation centos-release sl-release openSUSE-release ; do
                  rpm -q --qf '%{name}' ${i}
@@ -1622,8 +1622,8 @@
 # -nv is means not-verbose (but not quiet)
 # WGET="LD_LIBRARY_PATH=/usr/lib wget -N -P ${AUTOBUILD_SOURCES}"
 # WGETO="LD_LIBRARY_PATH=/usr/lib wget   -P ${AUTOBUILD_SOURCES}"
-WGET="wget -nv -N -P ${AUTOBUILD_SOURCES}"
-WGETO="wget -nv  -P ${AUTOBUILD_SOURCES}"
+WGET="wget -nv -N -P ${AUTOBUILD_SOURCES} --no-check-certificate"
+WGETO="wget -nv  -P ${AUTOBUILD_SOURCES} --no-check-certificate"
 
 # latest version (without .tar.gz extension)
 coot_version=$fallback_coot_version
@@ -2979,6 +2979,7 @@
 # to build.
 
 build_gobject_introspection=true
+build_gobject_introspection=false
 
 if [ -e $install_top_dir/include/gobject-introspection-1.0/giversionmacros.h ] ; then
    build_gobject_introspection=false
@@ -3827,7 +3828,7 @@
       if test "$dist_name" = debian ; then
          echo don.t mess with LDFLAGS here on debian
       else
-         export LDFLAGS="-L$install_top_dir/lib -lintl"
+         export LDFLAGS="-L$install_top_dir/lib"
       fi
 
       # echo will configure with cmake like this:
@@ -4361,9 +4362,6 @@
          echo no file $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz
          echo ${WGET} http://www.hboehm.info/gc/gc_source/gc-$gc_version.tar.gz
          ${WGET} http://www.hboehm.info/gc/gc_source/gc-$gc_version.tar.gz
-         # this file is double-gzipped!
-         mv $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz.gz
-         gunzip $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz.gz
          if [ -e $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz ] ; then
             tar xf $AUTOBUILD_SOURCES/gc-$gc_version.tar.gz
          else
@@ -4803,7 +4801,7 @@
 # 20220707-PE does this improve thie linking (get pass the problem with g_module_open_full)?
 # We get checking dynamic linker characteristics... awk: symbol lookup error: /home/pemsley/autobuild/Linux-emsley-vm-fedora-2.lmb.internal-gtk4/lib/libreadline.so.8: undefined symbol: UP
 # on fedora if LD_LIBRARY_PATH is set
-if [ "$dist_name" = fedora ] ;  then
+if [ "$dist_name" = fedora -o "$dist_name" = rocky ] ;  then
     :
 else
     export LD_LIBRARY_PATH=$install_top_dir/lib

修正が終わったらautoconfをversion 2.71に変更して実行します.

[root@rockylinux9 script]# source scl_source enable autoconf271
 
[root@rockylinux9 script]# bash ./build-it-3-3

一応これでver1.1は作れるけど、、、正しく動かない...ファイルを読み込もうとするとフリーズ、aboutを出そうと操作するとフリーズ...こちらは様子見かな.

最新の60件
2024-12-08 2024-12-05 2024-12-04 2024-11-28 2024-11-23 2024-11-22 2024-11-15 2024-11-14 2024-11-12 2024-11-06 2024-11-05 2024-11-04 2024-11-02 2024-11-01 2024-10-29 2024-10-28 2024-10-27 2024-10-23 2024-10-18 2024-10-17 2024-10-15 2024-10-14 2024-10-13 2024-10-11 2024-10-10 2024-10-09 2024-10-08 2024-10-05 2024-10-04 2024-10-03 2024-10-02 2024-10-01 2024-09-30 2024-09-29 2024-09-28 2024-09-27 2024-09-22 2024-09-20 2024-09-17

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2024-11-22 (金) 02:49:54