kzampog / cilantro

A lean C++ library for working with point cloud data
MIT License
1.01k stars 206 forks source link

Eigen3.4 (declared implicitly) cannot be referenced -- it is a deleted function #48

Open jimzou opened 4 years ago

jimzou commented 4 years ago

When I compile surfelwarp project, get error:

1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(409): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(472): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(583): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(697): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>4 errors detected in the compilation of "C:/Users/F47/AppData/Local/Temp/tmpxft_00003c08_00000000-8_data_transfer.cpp4.ii".
1>data_transfer.cu
1>CMake Error at common_lib_generated_data_transfer.cu.obj.Release.cmake:280 (message):
1>  Error generating file
1>  D:/0.unity_prj/surfelwarp/build/common/CMakeFiles/common_lib.dir//Release/common_lib_generated_data_transfer.cu.obj

My evironment: Visualization_library=cilantro VS2017 CUDA10.0 Compiled Pangolin with Eigen3.4 Compiled cilantro with Eigen3.4

Algomorph commented 4 years ago

@jimzou , your best right not is to try to build a minimal program using the very same (deleted) operators in Eigen3.4 that SurfeWarp is using, then try to report the issue here if you can replicate it.

Do keep in mind that I'm not working with the surfelwarp code right now, so my input will be limited. However, I know that @kzampog does a very good job at maintaining cilantro, and he'll probably be responsive if the issue is indeed with cilantro <--> Eigen3.4 (wich is yet to be released) compatibility.

Hint: I remember that you can recompile a single file in Visual Studio easily (something like "Compile current file" if you right click on the file in the menu, there is also a shortcut that I don't remember right now). In order to locate where those deleted operators in Eigen3.4 are, you can try to comment out various parts of the code in data_transfer.cu in order to isolate the issue. Then make a very simple C++ program that uses the same cilantro stuff w/ Eigen3.4.

Algomorph commented 4 years ago

P.S. It seems like something happened to Eigen matrix slicing here, so another thing you can try is to alter ~data_transfer.cu~ image_point_cloud_conversions.hpp code so as not to use the "=" operator on the Eigen::Block type. I'm not sure right off the bat how you can do this, but, if the block is a rather small part of the matrix, i.e. a single vector, you could simply assign individual values, i.e. several statements like (, ) = (,).

Let me know how it all goes.

jimzou commented 4 years ago

Thanks. I'll try to see if it can be solved

zerychao commented 3 years ago

Hey, anything new on this problem? I'm getting the same error doing the same thing (building SurfelWarp) in a similar environment (CUDA 10.1) and tried switching Eigen versions with no luck. Has any solution been found since last update? Thanks!

Error messages from common_lib, visualization_lib, segmentation_lib and core_lib:

1>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(411): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(476): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(587): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(701): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>4 errors detected in the compilation of "C:/Users/ZERYCH~1/AppData/Local/Temp/tmpxft_0000a024_00000000-8_data_transfer.cpp4.ii".
1>data_transfer.cu
1>CMake Error at common_lib_generated_data_transfer.cu.obj.Debug.cmake:280 (message):
1>  Error generating file D:/...
1>  .../surfelwarp/build/common/CMakeFiles/common_lib.dir//Debug/common_lib_generated_data_transfer.cu.obj
3>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(411): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
3>
3>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(476): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
3>
3>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(587): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
3>
3>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(701): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
3>
3>4 errors detected in the compilation of "C:/Users/ZERYCH~1/AppData/Local/Temp/tmpxft_00003898_00000000-8_VisualizationTransform.cpp4.ii".
3>VisualizationTransform.cu
3>CMake Error at visualization_lib_generated_VisualizationTransform.cu.obj.Debug.cmake:280 (message):
3>  Error generating file D:/...
3>  .../surfelwarp/build/visualization/CMakeFiles/visualization_lib.dir//Debug/visualization_lib_generated_VisualizationTransform.cu.obj
6>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(411): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
6>
6>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(476): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
6>
6>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(587): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
6>
6>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(701): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
6>
6>4 errors detected in the compilation of "C:/Users/ZERYCH~1/AppData/Local/Temp/tmpxft_000079a8_00000000-8_ForegroundSegmenterPermutohedral.cpp4.ii".
6>ForegroundSegmenterPermutohedral.cu
6>CMake Error at segmentation_lib_generated_ForegroundSegmenterPermutohedral.cu.obj.Debug.cmake:280 (message):
6>  Error generating file D:/...
6>  .../surfelwarp/build/imgproc/segmentation/CMakeFiles/segmentation_lib.dir//Debug/segmentation_lib_generated_ForegroundSegmenterPermutohedral.cu.obj
8>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(411): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
8>
8>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(476): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
8>
8>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(587): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
8>
8>C:\Program Files (x86)\cilantro\include\cilantro/core/image_point_cloud_conversions.hpp(701): error : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
8>
8>4 errors detected in the compilation of "C:/Users/ZERYCH~1/AppData/Local/Temp/tmpxft_000065f8_00000000-8_SurfelWarpSerial.cpp4.ii".
8>SurfelWarpSerial.cu
8>CMake Error at core_lib_generated_SurfelWarpSerial.cu.obj.Debug.cmake:280 (message):
8>  Error generating file D:/...
8>  .../surfelwarp/build/core/CMakeFiles/core_lib.dir//Debug/core_lib_generated_SurfelWarpSerial.cu.obj

They are all comming from similar parts of cilantro's core/image_point_cloud_conversions.hpp, at

for (size_t i = 0; i < points_tmp.cols(); i++) {
    if (points_tmp(2,i) > (MetricDepth)0.0) {
        points.col(k) = points_tmp.col(i);
        colors.col(k) = colors_tmp.col(i); // THIS LINE
        k++;
    }
}

The types of points and colors are

VectorSet<typename DepthConverterT::MetricDepth,3> &points
VectorSet<float,3> &colors
mrsaleh commented 3 years ago

Exactly the same issue here, I don't know whether it's a Cilantro issue or the SurfelWarp issue. First I thought it's a Cuda 11 issue, so just replaced it with Cuda 10 and the issue remained, I'm using Visual Studio 2019 and Cuda 10.2, Eigen 3.4. @Algomorph