[petsc-dev] Configure issue, PETSC_USE_SOCKET_VIEWER not defined

Smith, Barry F. bsmith at mcs.anl.gov
Thu Jul 18 15:27:13 CDT 2019


https://bitbucket.org/petsc/petsc/pull-requests/1889/pr-1834-introduced-an-error-where-socket/diff


> On Jul 18, 2019, at 9:44 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> 
> Barry, my configure log looks pretty much the same as the one Jose sent. 
> 
> The problem seems to be that now PETSc looks for the "socket()" function in -lsocket -lnsl, however in my system I have no libsocket.so (so the configure test fails to link) and using the socket() function does not require linking with any special library.
> 
> $ cat tmp.c
> #include <sys/socket.h>
> int main() {socket(0,0,0);}
> 
> $ gcc tmp.c # no linker error
> 
> $ ldd a.out 
> linux-vdso.so.1 (0x00007fff89873000)
> libc.so.6 => /lib64/libc.so.6 (0x00007f441ed89000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f441ef8f000)
> 
> $ nm a.out | grep socket
>                  U socket@@GLIBC_2.2.5
> 
> On Thu, 18 Jul 2019 at 17:00, Jose E. Roman <jroman at dsic.upv.es> wrote:
> My recent PR#1886 is also related to what Lisandro reports:
>  https://bitbucket.org/petsc/petsc/pull-requests/1886/fix-compiler-warning/diff
> 
> The corresponding configure.log is here:
> http://slepc.upv.es/buildbot/builders/athor-linux-icc-c-complex-int64-mkl/builds/534/steps/Configure%20PETSc/logs/configure.log
> 
> Jose
> 
> 
> 
> > El 18 jul 2019, a las 15:07, Smith, Barry F. via petsc-dev <petsc-dev at mcs.anl.gov> escribió:
> > 
> > 
> >  Lisandro,
> > 
> >    Thanks for letting us know. Could you please send configure.log for your failed case. The code to detect and use the variable is still in the PETSc source so I must have introduced something that makes it no longer function correctly. As soon as I can after getting your configure.log I'll debug and fix.
> > 
> >   Barry
> > 
> > 
> >> On Jul 18, 2019, at 5:21 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> >> 
> >> PETSC_USE_SOCKET_VIEWER is no longer defined in petsconf.h when configuring on my Fedora 30. 
> >> 
> >> I think the problem started in the following commit, the parent of this one seems to be OK.
> >> 
> >> commit 2475b7ca256cea2a4b7cbf2d8babcda14e5fa36e
> >> Author: Barry Smith <bsmith at mcs.anl.gov>
> >> Date:   Sun Jun 30 02:41:52 2019 -0500
> >> 
> >>    Remove testing and inserting into petscconf.h items that are not actually used by PETSc
> >> 
> >>    1) PETSC_HAVE_LIBXXXX - which was rarely used
> >>       be careful with the package libpng and libjpeg since they have lib in the name of the package
> >>    2) various system include files that are never used or always exist: for example stdlib.h
> >>    3) various system functions that are never used or always exist
> >>    4) fixes for requires for MUMPS and SuperLU_DIST when dependent packages are installed or not installed (unrelated to the rest of this pull request)
> >>    5) packages that always exist such as PETSC_HAVE_BLASLAPACK, or are not used by PETSc such as PETSC_HAVE_NETCFD
> >>    6) remove a couple of uses of HAVE_LIB* in the code that were not needed by adjusting the configure code slightly
> >>    7) remove all the #if guards for each entry in petscconf.h since petscconf.h already has a guard and
> >>       the values are never defined else where the extra guards just make the file cluttered
> >> 
> >>    For a build with about 10 external packages this reduced the size of petscconf.h from 1236 lines to 828/4 around 220 entries.
> >> 
> >>    Commit-type: style-fix, cleanup
> >> 
> >>    Reported-by: Jed Brown <jed at jedbrown.org
> >> 
> >> 
> >> -- 
> >> Lisandro Dalcin
> >> ============
> >> Research Scientist
> >> Extreme Computing Research Center (ECRC)
> >> King Abdullah University of Science and Technology (KAUST)
> >> http://ecrc.kaust.edu.sa/
> > 
> 
> 
> 
> -- 
> Lisandro Dalcin
> ============
> Research Scientist
> Extreme Computing Research Center (ECRC)
> King Abdullah University of Science and Technology (KAUST)
> http://ecrc.kaust.edu.sa/



More information about the petsc-dev mailing list