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

investigate migrating to meson #35

Open
timdewhirst opened this issue Nov 11, 2022 · 17 comments
Open

investigate migrating to meson #35

timdewhirst opened this issue Nov 11, 2022 · 17 comments
Assignees

Comments

@timdewhirst
Copy link
Member

ErichZimmer/OpenPIV-Python-cxx#30

@timdewhirst timdewhirst self-assigned this Nov 11, 2022
@ErichZimmer
Copy link
Contributor

Should we completely deprecate vcpkg? In my meson implementation, I removed support for vcpkg so the only way to build libopenpivcore is with meson.

@timdewhirst
Copy link
Member Author

would it be possible to put the changes onto a branch - I can take a look. I've not had much chance to look at meson, but if it allows a move away from cmake (a personal bugbear of mine!) and allows a simplified python build process then it sounds good...

@ErichZimmer
Copy link
Contributor

Here is the link branch for the meson port.
https://github.com/ErichZimmer/openpiv-c--qt

@ErichZimmer
Copy link
Contributor

@timdewhirst I would like your help on this problem. Other than two significant issues, the meson port seems to be working and the examples are fully functional. However, I still have two significant issues with the meson port.

  1. Tests using std::stringstream and std::ifstream hang after all tests are complete
  2. GitHub actions brought up some interesting errors for the Linux build.

For one, after all tests complete, some test executables hang after completion. This causes meson to timeout when running a unit test.

For two, I have no idea what happened and will have to investigate further. Here is the GitHub actions log of the whole build on Linux.

@ErichZimmer
Copy link
Contributor

After some testing and isolation, it appears that the first issue (hanging of tests) is caused by something in the image loaders. Removing all external dependencies and the tiff image loader, the issue persists if the pnm loader is compiled, but goes away when it is not compiled. Additionally, statically creating libopenpivcore removes this hanging issue too. This leads me to believe that there is some sort of linker issue going on when compiling libopenpivcore as a dynamic library.

@timdewhirst
Copy link
Member Author

will take a look - apologies for the delay!

@timdewhirst
Copy link
Member Author

okay, can reproduce the issue locally - digging deeper!

@ErichZimmer
Copy link
Contributor

Any luck on the issues related to failed unit tests? On Windows, all tests pass, but I still have the hanging issue after an executable is finished with its task (the hanging seems to be a Windows thing as both Linux and Mac OS do not have this issue). Using MinGW through CMake does not have this issue, so I am analyzing the CMake and Meson compilation process in an attempt to figure out what could be potentially causing the hanging issue.

@ErichZimmer
Copy link
Contributor

ErichZimmer commented Mar 14, 2024

Well... all tests decided to pass for Linux and Mac OS. Perhaps this issue could be associated with the tests? Here is the Linux build from the GitHub CI. For Windows, all tests passed, but the same 10 tests hanged after completion causing timeout errors. Unfortunately, using CMake did not fix the issue as it too had hanging issues when using MinGW, but not MSVC.

@timdewhirst
Copy link
Member Author

I've just pushed a small fix to master which fixes a failing test in image_utils_test.cpp on os x - would it be possible to check to see if it fixes the issue you see?

timdewhirst added a commit that referenced this issue Mar 14, 2024
@timdewhirst
Copy link
Member Author

Interestingly there was a build issue relating to (I think) out-of-date vcpkg, and once updated I had some compiler errors to fix with client code of cxxopts. Cmake build is now file. For the meson build, would it be possible to raise a pull request to a non-master branch - this would make it easier for me to test and contribute to the meson build.

@ErichZimmer
Copy link
Contributor

I created a pull request under #44

@timdewhirst
Copy link
Member Author

Thanks! Because of the nature of the change, would it be possible to change the target branch from master to OpenPIV:35-investigate-migrating-to-meson?

@ErichZimmer
Copy link
Contributor

I will see later tonight, but I may need to make a new pull request that supersedes the current one targeting OpenPIV:master and close the duplicate pull request.

@ErichZimmer
Copy link
Contributor

@timdewhirst I changed the base branch to OpenPIV:35-investigate-migrating-to-meson.

@ErichZimmer
Copy link
Contributor

After some more CI and local testing, the only issue that now remains is the hanging issue on Windows. I still haven't figured it out even after many hours of research and experimenting. Though I would like to stray from MSVC on Windows due to GCC-compatible compilers providing vector extensions for multimedia extensions (e.g., SIMD), I suppose adding support for MSVC and the generation of import libs could help alleviate this issue at the expense of some performance. Maybe we should file a mailing list to MinGW for additional help?

@timdewhirst
Copy link
Member Author

I'll see if I can repro the issue on windows. The comment about SIMD is curious - I would expect any major compiler for windows to support vectorization and access to extension instructions.

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

When branches are created from issues, their pull requests are automatically linked.

2 participants