# cmake error ("-lsocket not found") for Paraview 5.6.3 from OpenFOAM 8 installation on linux

**URL:** https://discourse.paraview.org/t/cmake-error-lsocket-not-found-for-paraview-5-6-3-from-openfoam-8-installation-on-linux/5266
**Category:** ParaView Support
**Created:** [September 4, 2020, 8:02am UTC](https://discourse.paraview.org/t/cmake-error-lsocket-not-found-for-paraview-5-6-3-from-openfoam-8-installation-on-linux/5266 "2020-09-04T08:02:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Guy](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/9e8a1a/32.png) [@Guy](https://discourse.paraview.org/u/Guy)
#### Post date: [September 4, 2020, 8:02am UTC](https://discourse.paraview.org/t/cmake-error-lsocket-not-found-for-paraview-5-6-3-from-openfoam-8-installation-on-linux/5266/1 "2020-09-04T08:02:30Z")

</div>

Hello,  
For one of our users I have to install OpenFOAM-8 on a linux cluster running centOS 7.8. This software needs third party’s dependances like Paraview 5.6.3 that are downloaded and installed within OpenFOAM by scripts ( ./makeParaView here for the compilation).  
It uses several tools like gcc(10.1 installed), python (3.7.4 installed), cmake (3.18.2 installed), to proceed.  
In the output of MakeParaView, the error message is

```
Determining if the function getsockname exists in the socket failed with the following output:
Change Dir: <DIR>/OpenFOAM/ThirdParty-8/build/linux64Gcc/ParaView-5.6.3/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_63115/fast && /usr/bin/gmake -f CMakeFiles/cmTC_63115.dir/build.make CMakeFiles/cmTC_63115.dir/build
gmake[1] : entering directory «<DIR>/OpenFOAM/ThirdParty-8/build/linux64Gcc/ParaView-5.6.3/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_63115.dir/CheckFunctionExists.c.o
gcc -DCHECK_FUNCTION_EXISTS=getsockname -o CMakeFiles/cmTC_63115.dir/CheckFunctionExists.c.o -c <DIR>/cmake/3.18.2/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_63115
<DIR>/cmake/3.18.2/bin/cmake -E cmake_link_script CMakeFiles/cmTC_63115.dir/link.txt --verbose=1
gcc -DCHECK_FUNCTION_EXISTS=getsockname -Wl,-lc -Wl,-lc CMakeFiles/cmTC_63115.dir/CheckFunctionExists.c.o -o cmTC_63115 -lsocket 
/usr/bin/ld : -lsocket not found
collect2: error: ld returns error code 1
gmake[1]: *** [cmTC_63115] Error 1
gmake[1] : leaving directory «<DIR>/OpenFOAM/ThirdParty-8/build/linux64Gcc/ParaView-5.6.3/CMakeFiles/CMakeTmp »
gmake: *** [cmTC_63115/fast] Error 2

```

N.B. : We are not running anything related to BSD or FreeBSD, so I do not understand why I need -lsocket.  
The different tools (gcc, cmake, python, …) used here are compiled from source directly on the cluster, no binary installed.

Thank you for your help.  
Regards  
Guy.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 4, 2020, 1:02pm UTC](https://discourse.paraview.org/t/cmake-error-lsocket-not-found-for-paraview-5-6-3-from-openfoam-8-installation-on-linux/5266/2 "2020-09-04T13:02:17Z")

</div>

makeParaView is an OpenFOAM created script, you may have more luck with them to understand what is going on.

Alternatively, you can try building ParaView yourself.
