# Why vtkSocketCommunicatorHash is different

**URL:** https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550
**Category:** ParaView Support
**Created:** [June 10, 2020, 8:42am UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550 "2020-06-10T08:42:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [June 10, 2020, 8:42am UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/1 "2020-06-10T08:42:03Z")

</div>

Dear Experts,  
Recently i am try paraview server-client mode, and i build paraview on linux and windows separately,  
but when i connect paraview to server it failed.

I found the vtkSocketCommunicatorHash is different

i confirmed i use exactly the same source code, so i was confused why the hash is different?

This hash value also depend on other things, not only source code version of “vtkSocketCommunicator.cxx”?

Also related to openGL version, Qt, CMake…?

Linux is: Ubuntu 18.04.4 LTS, qt 4.8.9, cmake 3.10.2  
Windows 10: qt 5.10.1, cmake 3.14

Any suggestions?

Thanks and Best Regards,  
sharon

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [June 10, 2020, 12:49pm UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/2 "2020-06-10T12:49:07Z")

</div>

Dear All,  
I think i found the reason it is because the file format on windows and linux is different, which cause cmake calculated different hash code even thought the file content is the same.

So what’s the best practice to keep the same file format on linux?  
my situation is git repo is host on linux machine, and need build paraview both on linux and windows.

Thanks and Best Regards,  
sharon

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 10, 2020, 12:51pm UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/3 "2020-06-10T12:51:10Z")

</div>

what do you mean by the format is different? Are you referring to the line endings ? I’d recommend setting up your git to use unix style line endings on all platforms. This should ensure that the hashes generated as same everywhere.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [June 10, 2020, 12:56pm UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/4 "2020-06-10T12:56:20Z")

</div>

When i use beyond compare the file on linux and windows, i found the content is the same but size is different:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/a/a92aa1d4405aed5f35e088fa9e7ff3e50889d787.png)

So seems may different format,  
You should be right, it may different line endings, how should i keep line endings persistent on different platforms?

---

<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: [June 11, 2020, 3:21am UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/5 "2020-06-11T03:21:22Z")

</div>

How do you recover the sources ? on both os.

---

<div class="post-metadata">

### Author: ![sharon](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://discourse.paraview.org/u/sharon)
#### Post date: [June 12, 2020, 1:49am UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/6 "2020-06-12T01:49:16Z")

</div>

Hi Mathieu,  
I just tried that copy Unix file on Windows to make it have the same hash code, it works.  
Yes, the problem is source code is changed, we take paraview as submodule, this will cause source code changed, i cannot submit this…  
i am trying to add a .gitattributes file to solve this issue, hope it will works

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 6, 2021, 1:59pm UTC](https://discourse.paraview.org/t/why-vtksocketcommunicatorhash-is-different/4550/7 "2021-01-06T13:59:25Z")

</div>

I’ve submitted [a fix](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7505) to use `.gitattributes` for this.
