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

io features related to pcap will be disabled #2651

Closed
SQ-Duan opened this issue Nov 27, 2018 · 25 comments
Closed

io features related to pcap will be disabled #2651

SQ-Duan opened this issue Nov 27, 2018 · 25 comments
Labels
module: cmake needs: feedback Specify why not closed/merged yet

Comments

@SQ-Duan
Copy link

SQ-Duan commented Nov 27, 2018

Environment

  • Operating System and version: Ubuntu 16.04.4
  • Compiler: gcc 5.4.0
  • PCL Version: 1.7.2

Context

When using CMake to create a project with PCL, the output is always showing that io features related to png will be disabled and io features related to pcap will be disabled.

Reason

In file PCLConfig.cmake.in between line 432 and line 453, there is no function to find PCAP, which causes the WARNING as above. It's same for the WARNING of PNG.

macro(find_external_library _component _lib _is_optional)
  if("${_lib}" STREQUAL "boost")
    find_boost()
  elseif("${_lib}" STREQUAL "eigen")
    find_eigen()
  elseif("${_lib}" STREQUAL "flann")
    find_flann()
  elseif("${_lib}" STREQUAL "qhull")
    find_qhull()
  elseif("${_lib}" STREQUAL "openni")
    find_openni()
  elseif("${_lib}" STREQUAL "openni2")
    find_openni2()
  elseif("${_lib}" STREQUAL "vtk")
    find_VTK()
  elseif("${_lib}" STREQUAL "libusb-1.0")
    find_libusb()
  elseif("${_lib}" STREQUAL "glew")
    find_glew()
  elseif("${_lib}" STREQUAL "opengl")
    find_package(OpenGL)
  endif("${_lib}" STREQUAL "boost")
  ...
@yiakwy
Copy link

yiakwy commented Nov 27, 2018

How to resolve it? Here is an example for openni.

You don't have to modify pcl cmake files. They just check and won't install it for you. More mature software will install it for you.

Hence the problem could be either that you haven't install them or you don't specify the dynamic libraries in the linking stage.

To install pcl with openni, do

function install_pcl() {
# http://www.pointclouds.org/documentation/tutorials/installing_homebrew.php
	brew install pcl
# https://github.com/totakke/homebrew-openni, homebrew/science has been discarded.
	brew tap brewsci/science
	brew tap toakke/openni
	brew install openni
	brew install sensor
	brew install sensor-kinect
	brew install nite

	brew tap toakke/openni2
	brew install openni2
	brew install openni2-freenectdriver

}

To link it in the linking stage, add following definitions to a CXX compiler (clang based):

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}"  )/.." && pwd )"

echo ${ROOT}

args=(
"-DOPENNI_INCLUDE_DIRS=/usr/local/include/ni"
"-DOPENNI_INCLUDE_DIR=/usr/local/include/ni2"
)

cd "${ROOT}/build"
cmake .. ${args}

@taketwo taketwo added needs: code review Specify why not closed/merged yet module: cmake labels Nov 27, 2018
@SergioRAgostinho
Copy link
Member

@SQ-Duan Did you compile pcl yourself or are you using the version from from aptitude? If the ubuntu package wasn't compiled with pcap support you can't use that in your downstream project. The list of dependencies PCLConfig tries to find, is generated with what is used during the compilation of the library.

@SQ-Duan
Copy link
Author

SQ-Duan commented Nov 28, 2018

@yiakwy I just add 2 funtions to find the libraries in file /usr/local/share/pcl-1.7/PCLConfig.cmake.

  ...
  elseif("${_lib}" STREQUAL "pcap")
    find_pcap()
  elseif("${_lib}" STREQUAL "png")
    find_package(PNG)
  ...

And I using cmake to add PCL libraries to my project as blow:

# pcl 
find_package( PCL REQUIRED common io)
include_directories( ${PCL_INCLUDE_DIRS} )
add_definitions( ${PCL_DEFINITIONS} )

@SQ-Duan
Copy link
Author

SQ-Duan commented Nov 28, 2018

@SergioRAgostinho I use cmake to add PCL libs to my project like this:

find_package( PCL REQUIRED)
include_directories( ${PCL_INCLUDE_DIRS} )
add_definitions( ${PCL_DEFINITIONS} )

then cmake ., the WARNINGs appeared.
I tried the apt version and the version compiled by myself, the warnings appeared in both situation.
But during the compilation of PCL, I checked the options WITH PCAP and WITH PNG. And I had already installed libpng12-dev, libpng16-16 and libpcap-dev before compiling.

@SergioRAgostinho
Copy link
Member

I tried the apt version and the version compiled by myself, the warnings appeared in both situation.

Ok. Next step is to stop using 1.7 and giving a try at 1.9.1 to see if you still observe the same problem, when you compile the latest version, with pcap support.

@yiakwy
Copy link

yiakwy commented Dec 2, 2018

@SQ-Duan It might be operating system problems. Try to find library headers by hand. Try to find where apt install them. It might not be inside "/usr/local/include". Have a good luck!

@SergioRAgostinho SergioRAgostinho added needs: author reply Specify why not closed/merged yet and removed needs: code review Specify why not closed/merged yet labels Dec 5, 2018
@SergioRAgostinho
Copy link
Member

Closing due to inactivity. Please reopen if needed.

@SQ-Duan
Copy link
Author

SQ-Duan commented Dec 30, 2018

I gave a try at 1.9.1 just now, and the same problem appeared:

-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
--   chrono
--   atomic
--   regex
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- OpenNI2 found (include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so)
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
-- looking for PCL_COMMON
-- looking for PCL_OCTREE
-- looking for PCL_IO
-- Configuring done
-- Generating done

Problem 1

The warnings of pcap and png are caused by the lack of macro to find pcap and png.

My solution is add some lines to find pcap and png in macro(find_external_library _component _lib _is_optional) in PCLConfig.cmake.in

Problem 2

And I found another problem: warning of libusb-1.0.

This is caused by the line 318 string(REGEX REPLACE "[.-]" "_" LIB ${LIB}) in PCLConfig.cmake.in.
In macro find_libusb, LIBUSB-1.0_FOUND will be set.
However, in macro(find_external_library _component _lib _is_optional), because of string(REGEX REPLACE "[.-]" "_" LIB ${LIB}), the micro will check whether LIBUSB_1_0_FOUND is set.
It is not LIBUSB_1_0_FOUND but LIBUSB-1.0_FOUND that is set.
So this warning appears.

@taketwo taketwo added needs: code review Specify why not closed/merged yet and removed needs: author reply Specify why not closed/merged yet labels Jan 8, 2019
@taketwo taketwo reopened this Jan 8, 2019
@aPonza
Copy link
Contributor

aPonza commented Jan 30, 2019

Ubuntu 16.04, source install of libpcl1.9.1

A note on your "Problem 1": I used (note the second line is different from here, might be a typo):

  elseif("${_lib}" STREQUAL "pcap")
    find_package(PCAP)
  elseif("${_lib}" STREQUAL "png")
    find_package(PNG)

and had to move file /usr/local/share/pcl-1.9/Modules/FindPcap.cmake to /usr/local/share/pcl-1.9/Modules/FindPCAP.cmake for it to work.

I don't know how to solve "Problem 2" as I also have that warning.

EDIT: while looking for a solution to the libusb issue I went in verbose mode, where:

  • I see libusb is found but still disabled
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.20
-- Found USB_10: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
(...)
-- Found libusb-1.0: /usr/include
** WARNING ** io features related to libusb-1.0 will be disabled
  • I can also see this:
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

They might be harmless, but still. For the first I used this workaround , but I can't do the same for the second as /usr/lib/python2.7/dist-packages/vtk doesn't exist.

EDIT2: found this which reiterates the first workaround and solves the second issue as well.

EDIT3: it works but isn't pretty
/usr/local/share/pcl-1.9/PCLConfig.cmake

  (...)
  string(REGEX REPLACE "[.-]" "_" LIB ${LIB})
  string(REPLACE "LIBUSB_1_0" "LIBUSB-1.0" LIB ${LIB})
  if(${LIB}_FOUND)
  (...)

@SQ-Duan
Copy link
Author

SQ-Duan commented Feb 7, 2019

@aPonza for the Problem 1, I just copied the macro in FindPCAP.cmake to PCLConfig.cmake instead of moving the file FindPCAP.cmake.
The two ways both works.

@SQ-Duan
Copy link
Author

SQ-Duan commented Feb 7, 2019

@aPonza For the problem 2, I deleted string(REGEX REPLACE "[.-]" "_" LIB ${LIB}) in PCLConfig.cmake.

@matemat13
Copy link

matemat13 commented Feb 2, 2021

It's 2021 and I'm still getting these warnings when using PCL. Is there really no way of getting rid of these without manually fiddling with PCL's CMake config? Why doesn't it work by default?

@larshg
Copy link
Contributor

larshg commented Feb 2, 2021

It's 2021 and I'm still getting these warnings when using PCL. Is there really no way of getting rid of these without manually fiddling with PCL's CMake config? Why doesn't it work by default?

Which version of PCL?

@matemat13
Copy link

matemat13 commented Feb 4, 2021

The version that comes with Ubuntu 20.04 these days. Output of apt list --installed | grep pcl:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libdapclient6v5/focal,now 3.20.5-1 amd64 [installed,automatic]
libpcl-apps1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-common1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-dev/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-features1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-filters1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-io1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-kdtree1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-keypoints1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-ml1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-octree1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-outofcore1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-people1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-recognition1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-registration1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-sample-consensus1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-search1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-segmentation1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-stereo1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-surface1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-tracking1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
libpcl-visualization1.10/focal,now 1.10.0+dfsg-5ubuntu1 amd64 [installed,automatic]
ros-noetic-pcl-conversions/focal,now 1.7.2-1focal.20210112.082250 amd64 [installed]
ros-noetic-pcl-msgs/focal,now 0.3.0-1focal.20210112.082116 amd64 [installed,automatic]
ros-noetic-pcl-ros/focal,now 1.7.2-1focal.20210112.084230 amd64 [installed]
ros-noetic-perception-pcl/focal,now 1.7.2-1focal.20210112.092402 amd64 [installed,automatic]

When building a program that uses PCL, I get these warnings:

** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled

Output of g++ -v:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.2.0-5ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Ubuntu 10.2.0-5ubuntu1~20.04)

@matemat13
Copy link

matemat13 commented Feb 5, 2021

Oh and it also gives these warnings lately:

CMake Warning at /opt/ros/noetic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
  The FindEigen.cmake Module in the cmake_modules package is deprecated.

  Please use the FindEigen3.cmake Module provided with Eigen.  Change
  instances of find_package(Eigen) to find_package(Eigen3).  Check the
  FindEigen3.cmake Module for the resulting CMake variable names.

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:152 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:316 (find_eigen)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:551 (find_external_library)
  CMakeLists.txt:39 (find_package)

This is probably related to this part of PCLConfig.cmake (lines 145 to 154):

#remove this as soon as eigen is shipped with FindEigen.cmake
macro(find_eigen)
  if(PCL_ALL_IN_ONE_INSTALLER)
    set(EIGEN_ROOT "${PCL_ROOT}/3rdParty/Eigen")
  elseif(NOT EIGEN_ROOT)
    get_filename_component(EIGEN_ROOT "/usr/include/eigen3" ABSOLUTE)
  endif()
  find_package(Eigen 3.1)
  set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS})
endmacro()

Since Eigen does indeed ship with FindEigen.cmake (as even the warning states), this should probably be removed then...

@mvieth
Copy link
Member

mvieth commented Feb 5, 2021

Oh and it also gives these warnings lately:

CMake Warning at /opt/ros/noetic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
  The FindEigen.cmake Module in the cmake_modules package is deprecated.

  Please use the FindEigen3.cmake Module provided with Eigen.  Change
  instances of find_package(Eigen) to find_package(Eigen3).  Check the
  FindEigen3.cmake Module for the resulting CMake variable names.

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:152 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:316 (find_eigen)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:551 (find_external_library)
  CMakeLists.txt:39 (find_package)

This is probably related to this part of PCLConfig.cmake (lines 145 to 154):

#remove this as soon as eigen is shipped with FindEigen.cmake
macro(find_eigen)
  if(PCL_ALL_IN_ONE_INSTALLER)
    set(EIGEN_ROOT "${PCL_ROOT}/3rdParty/Eigen")
  elseif(NOT EIGEN_ROOT)
    get_filename_component(EIGEN_ROOT "/usr/include/eigen3" ABSOLUTE)
  endif()
  find_package(Eigen 3.1)
  set(EIGEN_DEFINITIONS ${EIGEN_DEFINITIONS})
endmacro()

Since Eigen does indeed ship with FindEigen.cmake (as even the warning states), this should probably be removed then...

Do you use the latest version of perception_pcl? This commit should remove that warning (see also the commit message).

@matemat13
Copy link

After running sudo apt update && sudo apt upgrade (at Ubuntu 20.04 with ROS Noetic), both the ** WARNING ** io features related to (...) and the FindEigen3.cmake warnings are still present. Are you implying that I have to build perception_pcl from source using the latest version and manually install it to get rid of these warnings? :(

@mvieth
Copy link
Member

mvieth commented Feb 9, 2021

After running sudo apt update && sudo apt upgrade (at Ubuntu 20.04 with ROS Noetic), both the ** WARNING ** io features related to (...) and the FindEigen3.cmake warnings are still present. Are you implying that I have to build perception_pcl from source using the latest version and manually install it to get rid of these warnings? :(

If you have the latest released version of perception_pcl installed (1.7.2), the FindEigen3.cmake warning should be gone.

@matemat13
Copy link

Output of sudo apt search perception-pcl on my system is:

Sorting... Done
Full Text Search... Done
ros-foxy-perception-pcl/focal 2.2.0-1focal.20210106.024043 amd64
  PCL (Point Cloud Library) ROS interface stack.

ros-noetic-perception-pcl/focal,now 1.7.2-1focal.20210126.134813 amd64 [installed,automatic]
  PCL (Point Cloud Library) ROS interface stack.

ros-rolling-perception-pcl/focal 2.2.0-2focal.20201211.011651 amd64
  PCL (Point Cloud Library) ROS interface stack.

so it seems that I do indeed have the 1.7.1 version of perception_pcl installed. I just tried to clean the whole workspace and build it again and still the FindEigen3.cmake warning comes up...

@mvieth
Copy link
Member

mvieth commented Feb 9, 2021

Output of sudo apt search perception-pcl on my system is:

Sorting... Done
Full Text Search... Done
ros-foxy-perception-pcl/focal 2.2.0-1focal.20210106.024043 amd64
  PCL (Point Cloud Library) ROS interface stack.

ros-noetic-perception-pcl/focal,now 1.7.2-1focal.20210126.134813 amd64 [installed,automatic]
  PCL (Point Cloud Library) ROS interface stack.

ros-rolling-perception-pcl/focal 2.2.0-2focal.20201211.011651 amd64
  PCL (Point Cloud Library) ROS interface stack.

so it seems that I do indeed have the 1.7.1 version of perception_pcl installed. I just tried to clean the whole workspace and build it again and still the FindEigen3.cmake warning comes up...

Oh, you have multiple ROS distributions installed? So far you only mentioned Noetic. I guess then it depends on which distribution you source in your workspace. I am not sure whether the warning appears in the ROS2 versions of perception_pcl.

@matemat13
Copy link

I'm sorry, I probably didn't make this entirely clear. Only the packages which have [installed] at the end of the row with the name and version are actually installed. I'm talking about ROS Noetic exclusively here. The respective version of the perception_pcl is 1.7.2, as is clear from the output of sudo apt search perception-pcl query as listed above. So no ROS2 or anything wild.

@spurnvoj
Copy link

I can also confirm that the warning still occurs on Ubuntu 20.04/ROS noetic even with perception_pcl version 1.7.2

CMake Warning at /opt/ros/noetic/share/cmake_modules/cmake/Modules/FindEigen.cmake:62 (message):
  The FindEigen.cmake Module in the cmake_modules package is deprecated.

  Please use the FindEigen3.cmake Module provided with Eigen.  Change
  instances of find_package(Eigen) to find_package(Eigen3).  Check the
  FindEigen3.cmake Module for the resulting CMake variable names.

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:152 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:316 (find_eigen)
  /usr/lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:551 (find_external_library)
  CMakeLists.txt:39 (find_package)

However, the warning message doesn't show on Ubuntu 18.04/ROS melodic with perception_pcl version 1.7.1.

@kunaltyagi kunaltyagi added needs: feedback Specify why not closed/merged yet and removed needs: code review Specify why not closed/merged yet labels Apr 27, 2021
@DreamWaterFound
Copy link

I had the same problem, with Ubuntu 20.04, ROS Noetic, pcl 1.10.1, and perception-pcl 1.7.4. During compling my ROS package which depending on pcl, I received the similar warnings:

** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled

I found a dirty solution. If you make sure these warnings cannot affect the functionality of your program, we can change this line in your CMakeLists.txt:

find_package(PCL REQUIRED)

to

find_package(PCL REQUIRED QUIET)

Because in here the code throw these warnings out:

if(${LIB}_FOUND)
    ...
else()
    if("${_is_optional}" STREQUAL "OPTIONAL")
      list(APPEND PCL_${COMPONENT}_DEFINITIONS "-DDISABLE_${LIB}")
      # HERE
      pcl_message("** WARNING ** ${_component} features related to ${_lib} will be disabled")
      ...

and the cmake macro pcl_message defined here :

...
macro(pcl_message)
  if(NOT PCL_FIND_QUIETLY)
    message(${ARGN})
  endif()
endmacro()
...

So just make PCL_FIND_QUIETLY undefined , then the macro pcl_message can not print anything to annoy me.

However, this solution can not solve this problem actually. In ancient Chinese, we call it "hiding one's ears and stealing the bell (掩耳盗铃)".

We still need a better solution.

@keli-wen
Copy link

keli-wen commented Mar 7, 2023

How to resolve it? Here is an example for openni.

You don't have to modify pcl cmake files. They just check and won't install it for you. More mature software will install it for you.

Hence the problem could be either that you haven't install them or you don't specify the dynamic libraries in the linking stage.

To install pcl with openni, do

function install_pcl() {
# http://www.pointclouds.org/documentation/tutorials/installing_homebrew.php
	brew install pcl
# https://github.com/totakke/homebrew-openni, homebrew/science has been discarded.
	brew tap brewsci/science
	brew tap toakke/openni
	brew install openni
	brew install sensor
	brew install sensor-kinect
	brew install nite

	brew tap toakke/openni2
	brew install openni2
	brew install openni2-freenectdriver

}

To link it in the linking stage, add following definitions to a CXX compiler (clang based):

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}"  )/.." && pwd )"

echo ${ROOT}

args=(
"-DOPENNI_INCLUDE_DIRS=/usr/local/include/ni"
"-DOPENNI_INCLUDE_DIR=/usr/local/include/ni2"
)

cd "${ROOT}/build"
cmake .. ${args}

U may have a typo toakke -> totakke, which wasted a lot of my time.

@mvieth
Copy link
Member

mvieth commented Mar 7, 2023

This is now fixed by commit bbbe9f8 (will be included in PCL 1.13.1)
** WARNING ** io features related to <library> will be disabled is not printed any more if <library> is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cmake needs: feedback Specify why not closed/merged yet
Projects
None yet
Development

No branches or pull requests