-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Hello,
For Project Week 31 I am trying to build the PolySeg library for the web. PolySeg is used in Slicer to manage segmentations and convert between different representations (contour / ribbon / lablemap) of segmentation maps.
I've run into an issue which I believe is related to multithreading used by VTK (or perhaps ITK?). When I build I get this:
error: undefined symbol: pthread_attr_setscope
I'm posting to see if anyone has run into this issue or has any ideas on how to fix it.
Under the assumption that this is pthread in VTK, I'm trying to set CMAKE_USE_PTHREADS_INIT to False for VTK when building the dockcross image.
I see that @thewtex has set some environment variable (ITK_GLOBAL_DEFAULT_THREADER) in the past that also deals with multithreading, so maybe this is related, or maybe there's a VTK equivalent?
My in-progress PR is here: PerkLab/PolySeg#4
If I skip importing things from PolySeg and just use simple things like e.g. vtkSphereSource, everything builds and runs properly.
Quite possibly related:
Update: It looks like you can avoid the issue by adding -s ERROR_ON_UNDEFINED_SYMBOLS=0 to ITKBridgeJavaScript.cmake and rebuilding the docker image. I don't know yet if this actually impacts the functionality.