-
Notifications
You must be signed in to change notification settings - Fork 31
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
Static build broken #142
Comments
Verified on Fedora. |
The static build option was a contributed feature from mid-2022 (#35), and I have not been actively testing it as other aspects of the build system were modified. Code coverage of MOPAC is only at 67% at the moment, and while expanding coverage is a high priority in 2023, active coverage of this particular feature is a low priority relative to other, core features of MOPAC. On my Mac, I'm getting BLAS/LAPACK linking errors that are preventing the static executable from being built at the moment. I'll look into fixing this. It's probably a quick fix, but sometimes this kind of problem can be stubborn to diagnose. |
I've been looking into this some more. Fully static linking isn't possible on Mac because many system libraries are only available as shared libraries. Static linking seems to be possible on Linux, but you need to make sure all necessary static libraries are available (including low-level system libraries like libm & libc) and they are often not availably by default. I'm doing Linux development on an HPC system right now, and static versions of many libraries (including libm & libc) are not available to perform or test a static build. Do CMake and Make also flag errors or warnings when you try to perform a static build? I don't think static builds are a feature that can be expected to work "out of the box" for most people. I'm not sure there is anything for me to do here except perhaps to add a warning message about the requirements of a successful static build. |
After a closer examination of this issue, I've determined that the most likely culprit in a failed static build is the OpenMP linking. I've added an extra warning message to the static build option that directs users to set From a quick Google search, it seems like static linking of OpenMP is possible, but it ends up being very platform-specific. I'm fine with MOPAC having static build options, but getting a static build working with OpenMP is an extremely low priority for me. |
Describe the bug
Is the static build (
-DSTATIC_BUILD=ON
) tested regularly? I just tried it and then the tests fails with segfaults:To Reproduce
Configure CMake with
DSTATIC_BUILD=ON
and run CTestExpected behavior
Tests pass.
Operating system
Debian unstable
The text was updated successfully, but these errors were encountered: