<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Can you try the following? </div><div class=""><br class=""></div><div class="">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:</div><div class=""><br class=""></div><div class="">$ make all V=1</div><div class="">$ make check</div><div class=""><br class=""></div>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.<div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class=""></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Oct 2, 2021, at 09:33, Jacob Faibussowitsch <<a href="mailto:jacob.fai@gmail.com" class="">jacob.fai@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Unrelated to the below (still reading the configure.log) but it looks like there’s a bug in the cuda compiler search:<div class=""><br class=""></div><div class=""><div class="">TESTING: checkCUDACompiler from config.setCompilers(/builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/config/BuildSystem/config/setCompilers.py:862)</div><div class="">  Locate a functional CUDA compiler</div><div class="">Checking for program /usr/bin/nvcc...not found</div><div class="">Checking for program /bin/nvcc...not found</div><div class="">Checking for program /usr/sbin/nvcc...not found</div><div class="">Checking for program /sbin/nvcc...not found</div><div class="">Checking for program /usr/local/sbin/nvcc...not found</div><div class="">Checking for program /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not found</div><div class="">Checking for program /Developer/NVIDIA/CUDA-6.5/bin/nvcc...not found</div><div class="">Checking for program /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not found</div><div class="">  Unable to find programs ['nvcc'] providing listing of the specific search path</div><div class="">      Warning accessing /Developer/NVIDIA/CUDA-6.5/bin gives errors: can only concatenate str (not "builtin_function_or_method") to str</div><div class="">Checking for program /usr/local/cuda/bin/nvcc...not found</div><div class="">Checking for program /builddir/build/BUILD/petsc-3.16.0/petsc-3.16.0/lib/petsc/bin/win32fe/nvcc...not found</div><div class="">  Unable to find programs ['nvcc'] providing listing of the specific search path</div><div class="">      Warning accessing /usr/local/cuda/bin gives errors: can only concatenate str (not "builtin_function_or_method") to str</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Best regards,<br class=""><br class="">Jacob Faibussowitsch<br class="">(Jacob Fai - booss - oh - vitch)<br class=""></div></div></div>
</div>
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On Oct 2, 2021, at 08:18, Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" class="">stefano.zampini@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">I knew this was coming....<div dir="auto" class=""><a href="https://gitlab.com/petsc/petsc/-/issues/997" class="">https://gitlab.com/petsc/petsc/-/issues/997</a><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Sab 2 Ott 2021, 15:48 Antonio T. sagitter <<a href="mailto:sagitter@fedoraproject.org" class="">sagitter@fedoraproject.org</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all.<br class="">
<br class="">
In PETSc-3.16.0, the linker is not working because of these undefined <br class="">
references (see <a href="https://pastebin.com/izGTfmMp" rel="noreferrer noreferrer" target="_blank" class="">https://pastebin.com/izGTfmMp</a>):<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `operator <br class="">
delete(void*, unsigned long)'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `__cxa_rethrow'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`__gxx_personality_v0'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `operator <br class="">
new(unsigned long)'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`std::__throw_bad_alloc()'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`std::terminate()'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`std::__throw_bad_array_new_length()'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to `typeinfo <br class="">
for std::exception'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`__cxa_begin_catch'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`__cxa_end_catch'<br class="">
<br class="">
/usr/bin/ld: x86_64/lib/libpetsc.so: undefined reference to <br class="">
`std::__throw_length_error(char const*)'<br class="">
<br class="">
collect2: error: ld returned 1 exit status<br class="">
<br class="">
There are also<br class="">
<br class="">
$ ldd -r build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so'<br class="">
Start: shell<br class="">
<br class="">
        linux-vdso.so.1 (0x00007fffbf347000)<br class="">
<br class="">
        libsuperlu.so.5.2 => /lib64/libsuperlu.so.5.2 (0x00007f00dad0c000)<br class="">
<br class="">
        libflexiblas.so.3 => /lib64/libflexiblas.so.3 (0x00007f00da95a000)<br class="">
<br class="">
        libcgns.so.4.2 => /lib64/libcgns.so.4.2 (0x00007f00da873000)<br class="">
<br class="">
        libhdf5.so.103 => /lib64/libhdf5.so.103 (0x00007f00da4d8000)<br class="">
<br class="">
        libm.so.6 => /lib64/libm.so.6 (0x00007f00da3f8000)<br class="">
<br class="">
        libX11.so.6 => /lib64/libX11.so.6 (0x00007f00da2ae000)<br class="">
<br class="">
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f00da294000)<br class="">
<br class="">
        libc.so.6 => /lib64/libc.so.6 (0x00007f00da08b000)<br class="">
<br class="">
        libgfortran.so.5 => /lib64/libgfortran.so.5 (0x00007f00d9dde000)<br class="">
<br class="">
        libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f00d9d94000)<br class="">
<br class="">
        /lib64/ld-linux-x86-64.so.2 (0x00007f00dc18b000)<br class="">
<br class="">
        libsz.so.2 => /lib64/libsz.so.2 (0x00007f00d9d8a000)<br class="">
<br class="">
        libz.so.1 => /lib64/libz.so.1 (0x00007f00d9d6e000)<br class="">
<br class="">
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f00d9d43000)<br class="">
<br class="">
        libXau.so.6 => /lib64/libXau.so.6 (0x00007f00d9d3d000)<br class="">
<br class="">
undefined symbol: _ZTISt9exception <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: __gxx_personality_v0 <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _ZdlPvm <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: __cxa_rethrow <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _Znwm <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _ZSt17__throw_bad_allocv <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _ZSt9terminatev <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _ZSt28__throw_bad_array_new_lengthv <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: __cxa_begin_catch <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: __cxa_end_catch <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
undefined symbol: _ZSt20__throw_length_errorPKc <br class="">
(build/BUILD/petsc-3.16.0/petsc-3.16.0/x86_64/lib/libpetsc.so)<br class="">
<br class="">
<br class="">
<br class="">
I'm attaching configure.log and make.log<br class="">
<br class="">
--<br class="">
---<br class="">
Antonio Trande<br class="">
Fedora Project<br class="">
mailto: <a href="mailto:sagitter@fedoraproject.org" target="_blank" rel="noreferrer" class="">sagitter@fedoraproject.org</a><br class="">
GPG key: 0x29FBC85D7A51CC2F<br class="">
GPG key server: <a href="https://keyserver1.pgp.com/" rel="noreferrer noreferrer" target="_blank" class="">https://keyserver1.pgp.com/</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></body></html>