I'm attempting to install ISSM from source on my Ubuntu 24.04 system. Below are my notes from attempting to build it following the manual. During compilation (see below) I'm seeing an error about an undefined symbol. I'm not sure if I need to configure differently, or if something else is going wrong - the symbol PythonIOSymbol doesn't seem to be defined in ISSM or any of the dependencies so it is not obvious what is missing. Any help appreciated!
Initial setup:
mkdir -p ~/opt
cd ~/opt
git clone https://github.com/ISSMteam/ISSM
export ISSM_DIR=~/opt/ISSM
source $ISSM_DIR/etc/environment.sh
External package installation:
# autotools
cd $ISSM_DIR/externalpackages/autotools
./install-linux.sh
# cmake
cd $ISSM_DIR/externalpackages/cmake
./install.sh
# petsc
cd $ISSM_DIR/externalpackages/petsc
./install-3.22-linux.sh
# triangle
cd $ISSM_DIR/externalpackages/triangle
./install-linux.sh
#miqn3
cd $ISSM_DIR/externalpackages/m1qn3
./install-linux.sh
Source the environment after installing packages (note: docs actually say to do this after installing each package! Keep this in mind in case it is the reason things are broken later)
source $ISSM_DIR/etc/environment.sh
ISSM compilation:
cd $ISSM_DIR
autoreconf -ivf
Create a configuration script called configure.sh
in $ISSM_DIR
./configure \
--prefix="${ISSM_DIR}" \
--with-python-version=3.11 \
--with-python-dir="/usr" \
--with-python-numpy-dir="${HOME}/Desktop/code/.venv/lib/python3.11/site-packages/numpy" \
--with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/13 -lgfortran" \
--with-mpi-include="${ISSM_DIR}/externalpackages/petsc/install/include" \
--with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
--with-metis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-parmetis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-blas-lapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-scalapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/install" \
--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install" \
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install"
Notes:
Before running the configuration script, install python dev package (also from the deadsnakes ppa) if you haven't already:
sudo apt install python3.11-dev
run the configuration script
bash configure.sh
Build and install ISSM:
cd $ISSM_DIR
make
make install
The following error occurs after running make
...
Making all in python
make[4]: Entering directory '/home/ana/opt/ISSM/src/wrappers/python'
CXX io/libISSMPython_la-CheckNumPythonArguments.lo
CXX io/libISSMPython_la-FetchPythonData.lo
CXX io/libISSMPython_la-WritePythonData.lo
CXXLD libISSMPython.la
/usr/bin/ld: ./io/.libs/libISSMPython_la-FetchPythonData.o: in function `FetchChacoData(int*, int**, int**, float**, _object*, _object*)':
/home/ana/opt/ISSM/src/wrappers/python/./io/FetchPythonData.cpp:1222:(.text+0x16b): undefined reference to `PythonIOSymbol'
/usr/bin/ld: ./io/.libs/libISSMPython_la-FetchPythonData.o: relocation R_X86_64_PC32 against undefined hidden symbol `PythonIOSymbol' can not be used when making a shared object
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1183: libISSMPython.la] Error 1
make[4]: Leaving directory '/home/ana/opt/ISSM/src/wrappers/python'
make[3]: *** [Makefile:466: all-recursive] Error 1
make[3]: Leaving directory '/home/ana/opt/ISSM/src/wrappers'
make[2]: *** [Makefile:464: all-recursive] Error 1
make[2]: Leaving directory '/home/ana/opt/ISSM/src'
make[1]: *** [Makefile:519: all-recursive] Error 1
make[1]: Leaving directory '/home/ana/opt/ISSM'
make: *** [Makefile:451: all] Error 2