Skip to content

Compilation with GCC 8.2.0 fails #3798

@samfux84

Description

@samfux84

Hi,

I am trying to build OPM-common (2023.10) on our HPC cluster. I use the following dependencies (all built from source code):

  • GCC 8.2.0
  • Dune 2.9.0
  • OpenMPI 4.1.4
  • Zoltan 3.901
  • OpenBLAS 0.3.15
  • Python 3.10.4
  • Suite-Sparse 5.10.1
  • BOOST 1.74.0
  • CMake 3.25.0

I follow the installation instructions and created the build directory, was running ccmake .. to change some variables (to disable the addition of -march=native, as we have different node types in the cluster). Then I was running make -j 8 to build the software in parallel. At 40% the compilation failed with the following error:

[ 40%] Building CXX object CMakeFiles/opmcommon.dir/src/opm/input/eclipse/Schedule/Network/Node.cpp.o
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DFMT_HEADER_ONLY -DHAVE_CONFIG_H=1 -I/scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/build -I/scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/external/cjson -I/scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/build/include -I/scratch/tmp.37674213.sfux/opm-common-release-2023.10-final -isystem /scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/external/fmtlib/include -isystem /cluster/apps/gcc-8.2.0/boost-1.74.0-bwdibdtazuvem2m7bwkiifvh7b3xvd5y/include -pipe -Wall -Wextra -Wshadow -fopenmp -pthread -O3 -DNDEBUG -ftree-vectorize -march=core-avx2 -mavx2 -UNDEBUG -fPIC -fopenmp -std=c++17 -MD -MT MakeFiles/opmcommon.dir/src/opm/input/eclipse/Schedule/Network/Node.cpp.o -MF  MakeFiles/opmcommon.dir/src/opm/input/eclipse/Schedule/Network/Node.cpp.o.d -o CMakeFiles/opmcommon.dir/src/opm/input/eclipse/Schedule/Network/Node.cpp.o -c /scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/src/opm/input/eclipse/Schedule/Network/Node.cpp
In file included from /cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/include/c++/8.2.0/memory:80,
                 from /scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/src/opm/input/eclipse/Schedule/KeywordHandlers.cpp:22:
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/include/c++/8.2.0/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = Opm::SegmentMatcher::Impl]’:
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/include/c++/8.2.0/bits/unique_ptr.h:274:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = Opm::SegmentMatcher::Impl; _Dp = std::default_delete<Opm::SegmentMatcher::Impl>]’
/scratch/tmp.37674213.sfux/opm-common-release-2023.10-final/opm/input/eclipse/Schedule/MSW/SegmentMatcher.hpp:351:34:   required from here
/cluster/spack/apps/linux-centos7-x86_64/gcc-4.8.5/gcc-8.2.0-6xqov2fhvbmehix42slain67vprec3fs/include/c++/8.2.0/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘Opm::SegmentMatcher::Impl’
  static_assert(sizeof(_Tp)>0,
                ^~~~~~~~~~~

I started searching the internet for this error message and found:

https://stackoverflow.com/questions/20934195/invalid-application-of-sizeof-to-incomplete-type-created-classes

which seems to discuss a similar error. Is this a known problem? And do you have any idea on how to resolve this error?

Any help is appreciated.

Best regards

Sam

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