Why vtkSocketCommunicatorHash is different

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,

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,

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.

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

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

How do you recover the sources ? on both os.

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

I’ve submitted a fix to use .gitattributes for this.

1 Like