#author("2026-08-23T18:20:29+00:00","default:sysosa","sysosa")
#author("2026-08-23T18:22:01+00:00","default:sysosa","sysosa")
v0.9.xと同様に 本家様で構築用のスクリプトが用意されています
そのスクリプトを実行すると [[https://github.com/pemsley/coot>+https://github.com/pemsley/coot]] からソースコードが取得されコンパイルされバイナリーが用意されます

でもスクリプトは rockylinux 向けではなくちょっとした修正が必要みたい

***rockylinux9で coot-1.x をソースから作成してみる [#ja83bc23]

っで実際に作ってみる


#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.8 (Blue Onyx)

[root@rockylinux9 ~]# dnf groupinstall "Development Tools"
[root@rockylinux9 ~]# dnf install epel-release
[root@rockylinux9 ~]# dnf config-manager --enable crb
[root@rockylinux9 ~]# dnf install cmake texinfo gtk4-devel gfortran libepoxy-devel swig blas-devel lapack-devel re2c libpsl-devel readline-devel libjpeg-devel pslib-devel gobject-introspection-devel python3-gobject-devel \
    openssl-devel     sqlite-devel     gdbm-devel     libuuid-devel     tk-devel     readline-devel     zlib-devel     bzip2-devel     xz-devel     libffi-devel   perl-FindBin   perl-IPC-Cmd   gsl-devel

[root@rockylinux9 ~]# mkdir script ; cd script

[root@rockylinux9 script]#
[root@rockylinux9 script]# git clone https://github.com/pemsley/coot
}}
ここでソースをちょいと調整します. 今後のリリースで解消されるかもですけど
#code(nonumber){{
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1020,7 +1020,7 @@ test_coot_align_LDADD =   \
 # test_lbg_graph_LDADD = $(MMDB_LIBS)


-coot_density_score_by_residue_bin_SOURCES = density-score-by-residue-src.cc
+coot_density_score_by_residue_bin_SOURCES = density-score-by-residue-src.cc setup-gui-components.cc
 coot_density_score_by_residue_bin_LDADD  =     \
         libcootsumo.la                                          \
        $(top_builddir)/geometry/libcoot-geometry.la            \
}}

あと、ソースの中にある build-it-3-3 を一段上にコピーして修正を加えます
#code(nonumber){{
[root@rockylinux9 script]# cp coot/build-it-3-3  .

[root@rockylinux9 script]# vi ./build-it-3-3
}}

「build-it-3-3」の修正は主にrockylinuxへの対処ですね
あと、GEMMIへの配慮くらい

#code(diff,nonumber){{
--- coot/build-it-3-3   2026-08-24 01:22:46.035300747 +0900
+++ build-it-3-3        2026-08-23 16:35:28.454535563 +0900
@@ -1053,7 +1053,7 @@
          if test -e /etc/os-release ; then
              # 20240914 strip quote marks also now
              dist_name=$(grep ^ID= /etc/os-release | sed -e 's/ID=//' -e 's/"//g')
-             dist_ver=$(grep ^VERSION_ID /etc/os-release | sed -e 's/VERSION_ID=//')
+             dist_ver=$(grep ^VERSION_ID /etc/os-release | sed -e 's/VERSION_ID=//' -e 's/"//g')
          else
              for i in fedora-release redhat-release redhat-release-workstation centos-release sl-release openSUSE-release ; do
                  rpm -q --qf '%{name}' ${i}
@@ -2737,6 +2737,7 @@
        patch -p0 < ${AUTOBUILD_SOURCES}/readline-5.1.patch
     fi
     do_the_sed=no
+    if [ "$dist_name" = rocky     ] ; then do_the_sed=yes ; fi
     if [ "$dist_name" = arch      ] ; then do_the_sed=yes ; fi
     if [ "$dist_name" = almalinux ] ; then do_the_sed=yes ; fi
     if [ "$dist_name" = ubuntu    ] ; then do_the_sed=yes ; fi
@@ -2873,7 +2874,7 @@
    fi
 else
    # what about rocky here also?
-   if test "$dist_name" = fedora ; then
+   if [ "$dist_name" = fedora ] || [ "$dist_name" = rocky ] ; then
        if [ -e $install_top_dir/include/openssl ] ; then
            build_openssl=false
        else
@@ -2977,7 +2978,7 @@
    # remove --with-pydebug for now because __PyNegativeRefcount problem on trying to load this into Blender
    #
    # do we also need to use --with-threads=dir?
-   if test "$dist_name" = fedora ; then
+   if [ "$dist_name" = fedora ] || [ "$dist_name" = rocky ] ; then
        python_install_top_dir=$HOME/building-python
        python_install_top_dir=$HOME/building-python-tt
        python_install_top_dir=$install_top_dir
@@ -4184,7 +4185,7 @@
               if test "$dist_name" = almalinux ; then
                   echo don.t mess with LDFLAGS on almalinux
               else
-                 if test "$dist_name" = arch ; then
+                 if [ "$dist_name" = arch ] || [ "$dist_name" = rocky ] ; then
                      echo don.t mess with LDFLAGS here on arch
                   else
                       export LDFLAGS="-L$install_top_dir/lib -lintl"
@@ -5163,7 +5164,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 ] || [ "$dist_name" = rocky ] ;  then
     :
 else
     if [ "$dist_name" = arch ] ;  then
@@ -5184,8 +5185,9 @@

 echo bash ../coot/configure $coot_prefix \
       --with-fftw-prefix=$install_top_dir  \
-      COOT_BUILD_INFO_STRING="$coot_build_info_string" \
       SHELL=/bin/bash \
+      GEMMI_CXXFLAGS="-I/apps/coot-1.3.3/include" \
+      GEMMI_LIBS="-L/apps/coot-1.3.3/lib64 -lgemmi_cpp" \
       PYTHON=python3 \
       --with-boost=$install_top_dir  \
       --with-boost-libdir=$install_top_dir/lib  \
@@ -5200,8 +5202,9 @@
    bash ../coot/configure $coot_prefix \
       --with-fftw-prefix=$install_top_dir  \
       SHELL=/bin/bash \
+      GEMMI_CXXFLAGS="-I/apps/coot-1.3.3/include" \
+      GEMMI_LIBS="-L/apps/coot-1.3.3/lib64 -lgemmi_cpp" \
       PYTHON=python3 \
-      COOT_BUILD_INFO_STRING="$coot_build_info_string" \
       --with-boost=$install_top_dir  \
       --with-boost-libdir=$install_top_dir/lib  \
       --with-rdkit-prefix=$install_top_dir \
@@ -5391,8 +5394,8 @@
                  tar xzf $holding_tar_file
                  echo cding into `basename $slim_dir`  from `pwd`
                   cd `basename $slim_dir`
-                 echo ln -s ../../$coot_dir_name/greg-tests .
-                 ln -s ../../$coot_dir_name/greg-tests .
+                  echo mkdir greg-tests
+                  mkdir greg-tests
                   echo second coot test...
                   echo running second test... >&2
                  test_coot bin/coot > $LOGS/test-2.log 2>&1
}}

これでコンパイルします.


#code(nonumber){{
[root@rockylinux9 script]# AUTOBUILD_INSTALLED=/apps/coot-1.3.3   bash  ./build-it-3-3
 :
(ケーキと紅茶)
 :
[root@rockylinux9 script]#
}}

コンパイルが完了すると/appsに「coot-1.3.3」と「coot-Linux-x86_64-rocky-9.8-gtk4」が現れる
#code(nonumber){{
[root@rockylinux9 ~]# ls -l /apps/
 :
drwxr-xr-x. 12 root root 4096 Aug 24 02:43 coot-1.3.3
drwxr-xr-x.  7 root root   68 Aug 24 02:45 coot-Linux-x86_64-rocky-9.8-gtk4
 :
[root@rockylinux9 ~]# 
}}

「/apps/coot-1.3.3」は関連各種パッケージのmake install先. なのでこれを持って行けば起動できる場所. だけで余計なのモノがあるのでそれを除いたのが「/apps/coot-Linux-x86_64-rocky-9.8-gtk4」なのだが、
結構「/apps/coot-1.3.3」への依存が多いのであんまり使えない. なので嵩むけど「/apps/coot-1.3.3」のみ使うのがいいかな

Environment-modulesは「/apps/modulefiles/coot/1.3.3」を下記のようにします.
#code(nonumber){{
#%Module1.0
set          root /apps/coot-1.3.3
prepend-path PATH            $root/bin
prepend-path LD_LIBRARY_PATH $root/lib:$root/lib64
}}
これをloadして「coot」と実行すると
&ref(2026y08m24d_031304517.png,nolink,70%);

そして本体の画面が表示され、そのヘルプは下記になります

&ref(2026y08m24d_031909455.png,nolink,80%);
&ref(2026y08m24d_032135135.png,nolink,80%);

リモートでX11越しに使うのは微妙でしょうか。コンソールで使った方が描画は早いですね.


***ubuntu24.04で [#qd9e6318]


#code(nonumber){{
root@ubuntu24:~# apt install build-essential git cmake m4 libtool swig flex bison gfortran autoconf automake libssl-dev libblas-dev \
   liblapack-dev libncurses5-dev libjpeg-dev libgtk-4-dev libpsl-dev pkg-config  gobject-introspection python-gi-dev libgirepository-1.0-dev

root@ubuntu24:~#
root@ubuntu24:~# mkdir script
root@ubuntu24:~# cd script/
root@ubuntu24:~/script#
root@ubuntu24:~/script# wget https://raw.githubusercontent.com/pemsley/coot/main/build-it-3-3

root@ubuntu24:~/script# grep ^script_version build-it-3-3
script_version=6.25

root@ubuntu24:~/script#
}}
ubuntu側はスクリプトの修正なしで大丈夫のようです
っで構築

#code(nonumber){{
root@ubuntu24:~/script# AUTOBUILD_INSTALLED=/apps/coot bash ./build-it-3-3

root@ubuntu24:~/script# cd /apps/
root@ubuntu24:/apps# ls -l

drwxr-xr-x 8 root root 4096 Feb 16 18:54 coot
drwxr-xr-x 7 root root 4096 Feb 16 18:55 coot-Linux-x86_64-ubuntu-24.04.4-gtk4

root@ubuntu24:/apps#
}}

インストール先を「/apps/coot」として作成しますが、その後に「/apps/coot」から必要な分をコピーした「/apps/coot-Linux-x86_64-ubuntu-24.04.4-gtk4」が用意されます.
なので「/apps/coot」を削除してもいいかなと思うのだが、どうも必要なファイルが全部「/apps/coot-Linux-x86_64-ubuntu-24.04.4-gtk4」に移っていない模様
いずれ修正されるかもしれないけどね。

なのでenvironment-modulesは、

「/apps/modulefiles/coot」
#code(nonumber){{
#%Module1.0
#set          root /apps/coot-Linux-x86_64-ubuntu-24.04.4-gtk4
set          root /apps/coot
prepend-path PATH            $root/bin
prepend-path LD_LIBRARY_PATH $root/lib
}}
とします。
1

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS