-
Notifications
You must be signed in to change notification settings - Fork 96
Build on Windows platforms needs different shared library targets #35< 8000 /span>
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
Comments
Thank you very much for opening up this issue and giving a concise problem description/solution. I actually haven't looked at the windows build for quite a while, because the tests were too slow on the appveyor builds, which lead to build timeouts all the time. Did you have to add the "-DBOOST_ALL_NO_LIB" for all targets, or only for the kahypar library? I am currently travelling. I will take a look at this when I am back in Germany next week. |
The other issue with the libraries that I found was encountering an error similar to the following:
Which was odd because the CMake configuration included an absolute path to the problematic file, which did exist. I found the suggestion here that it was due to "interference with the auto-linking". A possible solution is to add the following two lines to kahypar\CMakeLists.txt. (adding just the first line alone would result in an "unresolved external symbol boost::program_options..." error). I added them right below the "find_package(Boost" command
This is the only place I had to make this definition change. I don't have enough knowledge of CMake processing to know whether this is a separate issue or caused by the change to a runtime library. I also don't know if this change to boost dynamic library linking would have unintended consequences. I don't need a fix implemented in the main branch by any deadline so don't worry. I'm just sharing what I needed to do to get the build working on my system. |
The fixes proposed in issue #35 do not seem to interfere with linux builds and make KaHyPar usable again on windows.
When trying to build this on a Windows platform, I came across the following error, which you can also see on your failing Windows build on appveyor linked on the main github page for this project
This appears to be because of the following lines:
The catch seems to be that shared library targets have to be handled differently depending on the platform. The CMake documentation reads:
I was able to get it to build on my machine based on this StackExchange post by changing the code as follows:
I don't have much experience with CMAKE so I can't guarantee this fix will work for everyone. I also ran into an issue with the Windows build where I had to adjust the linking behavior for boost (with add_definitions(-DBOOST_ALL_NO_LIB) ), but I won't create a new issue for it until I'm sure it wasn't accidentally created by this fix of mine.
The text was updated successfully, but these errors were encountered: