Skip to content

Link error when building pnetcdf 0.13.0 or 0.14.0 with intel 2025.0.0 compilers on linux #157

@bourdin

Description

@bourdin

I am having the following error when trying to build v1.13.0 or checkpoint.1.14.0 with the most recent intel compilers and mvapich2:

$ ./configure --with-mpi=$MPI_ROOT
:
:
------------------------------------------------------------------------------

  PnetCDF Version 1.14.0

  Features:  Build static libraries                      - yes
             Build shared libraries                      - yes
             Build Fortran APIs                          - yes
             Build C++ APIs                              - yes

  Compilers: MPICC       = /mnt/bbnfs/sw/spack/opt/spack/linux-rocky9-x86_64_v3/oneapi-2025.0.0/mvapich2-2.3.7-1-fceikn42xh6pzcjzczg63nilbh6l73ss/bin/mpicc
             MPICXX      = /mnt/bbnfs/sw/spack/opt/spack/linux-rocky9-x86_64_v3/oneapi-2025.0.0/mvapich2-2.3.7-1-fceikn42xh6pzcjzczg63nilbh6l73ss/bin/mpicxx
             MPIF77      = /mnt/bbnfs/sw/spack/opt/spack/linux-rocky9-x86_64_v3/oneapi-2025.0.0/mvapich2-2.3.7-1-fceikn42xh6pzcjzczg63nilbh6l73ss/bin/mpif77
             MPIF90      = /mnt/bbnfs/sw/spack/opt/spack/linux-rocky9-x86_64_v3/oneapi-2025.0.0/mvapich2-2.3.7-1-fceikn42xh6pzcjzczg63nilbh6l73ss/bin/mpif90
             CFLAGS      = -O2
             CXXFLAGS    = -O2
             FFLAGS      = -g
             FCFLAGS     = -g
             SEQ_CC      = /usr/bin/gcc

$ make -j 8 all
:
:
 CCLD     ncmpigen
/usr/bin/ld: ../../../src/libs/.libs/[libpnetcdf.so](http://libpnetcdf.so/): undefined reference to `std::ios_base_library_init()'
icx: error: linker command failed with exit code 1 (use -v to see invocation)

Changing SEQ_CC for g++, icx, or icpx does not make a difference and neither does switching to the intel MPI. Compiling with gcc and mvapich2 works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions