E57 support in linux [was XERCES not found]

All about Linux portage
daniel
Site Admin
Posts: 7701
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 support in linux [was XERCES not found]

Post by daniel »

Okay, I just fixed the issue with PCV, and partly with PoissonRecon (I asked the author for the right fix for the 'DIMENSION' error).

And I also fixed the libE57 CMake script (there was a wrong 'else' case - 'elseif' was used instead of 'else'). I also simplified the script a little bit. I hope it will fix the issue this time ;)
Daniel, CloudCompare admin
jgpallero
Posts: 44
Joined: Thu Dec 12, 2013 2:00 pm

Re: E57 support in linux [was XERCES not found]

Post by jgpallero »

daniel wrote:Okay, I just fixed the issue with PCV, and partly with PoissonRecon (I asked the author for the right fix for the 'DIMENSION' error).

And I also fixed the libE57 CMake script (there was a wrong 'else' case - 'elseif' was used instead of 'else'). I also simplified the script a little bit. I hope it will fix the issue this time ;)
After your changes, the errors in compilation are (note there is still an error related to omp_init_lock(&writelock); in line 433 of Geometry.inl file):

Code: Select all

[ 31%] Building CXX object plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o
In file included from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.h:378:0,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Ply.h:220,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.h:21,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.cpp:18:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.inl: In constructor ‘CoredVectorMeshData<Vertex>::CoredVectorMeshData()’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.inl:433:26: error: cannot convert ‘void**’ to ‘omp_lock_t*’ for argument ‘1’ to ‘void omp_init_lock(omp_lock_t*)’
  omp_init_lock(&writelock);
                          ^
In file included from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.h:174:0,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.h:23,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.cpp:18:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl: In member function ‘bool ASCIIOrientedPointStream<Real>::nextPoint(OrientedPoint3D<Real>&)’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:68:12: error: ‘DIMENSION’ was not declared in this scope
  float c[2*DIMENSION];
            ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:69:45: error: ‘c’ was not declared in this scope
  if( fscanf( _fp , " %f %f %f %f %f %f " , &c[0] , &c[1] , &c[2] , &c[3] , &c[4] , &c[5] )!=2*DIMENSION ) return false;
                                             ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:70:11: error: ‘c’ was not declared in this scope
  p.p[0] = c[0] , p.p[1] = c[1] , p.p[2] = c[2];
           ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl: In member function ‘bool ASCIIOrientedPointStreamWithData<Real, Data>::nextPoint(OrientedPoint3D<Real>&, Data&)’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:247:12: error: ‘DIMENSION’ was not declared in this scope
  float c[2*DIMENSION];
            ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:248:45: error: ‘c’ was not declared in this scope
  if( fscanf( _fp , " %f %f %f %f %f %f " , &c[0] , &c[1] , &c[2] , &c[3] , &c[4] , &c[5] )!=2*DIMENSION ) return false;
                                             ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:249:11: error: ‘c’ was not declared in this scope
  p.p[0] = c[0] , p.p[1] = c[1] , p.p[2] = c[2];
           ^
plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/build.make:54: recipe for target 'plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o' failed
make[2]: *** [plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o] Error 1
CMakeFiles/Makefile2:682: recipe for target 'plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/all' failed
make[1]: *** [plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
jgpallero
Posts: 44
Joined: Thu Dec 12, 2013 2:00 pm

Re: E57 support in linux [was XERCES not found]

Post by jgpallero »

jgpallero wrote:
daniel wrote:Okay, I just fixed the issue with PCV, and partly with PoissonRecon (I asked the author for the right fix for the 'DIMENSION' error).

And I also fixed the libE57 CMake script (there was a wrong 'else' case - 'elseif' was used instead of 'else'). I also simplified the script a little bit. I hope it will fix the issue this time ;)
After your changes, the errors in compilation are (note there is still an error related to omp_init_lock(&writelock); in line 433 of Geometry.inl file):

Code: Select all

[ 31%] Building CXX object plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o
In file included from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.h:378:0,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Ply.h:220,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.h:21,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.cpp:18:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.inl: In constructor ‘CoredVectorMeshData<Vertex>::CoredVectorMeshData()’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/Geometry.inl:433:26: error: cannot convert ‘void**’ to ‘omp_lock_t*’ for argument ‘1’ to ‘void omp_init_lock(omp_lock_t*)’
  omp_init_lock(&writelock);
                          ^
In file included from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.h:174:0,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.h:23,
                 from /home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/PoissonReconLib.cpp:18:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl: In member function ‘bool ASCIIOrientedPointStream<Real>::nextPoint(OrientedPoint3D<Real>&)’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:68:12: error: ‘DIMENSION’ was not declared in this scope
  float c[2*DIMENSION];
            ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:69:45: error: ‘c’ was not declared in this scope
  if( fscanf( _fp , " %f %f %f %f %f %f " , &c[0] , &c[1] , &c[2] , &c[3] , &c[4] , &c[5] )!=2*DIMENSION ) return false;
                                             ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:70:11: error: ‘c’ was not declared in this scope
  p.p[0] = c[0] , p.p[1] = c[1] , p.p[2] = c[2];
           ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl: In member function ‘bool ASCIIOrientedPointStreamWithData<Real, Data>::nextPoint(OrientedPoint3D<Real>&, Data&)’:
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:247:12: error: ‘DIMENSION’ was not declared in this scope
  float c[2*DIMENSION];
            ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:248:45: error: ‘c’ was not declared in this scope
  if( fscanf( _fp , " %f %f %f %f %f %f " , &c[0] , &c[1] , &c[2] , &c[3] , &c[4] , &c[5] )!=2*DIMENSION ) return false;
                                             ^
/home/topo/Desktop/trunk/plugins/qPoissonRecon/PoissonReconLib/Src_CC_wrap/../Src/PointStream.inl:249:11: error: ‘c’ was not declared in this scope
  p.p[0] = c[0] , p.p[1] = c[1] , p.p[2] = c[2];
           ^
plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/build.make:54: recipe for target 'plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o' failed
make[2]: *** [plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/Src_CC_wrap/PoissonReconLib.cpp.o] Error 1
CMakeFiles/Makefile2:682: recipe for target 'plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/all' failed
make[1]: *** [plugins/qPoissonRecon/PoissonReconLib/CMakeFiles/QPOISSON_RECON_LIB.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
The error referred to omp_init_lock(&writelock); can be fixed using omp_init_lock((omp_lock_t*)(&writelock));

About the DIMENSION definition, it is defined as #define DIMENSION 3 in trunk/plugins/qPoissonRecon/PoissonReconLib/Src/Octree.h. I've tried to include this file in PointStream.inl, but an error due to multiple definition of a function appears. If DIMENSION is defined again in PointStream.inl, the compilation works without errors (the other errors, those referred to ‘c’ was not declared in this scope, disappear). I think DIMENSION must be 3 also in this part, as we can see in the line

Code: Select all

 if( fscanf( _fp , " %f %f %f %f %f %f " , &c[0] , &c[1] , &c[2] , &c[3] , &c[4] , &c[5] )!=2*DIMENSION ) return false;
where six values are read
daniel
Site Admin
Posts: 7701
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: E57 support in linux [was XERCES not found]

Post by daniel »

As I said, for the 'DIMENSION' error I was waiting for a fix from the author of PoissonRecon himself ;)

Now it's online (warning: I also switched to a proper submodule for PoissonRecon now that it's on github).
Daniel, CloudCompare admin
Post Reply