Issue with missing symbolsin LAPACK when compiling deal.II using candi

20 views
Skip to first unread message

Guy Moebs

unread,
Sep 26, 2024, 8:42:20 AM9/26/24
to deal.II User Group
Hello,
I'm trying to install aspect on a linux cluster for some of our users.
I use lapack and blas compiled from sources. I test them with a small example and it's  working.

During deall.II v 9.5.2 compilation, after some time, lots of errors occur, for example :

     checks:
      - "Performing Test LAPACK_SYMBOL_CHECK"
    directories:
      source: "/opt/software/glicid/outils/candi-9.6.0/tmp/build/deal.II-v9.5.2/CMakeFiles/CMakeScratch/TryCompile-Ciimnh"
      binary: "/opt/software/glicid/outils/candi-9.6.0/tmp/build/deal.II-v9.5.2/CMakeFiles/CMakeScratch/TryCompile-Ciimnh"
    cmakeVariables:
      CMAKE_C_FLAGS: ""
      CMAKE_C_FLAGS_RELEASE: ""
      CMAKE_EXE_LINKER_FLAGS: ""
      CMAKE_MODULE_PATH: "/opt/software/glicid/outils/candi-9.6.0/tmp/unpack/deal.II-v9.5.2/cmake/modules/"
    buildResult:
      variable: "LAPACK_SYMBOL_CHECK"
      cached: true
      stdout: |
        Change Dir: /opt/software/glicid/outils/candi-9.6.0/tmp/build/deal.II-v9.5.2/CMakeFiles/CMakeScratch/TryCompile-Ciimnh

        Run Build Command(s):/opt/software/glicid/outils/candi-9.6.0/cmake-3.26.4-linux-x86_64/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_96882/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_96882.dir/build.make CMakeFiles/cmTC_96882.dir/build
        gmake[1] : on entre dans le répertoire « /opt/software/glicid/outils/candi-9.6.0/tmp/build/deal.II-v9.5.2/CMakeFiles/CMakeScratch/TryCompile-Ciimnh »
        Building C object CMakeFiles/cmTC_96882.dir/src.c.o
        /opt/software/glicid/compilateurs/gcc-13.1.0/Installed/bin/gcc -DLAPACK_SYMBOL_CHECK   -o CMakeFiles/cmTC_96882.dir/src.c.o -c /opt/software/glicid/outils/candi-9.6.0/tmp/build/deal.II-v9.5.2/CMakeFiles/CMakeScratch/TryCompile-Ciimnh/src.c
        Linking C executable cmTC_96882
        /opt/software/glicid/outils/candi-9.6.0/cmake-3.26.4-linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_96882.dir/link.txt --verbose=1
        /opt/software/glicid/compilateurs/gcc-13.1.0/Installed/bin/gcc CMakeFiles/cmTC_96882.dir/src.c.o -o cmTC_96882  /opt/software/glicid/biblio_scientifiques/lapack-3.12.0_gnu/lib/liblapack.a /opt/software/glicid/biblio_scientifiques/lapack-3.12.0_gnu/lib/l     ibblas.a
        /opt/software/glicid/biblio_scientifiques/lapack-3.12.0_gnu/lib/liblapack.a(sgelsd.o) : Dans la fonction « sgelsd_ » :
        sgelsd.f:(.text+0x215) : référence indéfinie vers « logf »
        /opt/software/glicid/biblio_scientifiques/lapack-3.12.0_gnu/lib/liblapack.a(sgesvd.o) : Dans la fonction « sgesvd_ » :
        sgesvd.f:(.text+0x9e7) : référence indéfinie vers « _gfortran_concat_string »
        sgesvd.f:(.text+0xc39) : référence indéfinie vers « _gfortran_concat_string »

It seems to me that a gfortran libray is missing at the link step, but where and what should I put something like "-lgfortran". Could someone give me a hint ?
I put the CMakeConfigureLog.yaml file in attachment.

Regards,
   Guy.


CMakeConfigureLog.yaml.gz

Wolfgang Bangerth

unread,
Sep 26, 2024, 2:00:52 PM9/26/24
to dea...@googlegroups.com

On 9/26/24 06:42, Guy Moebs wrote:
>
> It seems to me that a gfortran libray is missing at the link step, but
> where and what should I put something like "-lgfortran". Could someone
> give me a hint ?

Guy:
You could probably do
export LDFLAGS="-lgfortran"
before calling cmake, but a better solution would be to install LAPACK
as a shared library that stores what other libraries it depends on
internally, rather than expecting you to do this yourself.

Best
W.
Reply all
Reply to author
Forward
0 new messages