Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Windows build #106

Open
ghost opened this issue May 12, 2023 · 5 comments
Open

Provide Windows build #106

ghost opened this issue May 12, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented May 12, 2023

We would like to build fpocket with CMake as part of your official release.

Currently we have our own CMakeLists.txt file for building, which we have working with Visual Studio 2019, but we have attempted to upgrade this to Visual Studio 2022 and the source code for fpocket is crash the Microsoft Compiler.

Visual Studio 2022 is also provide a lot of warnings, and before I wish to report any bug, I will need to eliminate our configuration as being the cause.

I can provide the list of compiler warnings and the compiler crash for Visual Studio 2022, if requested, but it would seem to be helpful to have an official CMakeLists.txt configuration that supports Windows build.

@pschmidtke
Copy link
Contributor

Sure go ahead, but I don't have any windows environment or whatsoever to test on nor plan to do so & with virtualized env you can use the unix version as well.
I'd need somebody taking this, if that's important to some people

@pslacerda
Copy link

pslacerda commented Aug 29, 2024

I got Fpocket working on Windows. But didn't managed to get "molfile" plugins working, so mdpocket doesn't compile.

It was a cross-compilation from Fedora Linux 39, the required modifications were:

  1. Replaced gcc by x86_64-w64-mingw32-gcc on the Makefile.
  2. Removed references for libmolfile_plugin.h, like deleting the function read_topology.
  3. Changed mkdir calls and removed chmod ones.
  4. Needed to define -D__USE_MINGW_ANSI_STDIO=0.

@pslacerda
Copy link

On my proof of concept, it works well on my machine .

But before introducing proper Windows support, I have to refactor the Makefile so it doesn't grow bad.

At my fork's master all testes are passing. Added explicit casts, multiplatform mkdir, conditional chmod, and much saner Makefile and Dockerfile.
master...pslacerda:fpocket:master

Next steps are

  • tackle temporary files
  • add windows target
  • run tests on wine as I also don't have windows

Best regards

@pslacerda
Copy link

I updated to latest molfile plugin but it doesn't has the molfile_atom_t atom_type member identifying HETATM or ATOM records. Because of this, I commented out some bits of read_mmcif.c and it isn't working. Check the commit dccdb64 to know.

I ran tested the WIN64 build and it worked after setting the TMPDIR environment variable. But tests didn't passed because there are some differences on the Pocket volume (Monte Carlo) values, other values were equal.

The refactored Makefile dosn't support Mac yet, and there is the need to specify the target OS:

make -j8 TARGET_OS=WIN64
# or
make -j8 TARGET_OS=LINUXAMD64

I also tested the mdpocket program with the adk_closed.pdb and adk_dims.dcd files from MDAnalysis.

So everything is working in Linux and Windows builds with my changes, except support for mmCIF and Mac. Se updated changes at: master...pslacerda:fpocket:master

@pslacerda
Copy link

@pschmidtke, can you feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants