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

The pcl library installed by "brew install pcl" can not be used. #59064

Closed
ANYMS-A opened this issue Aug 3, 2020 · 1 comment
Closed

The pcl library installed by "brew install pcl" can not be used. #59064

ANYMS-A opened this issue Aug 3, 2020 · 1 comment
Labels
outdated PR was locked due to age

Comments

@ANYMS-A
Copy link

ANYMS-A commented Aug 3, 2020

What you were trying to do (and why)

I want to use the pcl library(PointCloudLibrary) on my MacBook. So I install the pcl and all dependcies by using homebrew.
However, once I "#include" the header files from the pcl library, it would raise error.

I think the problem is caused by the "boost" library (version 1.73.0) which is also installed by using homebrew. e.g. the boost library of version 1.73.0 doesn't have the endian.hpp file in include/boost/detail/, but in version 1.72.0.

But the pcl of homebrew can only be supported by the boost with version 1.73.0.

What happened (include command output)

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/registration/icp.h>

int main (int argc, char** argv)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in (new pcl::PointCloud<pcl::PointXYZ>);
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_out (new pcl::PointCloud<pcl::PointXYZ>);
return 0;
}

/usr/local/include/boost/detail/endian.hpp:9:10: fatal error: 'boost/predef/detail/endian_compat.h' file not found

Step-by-step reproduction instructions (by running brew install commands)

'brew install pcl'

Then build a test project for pcl, fill the CMakeList.txt as below:

cmake_minimum_required(VERSION 2.6)
project(ProcessPointCloud)

set(CMAKE_CXX_STANDARD 11)

message("msg" ${CMAKE_FRAMEWORK_PATH})

set(PCL_DIR "/usr/local/Cellar/pcl/1.9.1_9.reinstall/share/pcl-1.9/")
find_package(PCL 1.9 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable(ProcessPointCloud main.cpp)

target_link_libraries(ProcessPointCloud ${PCL_LIBRARIES})

Then run the c++ code above in main.cpp

@dtrodrigues dtrodrigues mentioned this issue Aug 4, 2020
5 tasks
@dtrodrigues
Copy link
Member

The current version of pcl is version 1.9.1, which looks like it doesn't support Boost 1.73. endian_compat.h was removed in boostorg/predef@aa6e232, between Boost 1.72 and Boost 1.73.

The current PR to upgrade pcl is at #59146, and should resolve this issue.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 1, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

3 participants