コンテンツにスキップ

2024年度, Tips/GADGET4

24/09/09

GADGET4を動かすために必要なライブラリ

インストールする際にどこにファイルを置くかは便宜、サーバーによって変更をしなくてはいけない。例えば、将来使用予定のwasatサーバーは/home/work以下、をHDDで確保し、それ以外の実行ファイルをSSD下に格納している。これによって最大限のパフォーマンスを確保している。

今回、ログとして残すのは西濱独自のddd3h-serverで大凡をSSDで保存している。つまり、どこにおいてもパフォーマンスは変わらないはずである。

そこで今回は安全性を担保するために、/home/daisuke/localで実行ファイルを格納する。

$ pwd
/home/daisuke
$ ls   
erosita         local

localディレクトリが存在しない場合は、作成しよう。

$ mkdir -p local

zlib

hdf5のための圧縮ライブラリ。hdf5がこれに依存するので、最初にインストールする。

ダウンロード

$ wget https://www.zlib.net/zlib-1.3.1.tar.gz
$ tar -zxvf zlib-1.3.1.tar.gz

Makefileを作成

zlib-1.3.1に移動して以下のコマンド実行する。

$ ./configure --prefix=/home/daisuke/local
Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.3.1 with gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.

make

$ make                                                           
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -c -o adler32.o adler32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -c -o crc32.o crc32.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -c -o deflate.o deflate.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -c -o infback.o infback.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -c -o inffast.o inffast.c

(略)

rm -f libz.so libz.so.1
ln -s libz.so.1.3.1 libz.so
ln -s libz.so.1.3.1 libz.so.1
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o  -L. libz.so.1.3.1
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o  -L. libz.so.1.3.1
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -o example64 example64.o -L. libz.a
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN  -o minigzip64 minigzip64.o -L. libz.a

make install

$ make install

hdf5

最新バージョンのURLは以下より探す:Index of /ftp/HDF5

今回は 1.13.0 が最新のようですね。木原さんのdocumentには1.14とあるがなぜだろう…

ダウンロード

$ wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.gz
--2024-09-09 06:22:04--  https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.0/src/hdf5-1.13.0.tar.gz
Resolving support.hdfgroup.org (support.hdfgroup.org)... 54.239.168.96, 54.239.168.2, 54.239.168.21, ...
Connecting to support.hdfgroup.org (support.hdfgroup.org)|54.239.168.96|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13921144 (13M) [application/x-tar]
Saving to: ‘hdf5-1.13.0.tar.gz’

hdf5-1.13.0.tar.gz     100%[==========================>]  13.28M  9.45MB/s    in 1.4s    

2024-09-09 06:22:06 (9.45 MB/s) - ‘hdf5-1.13.0.tar.gz’ saved [13921144/13921144]

Makefileを作成

$ tar -zxvf hdf5-1.13.0.tar.gz
$ cd hdf5-1.13.0/ 
$ ./configure --prefix=/home/daisuke/local --with-zlib=/home/daisuke/local --enable-parallel

                    AM C Flags: 
              Shared C Library: yes
              Static C Library: yes


                       Fortran: no

                           C++: no

                          Java: no


Features:
---------
                    Parallel HDF5: yes
 Parallel Filtered Dataset Writes: yes
               Large Parallel I/O: yes
               High-level library: yes
Dimension scales w/ new references: no
                 Build HDF5 Tests: yes
                 Build HDF5 Tools: yes
                     Threadsafety: no
              Default API mapping: v114
   With deprecated public symbols: yes
           I/O filters (external): deflate(zlib)
                              MPE: 
                    Map (H5M) API: no
                       Direct VFD: no
                       Mirror VFD: no
               (Read-Only) S3 VFD: no
             (Read-Only) HDFS VFD: no
                          dmalloc: no
   Packages w/ extra debug output: none
                      API tracing: no
             Using memory checker: no
  Memory allocation sanity checks: no
           Function stack tracing: no
                 Use file locking: best-effort
        Strict file format checks: no
     Optimization instrumentation: no

make

とりあえず、make

$ make
思った以上に時間がかかるので make -j でもよかったかも。

思った以上にwarningがたくさん出てくる。

make install

$ make install                                           
Making install in src
make[1]: Entering directory '/home/daisuke/hdf5-1.13.0/src'
make[2]: Entering directory '/home/daisuke/hdf5-1.13.0/src'
 /usr/bin/mkdir -p '/home/daisuke/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libhdf5.la '/home/daisuke/local/lib'
libtool: install: /usr/bin/install -c .libs/libhdf5.so.300.0.0 /home/daisuke/local/lib/libhdf5.so.300.0.0

(略)

+ /usr/bin/install -c ./ex_table_11.c /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./ex_table_12.c /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./ex_ds1.c /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./image24pixel.txt /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./image8.txt /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./pal_rgb.h /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c run-hlc-ex.sh /home/daisuke/local/share/hdf5_examples/hl/c/.
+ /usr/bin/install -c ./run-hl-ex.sh /home/daisuke/local/share/hdf5_examples/hl/.
make[2]: Leaving directory '/home/daisuke/hdf5-1.13.0/hl/examples'
make[1]: Leaving directory '/home/daisuke/hdf5-1.13.0/hl'

gsl

乱数生成に必要なライブラリ。

ダウンロード

$ wget https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz
--2024-09-09 07:31:01--  https://mirror.ibcp.fr/pub/gnu/gsl/gsl-latest.tar.gz
Resolving mirror.ibcp.fr (mirror.ibcp.fr)... 194.254.245.145, 2001:660:500b:245::145
Connecting to mirror.ibcp.fr (mirror.ibcp.fr)|194.254.245.145|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8997136 (8.6M) [application/x-gzip]
Saving to: ‘gsl-latest.tar.gz’

gsl-latest.tar.gz      100%[==========================>]   8.58M   178KB/s    in 46s     

2024-09-09 07:31:49 (193 KB/s) - ‘gsl-latest.tar.gz’ saved [8997136/8997136]

Makefileを作成

$ tar -zxvf gsl-latest.tar.gz
$ cd gsl-2.8/
$ ./configure --prefix=/home/daisuke/local

make

$ make

make install

$ make install

fftw

Fastest Fourier Transform in the Westの略。つまり、高速フーリエ変換を可能にする。

ダウンロード

公式サイトから最新版のURLをコピーしてくる。

$ wget https://www.fftw.org/fftw-3.3.10.tar.gz
--2024-09-09 10:54:05--  https://www.fftw.org/fftw-3.3.10.tar.gz
Resolving www.fftw.org (www.fftw.org)... 216.137.187.110
Connecting to www.fftw.org (www.fftw.org)|216.137.187.110|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4144100 (4.0M) [application/octet-stream]
Saving to: ‘fftw-3.3.10.tar.gz’

fftw-3.3.10.tar.gz      100%[==============================>]   3.95M  2.76MB/s    in 1.4s    

2024-09-09 10:54:09 (2.76 MB/s) - ‘fftw-3.3.10.tar.gz’ saved [4144100/4144100]

Makefileを作成

$ tar -zxvf fftw-3.3.10.tar.gz
$ cd fftw-3.3.10
$ ./configure --prefix=/home/daisuke/local --enable-mpi --enable-openmp --enable-threads --enable-avx2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk

(略)

config.status: creating fftw.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

make

$ make -j

(略)

fftw-wisdom.c: In function ‘bench_main’:
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size 61 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 4 and 1539 bytes into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size between 9 and 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 1 and 1591 bytes into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output 1 or more bytes (assuming 1536) into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size between 25 and 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 1 and 1575 bytes into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output 1 or more bytes (assuming 1536) into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size between 41 and 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 1 and 1559 bytes into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output 1 or more bytes (assuming 1536) into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
fftw-wisdom.c:303:54: warning: ‘%s’ directive output may be truncated writing up to 1535 bytes into a region of size between 57 and 64 [-Wformat-truncation=]
  303 |                          snprintf(ps, sizeof(ps), "%s%s", types[j], canonical_sizes[i]);
      |                                                      ^~
In file included from /usr/include/stdio.h:894,
                 from fftw-wisdom.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 1 and 1543 bytes into a destination of size 64
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
mv -f .deps/fftw_wisdom-fftw-wisdom.Tpo .deps/fftw_wisdom-fftw-wisdom.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc  -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns   -o fftw-wisdom fftw_wisdom-fftw-wisdom.o ../tests/bench-bench.o ../tests/bench-fftw-bench.o ../threads/libfftw3_threads.la ../libfftw3.la ../libbench2/libbench2.a  -lm
libtool: link: gcc -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -o fftw-wisdom fftw_wisdom-fftw-wisdom.o ../tests/bench-bench.o ../tests/bench-fftw-bench.o  ../threads/.libs/libfftw3_threads.a /home/daisuke/fftw-3.3.10/.libs/libfftw3.a ../.libs/libfftw3.a ../libbench2/libbench2.a -lm
make[3]: Leaving directory '/home/daisuke/fftw-3.3.10/tools'
make[2]: Leaving directory '/home/daisuke/fftw-3.3.10/tools'
Making all in m4
make[2]: Entering directory '/home/daisuke/fftw-3.3.10/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/daisuke/fftw-3.3.10/m4'
make[1]: Leaving directory '/home/daisuke/fftw-3.3.10'

make install

$ make install
Making install in support
make[1]: Entering directory '/home/daisuke/fftw-3.3.10/support'
make[2]: Entering directory '/home/daisuke/fftw-3.3.10/support'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/daisuke/fftw-3.3.10/support'

(略)

make[1]: Entering directory '/home/daisuke/fftw-3.3.10/m4'
make[2]: Entering directory '/home/daisuke/fftw-3.3.10/m4'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/daisuke/fftw-3.3.10/m4'
make[1]: Leaving directory '/home/daisuke/fftw-3.3.10/m4'

Grackle

化学・放射冷却ライブラリ。

ダウンロード

grackleの GitHub Page に移動。「releases」にある、再新バージョンのsource codeをダウンロードする。

$ wget https://github.com/grackle-project/grackle/archive/refs/tags/grackle-3.3.0.tar.gz
--2024-09-09 15:19:56--  https://github.com/grackle-project/grackle/archive/refs/tags/grackle-3.3.0.tar.gz
Resolving github.com (github.com)... 20.27.177.113
Connecting to github.com (github.com)|20.27.177.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/grackle-project/grackle/tar.gz/refs/tags/grackle-3.3.0 [following]
--2024-09-09 15:19:56--  https://codeload.github.com/grackle-project/grackle/tar.gz/refs/tags/grackle-3.3.0
Resolving codeload.github.com (codeload.github.com)... 20.27.177.114
Connecting to codeload.github.com (codeload.github.com)|20.27.177.114|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘grackle-3.3.0.tar.gz’

grackle-3.3.0.tar.gz                [ <=>                                                   ] 293.58K  --.-KB/s    in 0.06s   

2024-09-09 15:19:56 (4.90 MB/s) - ‘grackle-3.3.0.tar.gz’ saved [300623]

Makefileを作成

$ tar -zxvf grackle-3.3.0.tar.gz
$ cd grackle-grackle-3.3.0/
$ ls
CHANGELOG  CITATION  config  configure  CONTRIBUTING.rst  doc  grackle_data_files  input  LICENSE  README.md  src  VERSION

ここで configure を実行する。

$ ./configure
Configure complete.

src/clib/Make.mach.linux-gnu を編集する。

  • 66行目
    - LOCAL_INCLUDES_HDF5   = -I/usr/include/hdf5/serial # HDF5 includes
    + LOCAL_INCLUDES_HDF5   = -I/home/daisuke/local/include
    
  • 74行目
    - LOCAL_LIBS_HDF5   = -L/usr/lib/x86_64-linux-gnu/ -lhdf5_serial -lz # HDF5 libraries
    + LOCAL_LIBS_HDF5   = -L/home/daisuke/local/lib -lhdf5 -lz
    
  • 83-85行目
    - MACH_INSTALL_PREFIX = $(HOME)/local
    - MACH_INSTALL_LIB_DIR =
    - MACH_INSTALL_INCLUDE_DIR =
    + MACH_INSTALL_PREFIX = /home/daisuke/local
    + MACH_INSTALL_LIB_DIR = /home/daisuke/local/lib
    + MACH_INSTALL_INCLUDE_DIR = /home/daisuke/local/include
    

次に src/clib/Make.config.machine を編集する。(すでに変更されてる場合もある。)

- CONFIG_MACHINE = unknown
+ CONFIG_MACHINE = linux-gnu

make

Makefile のある位置に注意。

$ pwd
/home/daisuke/grackle-grackle-3.3.0/src
$ ls
clib  example  Makefile  python

適切な場所で make を実行する。

$ make
make -C clib
make[1]: Entering directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 28, in <lambda>
    "git-branch" : lambda: query_git("git rev-parse --abbrev-ref HEAD"),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 29, in <lambda>
    "git-revision" : lambda: query_git("git rev-parse HEAD")}
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Updating DEPEND
make[1]: [Makefile:244: dep] Error 127 (ignored)
make[1]: [Makefile:245: dep] Error 127 (ignored)
make[1]: [Makefile:246: dep] Error 127 (ignored)
make[1]: [Makefile:247: dep] Error 127 (ignored)
Compiling auto_general.c

Compiling auto_general.c failed!
See out.compile for error messages.

make[1]: *** [Makefile:188: auto_general.lo] Error 1
make[1]: Leaving directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
make: *** [Makefile:2: build] Error 2

エラーが出た。out.compile ファイルは clib 内にあるよう。

$ find -name "out.compile"
./clib/out.compile

$ cat clib/out.compile
/bin/bash: line 3: libtool: command not found

libtool が無いよう。libtoolについては以下にまとめとく。

Note

Libtoolは、Unix系システム(Linux、macOS、BSDなど)でよく使われる、ソフトウェア開発ツールの一つです。具体的には、ライブラリ(特に共有ライブラリ)を管理するためのツールです。

主な機能と特徴:

  • ライブラリの作成と管理: Libtoolは、静的ライブラリ(.aファイル)や共有ライブラリ(.soファイル)の作成を簡素化します。これにより、異なるプラットフォームやコンパイラ間で一貫した方法でライブラリを扱うことができます。
  • 移植性の向上: 各プラットフォームには独自のライブラリ作成方法がありますが、Libtoolはこれを抽象化し、単一のインターフェースでさまざまな環境に対応できるようにします。これにより、ソフトウェア開発者は特定のプラットフォームに依存しないライブラリを作成できます。
  • 統合: Libtoolは、通常、Autotoolsの一部として利用されます。Autotoolsは、autoconfautomakeなどのツール群で構成され、ポータブルなソフトウェアを開発するために使われます。Libtoolは、このツールチェーンの一部としてライブラリ管理を担当します。

使用方法:

Libtoolは通常、libtoolというコマンドで利用されます。このコマンドを使うことで、コンパイルやリンクの際にライブラリの作成や使用を簡単に行うことができます。また、通常のMakefileやAutotoolsと組み合わせて使うことが多いです。

例:

たとえば、あるソースコードから共有ライブラリを作成する場合、libtoolを使うことで、手作業でリンクするのに比べて、移植性を保ちながら作業を簡素化できます。

libtool --mode=compile gcc -c foo.c
libtool --mode=link gcc -o libfoo.la foo.lo

上記の例では、foo.cというソースファイルからlibfooという共有ライブラリを作成しています。

要するに、Libtoolは、複数のプラットフォーム間でソフトウェアライブラリを扱う際の煩雑さを軽減するためのツールです。Ubuntuを含む多くのLinuxディストリビューションで広く利用されています。

使用しているサーバーはubuntu osで動いているので次のコマンドで十分だろう。

$ sudo apt install libtool
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libtool is already the newest version (2.4.6-15build2).
libtool set to manually installed.
The following packages were automatically installed and are no longer required:
  libgfapi0 libgfrpc0 libgfxdr0 libglusterfs0 libldb2 libtalloc2 libtdb1 libtevent0
  libwbclient0 python3-gpg python3-samba samba-common samba-common-bin
  samba-dsdb-modules samba-libs samba-vfs-modules
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

だが、すでにインストール済みらしい…。

noteにあるように libtool コマンドを実行してみると libtool-bin をインストールしろとのこと。

$ libtool
Command 'libtool' not found, but can be installed with:
sudo apt install libtool-bin
$ sudo apt install libtool-bin

その後、make clean して make するといい感じに進んだ。

$ make
make -C clib
make[1]: Entering directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 28, in <lambda>
    "git-branch" : lambda: query_git("git rev-parse --abbrev-ref HEAD"),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 29, in <lambda>
    "git-revision" : lambda: query_git("git rev-parse HEAD")}
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Updating DEPEND
make[1]: [Makefile:244: dep] Error 127 (ignored)
make[1]: [Makefile:245: dep] Error 127 (ignored)
make[1]: [Makefile:246: dep] Error 127 (ignored)
make[1]: [Makefile:247: dep] Error 127 (ignored)
Compiling auto_general.c
Compiling calculate_cooling_time.c
Compiling calculate_dust_temperature.c
Compiling calculate_gamma.c
Compiling calculate_pressure.c
Compiling calculate_temperature.c
Compiling calc_temp1d_cloudy_g.F
Compiling calc_temp_cloudy_g.F
Compiling calc_tdust_1d_g.F
Compiling calc_tdust_3d_g.F
Compiling cool1d_cloudy_g.F
Compiling cool1d_cloudy_old_tables_g.F
Compiling cool1d_multi_g.F
Compiling cool_multi_time_g.F
Compiling dynamic_api.c
Compiling grackle_units.c
Compiling index_helper.c
Compiling initialize_chemistry_data.c
Compiling initialize_cloudy_data.c

Compiling initialize_cloudy_data.c failed!
See out.compile for error messages.

make[1]: *** [Makefile:188: initialize_cloudy_data.lo] Error 1
make[1]: Leaving directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
make: *** [Makefile:2: build] Error 2

次のエラーを確認する。

$ cat clib/out.compile                                                  (base) 
libtool: compile:  gcc -c -DLINUX -DH5_USE_16_API -fPIC -O2 -I/home/daisuke/l/include -I. initialize_cloudy_data.c  -fPIC -DPIC -o .libs/initialize_cloudy_data.o
In file included from /home/daisuke/local/include/hdf5.h:22,
                 from initialize_cloudy_data.c:17:
/home/daisuke/local/include/H5public.h:65:10: fatal error: mpi.h: No such file or directory
   65 | #include <mpi.h>
      |          ^~~~~~~
compilation terminated.

mpi.h が存在するのかを確認する

$ locate mpi.h
/home/daisuke/OpenTsiolkovsky/boost/numeric/odeint/external/mpi/mpi.hpp
/home/daisuke/hdf5-1.13.0/src/H5FDmpi.h
/home/daisuke/local/include/H5FDmpi.h
/mnt/hdd/STORAGE_Backup/OpenTsiolkovsky/boost/numeric/odeint/external/mpi/mpi.hpp
/opt/anaconda3/include/H5FDmpi.h
/opt/anaconda3/include/boost/mpi.hpp
/opt/anaconda3/include/boost/graph/use_mpi.hpp
/opt/anaconda3/include/boost/numeric/odeint/external/mpi/mpi.hpp
/opt/anaconda3/include/nss/secmpi.h
/opt/anaconda3/lib/python3.11/site-packages/yt/frontends/artio/artio_headers/artio_mpi.h
/opt/anaconda3/pkgs/hdf5-1.12.1-h2b7332f_3/include/H5FDmpi.h
/opt/anaconda3/pkgs/libboost-1.82.0-h109eef0_2/include/boost/mpi.hpp
/opt/anaconda3/pkgs/libboost-1.82.0-h109eef0_2/include/boost/graph/use_mpi.hpp
/opt/anaconda3/pkgs/libboost-1.82.0-h109eef0_2/include/boost/numeric/odeint/external/mpi/mpi.hpp
/opt/anaconda3/pkgs/nss-3.89.1-h6a678d5_0/include/nss/secmpi.h
/usr/include/boost/mpi.hpp
/usr/include/boost/graph/use_mpi.hpp
/usr/include/boost/numeric/odeint/external/mpi/mpi.hpp
/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/openmpi/mpi.h
/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/openmpi/openmpi/ompi/mpi/fortran/mpif-h/prototypes_mpi.h
/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h
/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/ompi/mpi/fortran/mpif-h/prototypes_mpi.h
/usr/src/linux-headers-5.15.0-105/include/linux/mpi.h
/usr/src/linux-headers-5.15.0-119/include/linux/mpi.h

確かに存在する。ということは include が適切にできていない。そこでopenmpiのincludeファイルからすべてコピーする。(もう少しいい方法があれば教えて…)

$ cp -r /usr/lib/x86_64-linux-gnu/openmpi/include/* /home/daisuke/local/include/.

Note

普通にpathとして後ろに-I/usr/lib/x86_64-linux-gnu/openmpi/includeを追加すればよかったかも

make clean して make すると…

$ make
make -C clib
make[1]: Entering directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 28, in <lambda>
    "git-branch" : lambda: query_git("git rev-parse --abbrev-ref HEAD"),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 29, in <lambda>
    "git-revision" : lambda: query_git("git rev-parse HEAD")}
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Updating DEPEND
make[1]: [Makefile:244: dep] Error 127 (ignored)
make[1]: [Makefile:245: dep] Error 127 (ignored)
make[1]: [Makefile:246: dep] Error 127 (ignored)
make[1]: [Makefile:247: dep] Error 127 (ignored)
Compiling auto_general.c
Compiling calculate_cooling_time.c
Compiling calculate_dust_temperature.c
Compiling calculate_gamma.c
Compiling calculate_pressure.c
Compiling calculate_temperature.c
Compiling calc_temp1d_cloudy_g.F
Compiling calc_temp_cloudy_g.F
Compiling calc_tdust_1d_g.F
Compiling calc_tdust_3d_g.F
Compiling cool1d_cloudy_g.F
Compiling cool1d_cloudy_old_tables_g.F
Compiling cool1d_multi_g.F
Compiling cool_multi_time_g.F
Compiling dynamic_api.c
Compiling grackle_units.c
Compiling index_helper.c
Compiling initialize_chemistry_data.c
Compiling initialize_cloudy_data.c
Compiling initialize_UVbackground_data.c
Compiling interpolators_g.F
Compiling set_default_chemistry_parameters.c
Compiling solve_chemistry.c
Compiling solve_rate_cool_g.F
Compiling update_UVbackground_rates.c
Compiling rate_functions.c
Compiling initialize_rates.c
Compiling utils.c

Linking
Success!
make[1]: Leaving directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'

無事成功!

make install

$ make install
make -C clib
make[1]: Entering directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 28, in <lambda>
    "git-branch" : lambda: query_git("git rev-parse --abbrev-ref HEAD"),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Traceback (most recent call last):
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 37, in <module>
    result = choices[args.directive]()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 29, in <lambda>
    "git-revision" : lambda: query_git("git rev-parse HEAD")}
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 22, in query_git
    git_is_installed = _call('command -v git > /dev/null 2>&1 && '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daisuke/grackle-grackle-3.3.0/src/clib/./../../config/query_version.py", line 17, in _call
    rslt = subprocess.check_output(command, shell = True, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'command -v git > /dev/null 2>&1 && git status > /dev/null 2>&1 && echo "1"' returned non-zero exit status 128.
Updating DEPEND
make[1]: [Makefile:244: dep] Error 127 (ignored)
make[1]: [Makefile:245: dep] Error 127 (ignored)
make[1]: [Makefile:246: dep] Error 127 (ignored)
make[1]: [Makefile:247: dep] Error 127 (ignored)
Compiling auto_general.c

Linking
Success!
make[1]: Leaving directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
make -C clib  install
make[1]: Entering directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'
Installing grackle header files to /home/daisuke/lib/include.
Installing grackle library files to /home/daisuke/lib/lib.
libtool --mode=install install -c libgrackle.la /home/daisuke/lib/lib/libgrackle.la
libtool: install: install -c .libs/libgrackle-3.3.0.so /home/daisuke/lib/lib/libgrackle-3.3.0.so
libtool: install: (cd /home/daisuke/lib/lib && { ln -s -f libgrackle-3.3.0.so libgrackle.so || { rm -f libgrackle.so && ln -s libgrackle-3.3.0.so libgrackle.so; }; })
libtool: install: install -c .libs/libgrackle.lai /home/daisuke/lib/lib/libgrackle.la
libtool: install: install -c .libs/libgrackle.a /home/daisuke/lib/lib/libgrackle.a
libtool: install: chmod 644 /home/daisuke/lib/lib/libgrackle.a
libtool: install: ranlib /home/daisuke/lib/lib/libgrackle.a
libtool: finish: PATH="/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /home/daisuke/lib/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/daisuke/lib/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[1]: Leaving directory '/home/daisuke/grackle-grackle-3.3.0/src/clib'

一応、「Success」を確認。

Note

[補足]Makefileの修正が必要な場合

次のように変更すると良い。

FLAGS=-std=c99

build:
        $(MAKE) -C clib CFLAGS=$(FLAGS)
build-python:
        $(MAKE) -C python build
clean:
        $(MAKE) -C clib clean
        $(MAKE) -C python clean
install: build
        $(MAKE) -C clib install
test: build build-python
        $(MAKE) -C python test

あと2つライブラリを追加する必要があるが、次のページに書く:24/09/10

参考文献