Closed uulm-janbaudisch closed 11 months ago
As mentioned in #159, a static build compiles, but does not actually work right now. It behaves differently from a dynamic build at run time. As my knowledge of this framework is very limited, I am not sure why. The error message when using the static version is:
Could not load mt_kahypar::CoarseningAlgorithm : multilevel_coarsener
This seems to originate from the CoarsenerFactory
/ abstract Factory
not finding something. While debugging, I found that running the dynamic version showed elements being inserted into Factory._callbacks
while the static version did not, probably leading to this error as nothing gets loaded. But I can not figure out why this is happening. Maybe someone has an idea on this issue?
As mentioned in #159, a static build compiles, but does not actually work right now. It behaves differently from a dynamic build at run time. As my knowledge of this framework is very limited, I am not sure why. The error message when using the static version is:
Could not load mt_kahypar::CoarseningAlgorithm : multilevel_coarsener
This seems to originate from the
CoarsenerFactory
/ abstractFactory
not finding something. While debugging, I found that running the dynamic version showed elements being inserted intoFactory._callbacks
while the static version did not, probably leading to this error as nothing gets loaded. But I can not figure out why this is happening. Maybe someone has an idea on this issue?
Tagging @SebastianSchlag who wrote the factories. Is there a way to get the factories / registries to work with a static build? In the current version with hash-maps it is probably difficult to get static initialization / registration.
That's interesting. I guess something along the lines of [1] or, to be more precise, in the blogpost [2] that's referenced there should work. I haven't found the time to look into this in detail though yet.
[1] https://stackoverflow.com/questions/59779679/c-library-self-registering-classes-factory-map-empty-in-client-application [2] http://www.nirfriedman.com/2018/04/29/unforgettable-factory/
This provides the
BUILD_SHARED_LIBS
option (by defaultON
) so thatlibmtkahypar
can be built statically by setting it toOFF
.