Unable to install umfpack, persistant makefile error

/usr/bin/ld: cannot find -lsuitesparseconfig
collect2: error: ld returned 1 exit status
make[4]: *** [CMakeFiles/mongoose_dylib.dir/build.make:504: lib/libmongoose.so.2.0.4] Error 1
make[4]: Leaving directory ‘/mnt/c/users/hp/SuiteSparse-5.8.1/Mongoose/build’
make[3]: *** [CMakeFiles/Makefile2:156: CMakeFiles/mongoose_dylib.dir/all] Error 2
make[3]: Leaving directory ‘/mnt/c/users/hp/SuiteSparse-5.8.1/Mongoose/build’
make[2]: *** [Makefile:141: all] Error 2
make[2]: Leaving directory ‘/mnt/c/users/hp/SuiteSparse-5.8.1/Mongoose/build’
make[1]: *** [Makefile:30: install] Error 2
make[1]: Leaving directory ‘/mnt/c/users/hp/SuiteSparse-5.8.1/Mongoose’
make: *** [Makefile:49: install] Error 2

Hello tamalika,

I’m sure we can get it to work but could you please provide some additional information:

  • Which operating system are you using?
  • Did you follow the build instructions?
  • Have you tried using an umfpack version provided by your distribution (e.g. libumfpack5 in Ubuntu 20.04)?
  • When exactly did the error occur?

Thanks for the reply Mr. Schmoelder

  • I am using Ubuntu 20.04 in Windows 10 OS.
    -Yes we did follow these same set of instructions, those were quite helpful for the other packages. But I could not resolve the this error with UMFPACK. All others are installed properly.
    -No, I have not. I will surely try it then.
  • After unzipping the SuiteSparse while executing
    make install INSTALL="/Libs/suitesparse" CHOLMOD_CONFIG=-DNPARTITION
    I encountered with this error.

Unfortunately I could not reproduce your issue. I followed the instructions and it compiled without errors.

I think the cause might be that you didn’t specify the correct installation location. <ROOT> in the installation instructions does not refer to the root directory of your OS (/) but to the root of the CADET installation. This could be for example ~/cadet_root/libs/suitesparse

Hi,

I am replying to this thread since I also get exactly the same error during the installation process of CADET provided in the build instructions. Specifically, I am trying to build CADET in docker.
All packages in the build instructions except SuitSparse have been built successfully.

I have also found a potential solution of the error here, but unfortunately it did not work for me.

For reproducibility, here is the full code

docker run -it --name cadet-ubuntu ubuntu:latest /bin/bash

# Setup
mkdir ~/build
cd ~/build
apt-get update
apt-get install wget unzip build-essential cmake

# HDF5
apt-get install libhdf5-dev

# Sundials
wget  https://github.com/LLNL/sundials/archive/refs/tags/v3.2.1.zip
unzip v3.2.1.zip
mkdir sundialsbuild
cd sundialsbuild
cmake -DCMAKE_INSTALL_PREFIX="~/build/Libs/sundials" -DEXAMPLES_ENABLE=OFF -DOPENMP_ENABLE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC ../sundials-3.2.1/
make install
cd ..
rm -rf sundialsbuild
rm v3.2.1.zip

# Lapack
apt-get install liblapack3 liblapack-dev libblas3 libblas-dev

# SuperLU
apt-get install gfortran
wget https://github.com/xiaoyeli/superlu/archive/refs/tags/v5.2.1.zip
unzip v5.2.1.zip
mkdir superlubuild
cd superlubuild
cmake -DCMAKE_INSTALL_PREFIX="~/build/Libs/superlu" -Denable_complex=OFF -Denable_complex16=OFF -Denable_blaslib=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release ../superlu-5.2.1/
make install
cd ..
rm -rf superlubuild
rm v5.2.1.zip 

# SuitSparse
wget https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v5.10.1.zip
unzip v5.10.1.zip
cd SuiteSparse-5.10.1
make install INSTALL="~/build/Libs/suitesparse" CHOLMOD_CONFIG=-DNPARTITION
cd ..
rm v5.10.1.zip

# Cadet
wget https://github.com/modsim/CADET/archive/refs/tags/v4.2.0.zip
unzip v4.2.0.zip
mkdir code
mv CADET-4.2.0/* code
mkdir build
cd build
export SUNDIALS_ROOT=~/build/Libs/sundials
export SUPERLU_ROOT=~/build/Libs/superlu
export UMFPACK_ROOT=~/build/Libs/suitesparse
cmake -DCMAKE_INSTALL_PREFIX="~/build/cadet" ../code/
make
make install

Just as in info, CADET is built anyways, i.e. regardless of the error that @tamalika_kar and I are experiencing. But if then CADET is tested, it returns an error which might arise from an incorrect installation of SuiteSparse.

Any help appreciated!

Kind regards,
Marco

Hi Marco,

No solution from my side, but I wanted to let you know that either SuperLU or UMFPACK / SuiteSparse suffices. That is, you do not need both to get 2D model support. If SuperLU works, you’re good.

We haven’t yet figured out whether SuperLU or UMFPACK performs better, so we cannot recommend one over the other.

Best,
Sam

Hi Sam,

Thanks for your reply. I tried to install CADET without relying on SuitSparse (that is, in the docker script I shared above, I removed all SuitSparse commands). Following this tutorial then, when I try to inspect the variable data after successfully running the model (data = model.run()), I get the following error

CompletedProcess(args=['/root/build/cadet/bin/cadet-cli', 'model.h5'], returncode=127, stdout=b'', stderr=b'/root/build/cadet/bin/cadet-cli: error while loading shared libraries: libcadet.so.0: cannot open shared object file: No such file or directory\n')

It seems that when I try to load the data variable, there is a missing library that is not found. Do you have any hint on what the problem might be?

Kind regards,
Marco

I reply here since I have found the solution to my own problem, which is to export also the path of the CADET library after having built it and installed it. So the final docker file should look like this:

docker run -it --name cadet-ubuntu ubuntu:latest /bin/bash

# Setup
mkdir ~/build
cd ~/build
apt-get update
apt-get install wget unzip build-essential cmake

# HDF5
apt-get install libhdf5-dev

# Sundials
wget  https://github.com/LLNL/sundials/archive/refs/tags/v3.2.1.zip
unzip v3.2.1.zip
mkdir sundialsbuild
cd sundialsbuild
cmake -DCMAKE_INSTALL_PREFIX="~/build/Libs/sundials" -DEXAMPLES_ENABLE=OFF -DOPENMP_ENABLE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC ../sundials-3.2.1/
make install
cd ..
rm -rf sundialsbuild
rm v3.2.1.zip

# Lapack
apt-get install liblapack3 liblapack-dev libblas3 libblas-dev

# SuperLU
apt-get install gfortran
wget https://github.com/xiaoyeli/superlu/archive/refs/tags/v5.2.1.zip
unzip v5.2.1.zip
mkdir superlubuild
cd superlubuild
cmake -DCMAKE_INSTALL_PREFIX="~/build/Libs/superlu" -Denable_complex=OFF -Denable_complex16=OFF -Denable_blaslib=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release ../superlu-5.2.1/
make install
cd ..
rm -rf superlubuild
rm v5.2.1.zip 

# CADET
wget https://github.com/modsim/CADET/archive/refs/tags/v4.2.0.zip
unzip v4.2.0.zip
mkdir code
mv CADET-4.2.0/* code
mkdir build
cd build
export SUNDIALS_ROOT=~/build/Libs/sundials
export SUPERLU_ROOT=~/build/Libs/superlu
cmake -DCMAKE_INSTALL_PREFIX="~/build/cadet" ../code/
make
make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/build/build/src/libcadet/

Note that I have removed the commands to build and install SuitSparse (since SuperLU is sufficient) and I have added the needed CADET export command in the last line.

Hope it is of any help!

3 Likes

Hey Marco,

good catch, we’re obviously missing a section about environmental variables in our built instructions. I will update them accordingly.
I hope the build process was not too frustrating and you can now enjoy tinkering around with CADET. If you have any further questions, let us know!

Just on a side note, we’re working on publishing the CADET binaries on conda-forge. This hopefully will make the installation process much smother for everyone in the future.

Thanks

Johannes