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 deal.II (Windows) cannot be configured with external shared Boost #16447
Comments
The (second) message
indicates that the CMake internal boost configuration thinks that neither the Secondly, just as a sanity check, would you mind to configure with |
@vdilecce A quick question: Do you need to develop a native Windows application based on deal.II or do you just want to develop and use deal.II on Windows? If the latter, we had great success with VSCODE and an Ubuntu in WSL in the past. (I recommend this approach to all students with a Windows laptop when I teach a scientific computing course with deal.II). |
Scenario is native Windows application using both deal.II and Boost. Test 1
Did not work (fallback to bundled Boost). Test 2
Weirdly, the latter picked libraries from the static Boost, but includes from the shared Boost. |
@vdilecce Did it compile? |
I put testing on hold because of #16413 (comment) |
I can provide some updates with Boost 1.82 for now (deal.II's current master branch). Configure command (I set
Link libraries are from the static Boost, whereas includes are from the shared Boost:
NOTE: if I replace It seems like deal.II initially finds the shared Boost, but then some tests fail, it resorts to the static Boost (for which tests succeed), and thus above result. NOTE: I tried adding the Boost DLLs to the PATH but it didn't work. I didn't try compiling deal.II since it will just link to the static Boost, which is not what I am trying to achieve. |
I found the problem! It is in file
If It seems that CMake's |
Do you want to create a pull request that does that? |
I don't feel like proceeding myself, given how little I know about deal.II's CMake project (which I have never contributed to): I'd rather leave it to some other developer with better knowledge of this project. As a side note, variable |
The following was tested with:
Boost
I configured, built, and installed Boost 1.82 as follows:
deal.II
When deal.II is configured on Windows,
BUILD_SHARED_LIBS
is forced to OFF for size reasons.In this scenario, in
cmake/modules/FindDEAL_II_BOOST.cmake
(cmake/modules/FindBOOST.cmake
in deal.II 9.4)Boost_USE_STATIC_LIBS
is first set to TRUE (i.e., search for Boost static); if Boost is not found, it is then set to FALSE (i.e., search for Boost shared).I configured deal.II 9.5.1 with Boost SHARED as follows:
In the output, I got the following:
and deal.II ended up configured with the bundled Boost.
I tried configuring deal.II with an external Boost STATIC and it picked it up correctly:
Is there a way to configure deal.II on Windows with an external shared Boost?
The text was updated successfully, but these errors were encountered: