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

'make' error #1

Open
akshayMpatel opened this issue Oct 26, 2021 · 2 comments
Open

'make' error #1

akshayMpatel opened this issue Oct 26, 2021 · 2 comments

Comments

@akshayMpatel
Copy link

akshayMpatel commented Oct 26, 2021

Hello, I'm getting an error during make.

I'm working on macOS Big Sur and installed cmake, opencv, pcl, qt5, eigen, vtk, ... with brew and assume they are the latest versions. vtk for example is 9.0, and during cmake I get following warning.

CMake Deprecation Warning at /usr/local/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
  The `VTK_USE_FILE` is no longer used starting with 8.90.
Call Stack (most recent call first):
  /usr/local/share/pcl-1.12/PCLConfig.cmake:340 (include)
  /usr/local/share/pcl-1.12/PCLConfig.cmake:539 (find_external_library)
  CMakeLists.txt:19 (FIND_PACKAGE)

When I run make I get a bad constructor error.

$ make
Consolidate compiler generated dependencies of target core
[ 15%] Built target core
Consolidate compiler generated dependencies of target synNotchStatsNoSeg
[ 26%] Built target synNotchStatsNoSeg
Consolidate compiler generated dependencies of target synNotchStats
[ 36%] Built target synNotchStats
Consolidate compiler generated dependencies of target elmSegmentation
[ 42%] Building CXX object bin/applications/segment/CMakeFiles/elmSegmentation.dir/elmSegmentation.cpp.o
/Users/akshay/Projects/TASBEImageAnalytics/src/applications/segment/elmSegmentation.cpp:193:8: warning: 'random_shuffle<std::reverse_iterator<std::__wrap_iter<unsigned int *>>>' is deprecated [-Wdeprecated-declarations]
                std::random_shuffle(svxIds.rbegin(), svxIds.rend());
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/algorithm:3119:1: note: 'random_shuffle<std::reverse_iterator<std::__wrap_iter<unsigned int *>>>' has been explicitly marked deprecated here
_LIBCPP_DEPRECATED_IN_CXX14 void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/__config:1052:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX14'
#  define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
                                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/__config:1035:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
/Users/akshay/Projects/TASBEImageAnalytics/src/applications/segment/elmSegmentation.cpp:208:8: warning: 'random_shuffle<std::reverse_iterator<std::__wrap_iter<unsigned int *>>>' is deprecated [-Wdeprecated-declarations]
                std::random_shuffle(clusterIds.rbegin(), clusterIds.rend());
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/algorithm:3119:1: note: 'random_shuffle<std::reverse_iterator<std::__wrap_iter<unsigned int *>>>' has been explicitly marked deprecated here
_LIBCPP_DEPRECATED_IN_CXX14 void
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/__config:1052:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX14'
#  define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
                                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/__config:1035:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
/Users/akshay/Projects/TASBEImageAnalytics/src/applications/segment/elmSegmentation.cpp:368:17: error: no matching constructor for initialization of 'pcl::PointXYZRGBL'
                        PointXYZRGBL ptl(pt.r, pt.g, pt.b, currCluster);
                                     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:717:12: note: candidate constructor not viable: requires 3 arguments, but 4 were provided
    inline PointXYZRGBL (std::uint8_t _r, std::uint8_t _g, std::uint8_t _b):
           ^
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:720:12: note: candidate constructor not viable: requires 3 arguments, but 4 were provided
    inline PointXYZRGBL (float _x, float _y, float _z):
           ^
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:707:12: note: candidate constructor not viable: requires single argument 'p', but 4 arguments were provided
    inline PointXYZRGBL (const _PointXYZRGBL &p)
           ^
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:714:12: note: candidate constructor not viable: allows at most single argument '_label', but 4 arguments were provided
    inline PointXYZRGBL (std::uint32_t _label = 0):
           ^
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:705:24: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were provided
  struct EIGEN_ALIGN16 PointXYZRGBL : public _PointXYZRGBL
                       ^
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:705:24: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 4 were provided
/usr/local/include/pcl-1.12/pcl/impl/point_types.hpp:723:12: note: candidate constructor not viable: requires at least 6 arguments, but 4 were provided
    inline PointXYZRGBL (float _x, float _y, float _z,
           ^
2 warnings and 1 error generated.
make[2]: *** [bin/applications/segment/CMakeFiles/elmSegmentation.dir/elmSegmentation.cpp.o] Error 1
make[1]: *** [bin/applications/segment/CMakeFiles/elmSegmentation.dir/all] Error 2
make: *** [all] Error 2

Any help would be much appreciated.

@arlith
Copy link
Contributor

arlith commented Nov 2, 2021

Do you know what version of PCL you're using? The CMakeLists.txt asks for 1.7, although I think I was on version 1.8 at the time. It looks like there's now a 1.9, 1.10, 1.11 and 1.12. If you just installed via brew I would think you are on 1.12, which may be the source of the compile issue. Could you try using an older version of pcl?

@arlith
Copy link
Contributor

arlith commented Nov 2, 2021

Alternatively, the error output tells you what you can do to fix the issue... The problem is this:

/Users/akshay/Projects/TASBEImageAnalytics/src/applications/segment/elmSegmentation.cpp:368:17: error: no matching constructor for initialization of 'pcl::PointXYZRGBL'
                        PointXYZRGBL ptl(pt.r, pt.g, pt.b, currCluster);

It looks like that constructor for PointXYZRGBL doesn't exist in whatever version of PCL you have. There's probably an X,Y,Z,R,G,B,L constructor that could be used instead. You could potentially change that line to be:

PointXYZRGBL ptl(pt.x, pt.y, pt.z, pt.r, pt.g, pt.b, currCluster);

Or, alternatively,

PointXYZRGBL ptl;
ptl.x = pt.x; ptl.y = pt.y; ptl.z = pt.z;
ptl.r = pt.r; ptl.g = pt.g; ptl.b = pt.b;
ptl.l = currCluster;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants