salome-3.2.6: GUI compile error : VTKViewer setCells
-
I'm trying to compile salome 3.2.6 under gentoo; I'm using gcc-4.1; occ-6.2 (homebrew), both qt3 and qt4 installed, as well as pyqt-3.17 and pyqt-4.2, sip-4.6 .
I've patched
GUI_SRC_3.2.2/adm_local/unix/config_files/check_sip.m4
and
GUI_SRC_3.2.2/src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in
GUI_SRC_3.2.2/src/SALOME_PYQT/SalomePyQt/Makefile.in
(the one that checks for pyqt) in both places as mentioned in thread 1212
.
That eventually solved the failure or recursion over
SALOME_PYQT_GUI.sip
But now compilation fails at VTKViewer_ExtractUnstructuredGrid.lo . Here is the log:
g++ -m64 -D_OCC64 -g -D_DEBUG_ -Wno-deprecated -Wparentheses -Wreturn-type -Wunused -pthread -DOMNIORB_VERSION=4 -D__x86__ -D__linux__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG -I../../include/salome -I../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer -I. -I/usr/include -I/usr/include/omniORB4 -I/usr/include/COS -I/usr/qt/3/include -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE -I/usr/include/vtk -DOCC_VERSION_MAJOR=6 -DOCC_VERSION_MINOR=2 -DOCC_VERSION_MAINTENANCE=0 -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -DOCC_CONVERT_SIGNALS -I/usr/opencascade-6.2/ros//inc -c ../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx -fPIC -DPIC -o VTKViewer_ExtractUnstructuredGrid.lo
../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx: In member function 'virtual void VTKViewer_ExtractUnstructuredGrid::Execute()':
../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx:243: error: no matching function for call to 'vtkUnstructuredGrid::SetCells(vtkUnsignedCharArray*&, VTKViewer_CellLocationsArray*&, vtkCellArray*&
'
/usr/include/vtk/vtkUnstructuredGrid.h:100: note: candidates are: void vtkUnstructuredGrid::SetCells(int, vtkCellArray*)
/usr/include/vtk/vtkUnstructuredGrid.h:101: note: void vtkUnstructuredGrid::SetCells(int*, vtkCellArray*)
/usr/include/vtk/vtkUnstructuredGrid.h:103: note: void vtkUnstructuredGrid::SetCells(vtkUnsignedCharArray*, vtkIdTypeArray*, vtkCellArray*)
../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx:332: error: no matching function for call to 'vtkUnstructuredGrid::SetCells(vtkUnsignedCharArray*&, VTKViewer_CellLocationsArray*&, vtkCellArray*&
'
/usr/include/vtk/vtkUnstructuredGrid.h:100: note: candidates are: void vtkUnstructuredGrid::SetCells(int, vtkCellArray*)
/usr/include/vtk/vtkUnstructuredGrid.h:101: note: void vtkUnstructuredGrid::SetCells(int*, vtkCellArray*)
/usr/include/vtk/vtkUnstructuredGrid.h:103: note: void vtkUnstructuredGrid::SetCells(vtkUnsignedCharArray*, vtkIdTypeArray*, vtkCellArray*)
../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx: At global scope:
../../../../src3.2.6/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx:41: warning: 'MYDEBUG' defined but not used
make[1]: *** [VTKViewer_ExtractUnstructuredGrid.lo] Erreur 1
make[1]: quittant le répertoire « /home/florent/src/salome/build_3.2.6/gui/src/VTKViewer »
make: *** [all] Erreur 2
(I've just added a few newlines to make it readable). I feel it's getting close! Still this time I'm stuck, and google is silent about this one. Any hint is welcome.-
BTW I'm using vtk-5.0.3 compiled with python, qt3, java and threads support.
I do get a warning at configure :
config.status: WARNING: /home/florent/src/salome/src3.2.6/GUI_SRC_3.2.6/adm_local/unix/make_commence.in seems to ignore the --datarootdir setting
-
Re: salome-3.2.6: GUI compile error : VTKViewer setCells
Posted by
Daniel Tourde - Caelae.se
at
May 22. 2007
Isidore Ducasse wrote:
BTW I'm using vtk-5.0.3 compiled with python, qt3, java and threads support.
I do get a warning at configure :
config.status: WARNING: /home/florent/src/salome/src3.2.6/GUI_SRC_3.2.6/adm_local/unix/make_commence.in seems to ignore the --datarootdir setting
Isidore,
I am very interested by the results of your tests.
I have created ebuilds for OpenCascade 6.1 and part of salome (3.2.2). Please check bugs.gentoo.org to find them (I don't remember the # of the bugs...)
- Regarding OpenCascade 6.2 I do not succeed to compile it on my gentoo box (gcc 4.1.2). I am interested to know if you have applied any patch.
- Regarding Salome, I have also had some troubles getting it to work.
Could we help each others and create reliable ebuilds?
Daniel-
by changing the file GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_CellLocationsArray.h, line25
you will be able to avoid this error.
> #if ((VTK_MAJOR_VERSION == 5) || ((VTK_MAJOR_VERSION==4) && (VTK_MINOR_VERSION>=4) ))
But, then, I encountered the following error on VTKViewer_AppendFilter.cxx as follows.
Checking the header file, I found that VTKAppendFilter class's structure has changed from 4.2.X to 5.0.X.
We may have to downgrade VTK version to 4.2.X (but ebuild for vtk-4.2 seems to be removed from my gentoo portage directory!!)
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx: In member function 'void VTKViewer_AppendFilter:
oMapping()':
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:122: error: 'class VTKViewer_AppendFilter' has no member named 'NumberOfInputs'
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:123: error: 'class VTKViewer_AppendFilter' has no member named 'Inputs'
-
Tomo Bessho wrote:
But, then, I encountered the following error on VTKViewer_AppendFilter.cxx as follows.
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx: In member function 'void VTKViewer_AppendFilter:
oMapping()':
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:122: error: 'class VTKViewer_AppendFilter' has no member named 'NumberOfInputs'
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:123: error: 'class VTKViewer_AppendFilter' has no member named 'Inputs'
Self Response.
I may found the solution for the above problem.
By editting GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx
as follows, I could avoid the errors.
1. adding the description for a header file.
#include
#include
+ #include
2. replace the following description in some place.
- this->NumberOfInputs
+ this->GetNumberOfInputConnections(0)
- this->Inputs[aDataSetId]
+ this->GetExecutive()->GetInputData(0,aDataSetId)
But I'm afraid I have not do any test if this modification is truely correct.
I would appreciate it if someone castigate this modification.-
Re: salome-3.2.6: GUI compile error : VTKViewer setCells
Posted by
Daniel Tourde - Caelae.se
at
May 28. 2007
Tomo Bessho wrote:
Tomo Bessho wrote:
But, then, I encountered the following error on VTKViewer_AppendFilter.cxx as follows.
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx: In member function 'void VTKViewer_AppendFilter:
oMapping()':
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:122: error: 'class VTKViewer_AppendFilter' has no member named 'NumberOfInputs'
> ../../../../src/GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx:123: error: 'class VTKViewer_AppendFilter' has no member named 'Inputs'
Self Response.
I may found the solution for the above problem.
By editting GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx
as follows, I could avoid the errors.
1. adding the description for a header file.
#include
#include
+ #include
2. replace the following description in some place.
- this->NumberOfInputs
+ this->GetNumberOfInputConnections(0)
- this->Inputs[aDataSetId]
+ this->GetExecutive()->GetInputData(0,aDataSetId)
But I'm afraid I have not do any test if this modification is truely correct.
I would appreciate it if someone castigate this modification.
Can you provide a patch? I am writing an ebuild at the moment for salome. I would include the patch in the ebuild.-
Dear Daniel
Sorry for the late reply.
I have attached the patch.
This is just for the VTK issue, therefore, we have to modify some Makefile.in and XXX.m4 files as before.
=======================================
diff -cr GUI_SRC_3.2.6.orig/src/VTKViewer/VTKViewer_AppendFilter.cxx GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx
*** GUI_SRC_3.2.6.orig/src/VTKViewer/VTKViewer_AppendFilter.cxx 2007-05-29 22:46:12.000000000 +0900
--- GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_AppendFilter.cxx 2007-05-29 22:55:08.000000000 +0900
***************
*** 32,37 ****
--- 32,38 ----
#include
#include
#include
+ #include
#include
#include
#include
***************
*** 119,126 ****
vtkIdType aPntStartId = 0;
vtkIdType aCellStartId = 0;
! for(vtkIdType aDataSetId = 0; aDataSetId < this->NumberOfInputs; ++aDataSetId){
! vtkDataSet* aDataSet = (vtkDataSet *)(this->Inputs[aDataSetId]);
// Do mapping of the nodes
if(!GetSharedPointsDataSet()){
vtkIdType aNbPnts = aDataSet->GetNumberOfPoints();
--- 120,127 ----
vtkIdType aPntStartId = 0;
vtkIdType aCellStartId = 0;
! for(vtkIdType aDataSetId = 0; aDataSetId < this->GetNumberOfInputConnections(0); ++aDataSetId){
! vtkDataSet* aDataSet = (vtkDataSet *)(this->GetExecutive()->GetInputData(0,aDataSetId));
// Do mapping of the nodes
if(!GetSharedPointsDataSet()){
vtkIdType aNbPnts = aDataSet->GetNumberOfPoints();
***************
*** 265,275 ****
numCells = 0;
! vtkDataSetAttributes::FieldList cellList(this->NumberOfInputs);
int firstCD=1;
! for (idx = 0; idx < this->NumberOfInputs; ++idx) {
! ds = (vtkDataSet *)(this->Inputs[idx]);
if (ds != NULL) {
if ( ds->GetNumberOfPoints() <= 0 && ds->GetNumberOfCells() <= 0 ) {
continue; //no input, just skip
--- 266,276 ----
numCells = 0;
! vtkDataSetAttributes::FieldList cellList(this->GetNumberOfInputConnections(0));
int firstCD=1;
! for (idx = 0; idx < this->GetNumberOfInputConnections(0); ++idx) {
! ds = (vtkDataSet *)(this->GetExecutive()->GetInputData(0,idx));
if (ds != NULL) {
if ( ds->GetNumberOfPoints() <= 0 && ds->GetNumberOfCells() <= 0 ) {
continue; //no input, just skip
***************
*** 308,315 ****
output->GetPointData()->PassData(GetSharedPointsDataSet()->GetPointData());
// 2.cells
! for (idx = 0; idx < this->NumberOfInputs; ++idx) {
! ds = (vtkDataSet *)(this->Inputs[idx]);
if (ds != NULL) {
numCells = ds->GetNumberOfCells();
cd = ds->GetCellData();
--- 309,316 ----
output->GetPointData()->PassData(GetSharedPointsDataSet()->GetPointData());
// 2.cells
! for (idx = 0; idx < this->GetNumberOfInputConnections(0); ++idx) {
! ds = (vtkDataSet *)(this->GetExecutive()->GetInputData(0,idx));
if (ds != NULL) {
numCells = ds->GetNumberOfCells();
cd = ds->GetCellData();
diff -cr GUI_SRC_3.2.6.orig/src/VTKViewer/VTKViewer_CellLocationsArray.h GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_CellLocationsArray.h
*** GUI_SRC_3.2.6.orig/src/VTKViewer/VTKViewer_CellLocationsArray.h 2007-05-29 22:46:12.000000000 +0900
--- GUI_SRC_3.2.6/src/VTKViewer/VTKViewer_CellLocationsArray.h 2007-05-29 22:48:16.000000000 +0900
***************
*** 22,28 ****
#include "VTKViewer.h"
! #if (VTK_MAJOR_VERSION >= 4) && (VTK_MINOR_VERSION >= 4)
# include
# define TCellLocationsArray vtkIdTypeArray
#else
--- 22,28 ----
#include "VTKViewer.h"
! #if ((VTK_MAJOR_VERSION == 5) || ((VTK_MAJOR_VERSION==4) && (VTK_MINOR_VERSION>=4) ))
# include
# define TCellLocationsArray vtkIdTypeArray
#else-
Re: salome-3.2.6: GUI compile error : VTKViewer setCells
Posted by
Daniel Tourde - Caelae.se
at
July 28. 2007
Hello!
Thanks for the patch. I applied it and still I got this error message. Any idea?
Daniel
i686-pc-linux-gnu-g++ -march=prescott -mfpmath=sse -Os -pipe -O -Wno-deprecated -Wparentheses -Wreturn-type -Wunused -pthread -DOMNIORB_VERSION=4 -D__x86__ -D__linux__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG -I../../include/salome -I. -I. -I/usr/include -I/usr/include/omniORB4 -I/usr/include/COS -I/usr/qt/3/include -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE -I/usr/include/vtk-5.0 -DOCC_VERSION_MAJOR=6 -DOCC_VERSION_MINOR=1 -DOCC_VERSION_MAINTENANCE=0 -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -DNO_CXX_EXCEPTION -I/usr/opencascade-6.1/ros//inc -c VTKViewer_GeometryFilter.cxx -fPIC -DPIC -o VTKViewer_GeometryFilter.lo
VTKViewer_GeometryFilter.cxx: In member function 'virtual void VTKViewer_GeometryFilter::Execute()':
VTKViewer_GeometryFilter.cxx:83: error: invalid conversion from 'vtkDataObject*' to 'vtkDataSet*'
make[3]: *** [VTKViewer_GeometryFilter.lo] Error 1
-
Powered by PloneboardDocument Actions

-
-
-
-
-