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