-
Notifications
You must be signed in to change notification settings - Fork 93
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
undefined symbol: PyVTKAddFile_vtkNIFTIWriter #20
Comments
Same goes for python. Troubles starts here: #if defined(WIN32) |
I am using vtk 5.8, which may be the root of the actual issue. |
I don't think these visibility issues were fixed until VTK 6.0, I'll investigate this tomorrow. |
The Python visibility issues are due to vtkWrapPython.c, which didn't correctly set gcc visibility attributes until VTK 6.0. There isn't any way to fix them without upgrading VTK. The Java visibility issues can be avoided by using java-7-openjdk, which adds visibility attributes to JNIEXPORT. There might be other ways, but at least on my Mac and Linux boxes, using java-7-openjdk was enough to fix the issue. |
Closing. Visibility works with python and vtk 6, but not with earlier versions of vtk. |
I cannot build + run vtk-dicom with the following settings:
$ export CFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
$ export CXXFLAGS = -fvisibility=hidden -fvisibility-inlines-hidden
$ cmake
$ make && make test
[...]
8/9 Test #9: TestDICOMJava ....................***Failed 1.21 sec
Ran the vtk-dicom Java test.
Exception in thread "main" java.lang.UnsatisfiedLinkError: vtk.vtkDICOMReader.VTKInit()J
at vtk.vtkDICOMReader.VTKInit(Native Method)
at vtk.vtkObject.(vtkObject.java:97)
at vtk.vtkAlgorithm.(vtkAlgorithm.java:378)
at vtk.vtkImageAlgorithm.(vtkImageAlgorithm.java:78)
at vtk.vtkImageReader2.(vtkImageReader2.java:258)
at vtk.vtkDICOMReader.(vtkDICOMReader.java:166)
at TestDICOMJava.main(TestDICOMJava.java:72)
9/9 Test #8: TestDICOMPython ..................***Failed 2.74 sec
Traceback (most recent call last):
File "/home/mathieu/debian/debian-med/trunk/packages/vtk-dicom/trunk/vtk-dicom-0.5.0/Testing/TestDICOMPython.py", line 5, in
import vtkDICOMPython
ImportError: /home/mathieu/debian/debian-med/trunk/packages/vtk-dicom/trunk/vtk-dicom-0.5.0/obj-x86_64-linux-gnu/lib/vtkDICOMPython.so: undefined symbol: PyVTKAddFile_vtkNIFTIWriter
The text was updated successfully, but these errors were encountered: