Starlink / starlink

Starlink Software Collection
162 stars 53 forks source link

Update GAIA to support VTK v6.x #41

Closed timj closed 9 years ago

timj commented 9 years ago

VTK v6.x does not seem to be backwards compatible with v5.10 so in order to keep up with VTK we need to modify GAIA accordingly. A naive build attempt resulted in the following errors:

clang++ -g -O2 -g -O0 -Wall -Wextra -fstack-protector -ftrapv  -DHAVE_CONFIG_H  -I. -I./generic -I../gaia/generic -I/star/include/skycat -I/star/include/rtd -I/star/include/cat -I/star/include/astrotcl -I/star/include/tclutil -I/star/include/vtk -I"/star/include" -I"/star/include" -I/opt/X11/include    -g -O0 -Wall -Wextra -fstack-protector -ftrapv -Os -Wall -Wno-implicit-int -fno-common -g -O2 -c `echo ./generic/Gaia3dVtkTcl.C` -o Gaia3dVtkTcl.o
./generic/Gaia3dVtkTcl.C:41:17: warning: using directive refers to implicitly-defined namespace 'std'
using namespace std;
                ^
In file included from ./generic/Gaia3dVtkTcl.C:64:
./generic/vtkAstTransform.h:49:25: error: variable has incomplete type 'class VTK_COMMON_EXPORT'
class VTK_COMMON_EXPORT vtkAstTransform : public vtkWarpTransform
                        ^
./generic/vtkAstTransform.h:49:7: note: forward declaration of 'VTK_COMMON_EXPORT'
class VTK_COMMON_EXPORT vtkAstTransform : public vtkWarpTransform
      ^
./generic/vtkAstTransform.h:49:41: error: expected ';' after top level declarator
class VTK_COMMON_EXPORT vtkAstTransform : public vtkWarpTransform
                                        ^
                                        ;
./generic/vtkAstTransform.h:49:43: error: expected unqualified-id
class VTK_COMMON_EXPORT vtkAstTransform : public vtkWarpTransform
                                          ^

./generic/Gaia3dVtkTcl.C:858:34: error: use of undeclared identifier 'vtkAstTransform'; did you mean 'vtkTransform'?
    vtkAstTransform *transform = vtkAstTransform::New();
                                 ^~~~~~~~~~~~~~~
                                 vtkTransform
/star/include/vtk/vtkProp3D.h:37:7: note: 'vtkTransform' declared here
class vtkTransform;
      ^
./generic/Gaia3dVtkTcl.C:858:34: error: incomplete type 'vtkTransform' named in nested name specifier
    vtkAstTransform *transform = vtkAstTransform::New();
                                 ^~~~~~~~~~~~~~~~~
/star/include/vtk/vtkProp3D.h:37:7: note: forward declaration of 'vtkTransform'
class vtkTransform;
      ^
./generic/Gaia3dVtkTcl.C:859:5: error: reference to overloaded function could not be resolved; did you mean to call it?
    transform->SetMapping( (AstMapping *) astCopy( mapping ) );
    ^~~~~~~~~

./generic/Gaia3dVtkTcl.C:862:25: error: address of overloaded function 'transform' does not match required type 'vtkAbstractTransform'
    tpdf->SetTransform( transform );
                        ^~~~~~~~~

I'm not sure how trivial the modifications will be to get this working.

VTK v6.1 does build okay (the mirrored repo has the code in it already).

pwdraper commented 9 years ago

I've started a branch to work on this as it is a bigger job than just getting the code to compile -- that was the easy part. Getting the build merged was difficult, in fact even a vanilla install didn't run Tcl correctly (could locate the shared libraries). There are also a lot of changes to the API that are reflected in the Tcl wrappers. They will need time to track down and test.

pwdraper commented 9 years ago

Just pushed a number of commits that should resolve this issue. So closed I expect.

timj commented 9 years ago

Thanks. This is great.