Skip to content
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

Build with vtk89 #1312

Closed
wants to merge 6 commits into from
Closed

Build with vtk89 #1312

wants to merge 6 commits into from

Conversation

cpinter
Copy link
Member

@cpinter cpinter commented Jan 29, 2020

This branch is the continuation of the work of @lassoan in PR Slicer/Slicer#1252

Python wrapping of VTK classes seems to work. The remaining errors on Windows are:

"c:\e\ScD\Slicer-build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\e\ScD\Slicer-build\E\DataStore\DataStore\Testing\Cxx\qSlicerDataStoreModuleCxxTests.vcxproj" (default target) (290) ->
(ClCompile target) ->
  C:\e\ScD\Slicer-build\E\DataStore\DataStore\Testing\Cxx\qSlicerDataStoreModuleCxxTests.cxx(139): error C2039: 'SendToStdErrOn': is not a member of 'vtkWin32OutputWindow' [C:\e\ScD\Slicer-build\E\DataStore\DataStore\Testing\Cxx\qSlicerDataStoreModuleCxxTests.vcxproj]


"c:\e\ScD\Slicer-build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\e\ScD\Slicer-build\Modules\Loadable\Segmentations\Logic\vtkSlicerSegmentationsModuleLogicPython.vcxproj" (default target) (518) ->
"C:\e\ScD\Slicer-build\Modules\Loadable\Segmentations\Logic\vtkSlicerSegmentationsModuleLogicPythonD.vcxproj" (default target) (519) ->
  C:\e\ScD\Slicer-build\Modules\Loadable\Segmentations\Logic\vtkImageGrowCutSegmentPython.cxx(195): error C2280: 'vtkImageGrowCutSegment::vtkImageGrowCutSegment(const vtkImageGrowCutSegment &)': attempting to reference a deleted function [C:\e\ScD\Slicer-build\Modules\Loadable\Segmentations\Logic\vtkSlicerSegmentationsModuleLogicPythonD.vcxproj]

The first error should not happen, as the precompiler directive of
#if VTK_MAJOR_VERSION >= 9 || (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 90)
should work (see line in question in generated file here). Maybe the VTK version variables are not propagated to the project. correctly

In the case of the second error, the python wrapping C++ file is quite different. In the current Slicer master, vtkImageGrowCutSegmentPython.cxx does not contain a PyvtkImageGrowCutSegment_vtkImageGrowCutSegment ragular constructor, but a VTK constructor PyvtkImageGrowCutSegment_NewInstance instead. It is possible that the class is not wrapped as a VTK class.

@cpinter
Copy link
Member Author

cpinter commented Jan 31, 2020

One more thing: Slicer.exe is built, but on launch I'm getting this:
image

@lassoan
Copy link
Contributor

lassoan commented Feb 1, 2020

Does python37.dll exist? Do you see more information if you start from the debugger? Do you see any additional information in Windows event log?

@jcfr
Copy link
Member

jcfr commented Feb 1, 2020

python37.dll

Slicer is expected to link against python36. See https://github.com/Slicer/Slicer/blob/ba6e736fba521d4a5d653af03b204add643f793a/SuperBuild/External_python.cmake#L60

@cpinter During the project week, did we find out the root cause of this ?

@jcfr
Copy link
Member

jcfr commented Feb 1, 2020

Looks like the changes requiring Python3_* variables to be passed are missing. When I land, I will check if these changes where done on my other laptop.

1 similar comment
@jcfr
Copy link
Member

jcfr commented Feb 1, 2020

Looks like the changes requiring Python3_* variables to be passed are missing. When I land, I will check if these changes where done on my other laptop.

@pieper
Copy link
Member

pieper commented Feb 7, 2020

Let me know if/when you'd like me to try a mac build.

@cpinter
Copy link
Member Author

cpinter commented Feb 12, 2020

Sorry for the delay... I'm back now.

@jcfr Have you had time to check on your other laptop regarding passing the Python3_* variables?

@jcfr
Copy link
Member

jcfr commented Feb 12, 2020

Have you had time to check on your other laptop regarding passing the Python3_* variables?

Sadly, I can't find the changes on my laptop.

@cpinter
Copy link
Member Author

cpinter commented Feb 12, 2020

Thanks for the info, @jcfr!

If anyone has an idea about how to address any of the three issues (1. wrong VTK version in ifdef, 2. wrong python wrapping of VTK class, 3. python37.dll issue), feel free to issue a new PR or just comment here. I'll work on other things now, but can test ideas using my build.

@lassoan
Copy link
Contributor

lassoan commented Feb 12, 2020

The first error should not happen, as the precompiler directive of
#if VTK_MAJOR_VERSION >= 9 || (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 90)
should work (see line in question in generated file here). Maybe the VTK version variables are not propagated to the project. correctly

You need to add:

#include <vtkVersion.h> // must precede reference to VTK_MAJOR_VERSION

@jcfr
Copy link
Member

jcfr commented Aug 27, 2020

Closing. This PR is superseded by Slicer/Slicer#5141

@jcfr jcfr closed this Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants