Can you try the following? In $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables there are two variables, PETSC_EXTERNAL_LIB_BASIC and PETSC_WITH_EXTERNAL_LIB. Append -lstdc++ to both of them and re-run your make command with verbose output:
$ make all V=1 $ make check P.S. There is no longer a need to set -std=[c/gnu]++17 in your own flags; configure will detect up to c++17. For gnu-ish compilers (gcc/clang) it will try to use gnu extensions — in fact if you search for ‘checkCxxDialect' in you configure.log, you’ll see it appropriately selects gnu++17. Best regards, Jacob Faibussowitsch (Jacob Fai - booss - oh - vitch) > On Oct 2, 2021, at 09:33, Jacob Faibussowitsch <[email protected]> wrote: > > Unrelated to the below (still reading the configure.log) but it looks like > there’s a bug in the cuda compiler search: > > TESTING: checkCUDACompiler from > config.setCompilers(/builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/config/BuildSystem/config/setCompilers.py:862) > Locate a functional CUDA compiler > Checking for program /usr/bin/nvcc...not found > Checking for program /bin/nvcc...not found > Checking for program /usr/sbin/nvcc...not found > Checking for program /sbin/nvcc...not found > Checking for program /usr/local/sbin/nvcc...not found > Checking for program > /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not > found > Checking for program /Developer/NVIDIA/CUDA-6.5/bin/nvcc...not found > Checking for program > /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not > found > Unable to find programs ['nvcc'] providing listing of the specific search > path > Warning accessing /Developer/NVIDIA/CUDA-6.5/bin gives errors: can only > concatenate str (not "builtin_function_or_method") to str > Checking for program /usr/local/cuda/bin/nvcc...not found > Checking for program > /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not > found > Unable to find programs ['nvcc'] providing listing of the specific search > path > Warning accessing /usr/local/cuda/bin gives errors: can only > concatenate str (not "builtin_function_or_method") to str > > > Best regards, > > Jacob Faibussowitsch > (Jacob Fai - booss - oh - vitch) > >> On Oct 2, 2021, at 08:18, Stefano Zampini <[email protected] >> <mailto:[email protected]>> wrote: >> >> I knew this was coming.... >> https://gitlab.com/petsc/petsc/-/issues/997 >> <https://gitlab.com/petsc/petsc/-/issues/997> >> >> Il Sab 2 Ott 2021, 15:48 Antonio T. sagitter <[email protected] >> <mailto:[email protected]>> ha scritto: >> Hi all. >> >> In PETSc-3.16.0, the linker is not working because of these undefined >> references (see https://pastebin.com/izGTfmMp >> <https://pastebin.com/izGTfmMp>): >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `operator >> delete(void*, unsigned long)' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `__cxa_rethrow' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `__gxx_personality_v0' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `operator >> new(unsigned long)' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `std::__throw_bad_alloc()' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `std::terminate()' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `std::__throw_bad_array_new_length()' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `typeinfo >> for std::exception' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `__cxa_begin_catch' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `__cxa_end_catch' >> >> /usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to >> `std::__throw_length_error(char const*)' >> >> collect2: error: ld returned 1 exit status >> >> There are also >> >> $ ldd -r build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so' >> Start: shell >> >> linux-vdso.so.1 (0x00007fffbf347000) >> >> libsuperlu.so.5.2 => /lib64/libsuperlu.so.5.2 (0x00007f00dad0c000) >> >> libflexiblas.so.3 => /lib64/libflexiblas.so.3 (0x00007f00da95a000) >> >> libcgns.so.4.2 => /lib64/libcgns.so.4.2 (0x00007f00da873000) >> >> libhdf5.so.103 => /lib64/libhdf5.so.103 (0x00007f00da4d8000) >> >> libm.so.6 => /lib64/libm.so.6 (0x00007f00da3f8000) >> >> libX11.so.6 => /lib64/libX11.so.6 (0x00007f00da2ae000) >> >> libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f00da294000) >> >> libc.so.6 => /lib64/libc.so.6 (0x00007f00da08b000) >> >> libgfortran.so.5 => /lib64/libgfortran.so.5 (0x00007f00d9dde000) >> >> libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f00d9d94000) >> >> /lib64/ld-linux-x86-64.so.2 (0x00007f00dc18b000) >> >> libsz.so.2 => /lib64/libsz.so.2 (0x00007f00d9d8a000) >> >> libz.so.1 => /lib64/libz.so.1 (0x00007f00d9d6e000) >> >> libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f00d9d43000) >> >> libXau.so.6 => /lib64/libXau.so.6 (0x00007f00d9d3d000) >> >> undefined symbol: _ZTISt9exception >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: __gxx_personality_v0 >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _ZdlPvm >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: __cxa_rethrow >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _Znwm >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _ZSt17__throw_bad_allocv >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _ZSt9terminatev >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _ZSt28__throw_bad_array_new_lengthv >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: __cxa_begin_catch >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: __cxa_end_catch >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> undefined symbol: _ZSt20__throw_length_errorPKc >> (build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so) >> >> >> >> I'm attaching configure.log and make.log >> >> -- >> --- >> Antonio Trande >> Fedora Project >> mailto: [email protected] <mailto:[email protected]> >> GPG key: 0x29FBC85D7A51CC2F >> GPG key server: https://keyserver1.pgp.com/ <https://keyserver1.pgp.com/> >
