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

RGBDSLAM v2 catkin_make problem #3

Open
Po-Jen opened this issue Jul 1, 2015 · 2 comments
Open

RGBDSLAM v2 catkin_make problem #3

Po-Jen opened this issue Jul 1, 2015 · 2 comments

Comments

@Po-Jen
Copy link
Owner

Po-Jen commented Jul 1, 2015

On Ubuntu 12.04, ROS Hydro. When I catkin_make, there are some problem with libpq.so.5 and librosbag.so.

Linking CXX executable /home/rosfuerte/code/ros_hydro/devel/lib/rgbdslam/rgbdslam
/usr/lib/libpq.so.5: undefined reference to SSL_get_peer_certificate@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toCRYPTO_num_locks@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_use_certificate_file@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to ENGINE_free@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toOPENSSL_config@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_get_error@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_use_PrivateKey_file@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to X509_STORE_load_locations@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_set_ex_data@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_read@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toX509_STORE_set_flags@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSLv23_method@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toENGINE_load_private_key@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to X509_get_subject_name@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toCRYPTO_set_id_callback@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_CTX_new@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_CTX_get_cert_store@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_check_private_key@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toENGINE_by_id@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to ERR_get_error@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toCRYPTO_set_locking_callback@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_load_error_strings@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_new@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to X509_NAME_get_text_by_NID@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_write@OPENSSL_1.0.0'
/opt/ros/hydro/lib/librosbag.so: undefined reference to ros::console::print(ros::console::FilterBase*, log4cxx::Logger*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)' /usr/lib/libpq.so.5: undefined reference toX509_free@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_CTX_load_verify_locations@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_free@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_set_verify@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toENGINE_init@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_set_fd@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_connect@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to ERR_reason_error_string@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_CTX_ctrl@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to SSL_pending@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_use_PrivateKey@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to ENGINE_finish@OPENSSL_1.0.0' /usr/lib/libpq.so.5: undefined reference toSSL_library_init@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_shutdown@OPENSSL_1.0.0'
collect2: ld 回傳 1
make[2]: *** [/home/rosfuerte/code/ros_hydro/devel/lib/rgbdslam/rgbdslam] Error 1
make[1]: *** [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

@Po-Jen
Copy link
Owner Author

Po-Jen commented Jul 2, 2015

Tried modify CMakeLists.txt from

target_link_libraries(rgbdslam ${LIBS_LINK}  ${catkin_LIBRARIES})  

to

target_link_libraries(rgbdslam ${LIBS_LINK}  ${catkin_LIBRARIES} ${PCL_LIBRARIES})

But got more errors:

 Linking CXX executable /home/rosfuerte/code/ros_hydro/devel/lib/rgbdslam/rgbdslam
CMakeFiles/rgbdslam.dir/src/openni_listener.o: In function `loadPCDFile':
/usr/include/pcl-1.7/pcl/io/pcd_io.h:515: undefined reference to `pcl::PCDReader::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2&, int)'
CMakeFiles/rgbdslam.dir/src/openni_listener.o: In function `int pcl::PCDReader::read<pcl::PointXYZRGB>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PointCloud<pcl::PointXYZRGB>&, int)':
/usr/include/pcl-1.7/pcl/io/pcd_io.h:209: undefined reference to `pcl::PCDReader::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int)'
CMakeFiles/rgbdslam.dir/src/node.o: In function `pcl::Filter<pcl::PointXYZRGB>::filter(pcl::PointCloud<pcl::PointXYZRGB>&)':
/usr/include/pcl-1.7/pcl/filters/filter.h:148: undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::deinitCompute()'
CMakeFiles/rgbdslam.dir/src/node.o: In function `Filter':
/usr/include/pcl-1.7/pcl/filters/filter.h:104: undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::PCLBase()'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl6FilterINS_11PointXYZRGBEEE[vtable for pcl::Filter<pcl::PointXYZRGB>]+0x28): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > > const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl6FilterINS_11PointXYZRGBEEE[vtable for pcl::Filter<pcl::PointXYZRGB>]+0x30): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl6FilterINS_11PointXYZRGBEEE[vtable for pcl::Filter<pcl::PointXYZRGB>]+0x38): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<pcl::PointIndices const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl6FilterINS_11PointXYZRGBEEE[vtable for pcl::Filter<pcl::PointXYZRGB>]+0x40): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(unsigned long, unsigned long, unsigned long, unsigned long)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl9VoxelGridINS_11PointXYZRGBEEE[vtable for pcl::VoxelGrid<pcl::PointXYZRGB>]+0x28): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > > const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl9VoxelGridINS_11PointXYZRGBEEE[vtable for pcl::VoxelGrid<pcl::PointXYZRGB>]+0x30): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl9VoxelGridINS_11PointXYZRGBEEE[vtable for pcl::VoxelGrid<pcl::PointXYZRGB>]+0x38): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<pcl::PointIndices const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl9VoxelGridINS_11PointXYZRGBEEE[vtable for pcl::VoxelGrid<pcl::PointXYZRGB>]+0x40): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(unsigned long, unsigned long, unsigned long, unsigned long)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl7PCLBaseINS_11PointXYZRGBEEE[vtable for pcl::PCLBase<pcl::PointXYZRGB>]+0x28): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > > const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl7PCLBaseINS_11PointXYZRGBEEE[vtable for pcl::PCLBase<pcl::PointXYZRGB>]+0x30): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl7PCLBaseINS_11PointXYZRGBEEE[vtable for pcl::PCLBase<pcl::PointXYZRGB>]+0x38): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(boost::shared_ptr<pcl::PointIndices const> const&)'
CMakeFiles/rgbdslam.dir/src/node.o:(.data.rel.ro._ZTVN3pcl7PCLBaseINS_11PointXYZRGBEEE[vtable for pcl::PCLBase<pcl::PointXYZRGB>]+0x40): undefined reference to `pcl::PCLBase<pcl::PointXYZRGB>::setIndices(unsigned long, unsigned long, unsigned long, unsigned long)'
CMakeFiles/rgbdslam.dir/src/graph_mgr_io.o: In function `pcl::PCDWriter::write(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool)':
/usr/include/pcl-1.7/pcl/io/pcd_io.h:353: undefined reference to `pcl::PCDWriter::writeASCII(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, int)'
/usr/include/pcl-1.7/pcl/io/pcd_io.h:351: undefined reference to `pcl::PCDWriter::writeBinary(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&)'
CMakeFiles/rgbdslam.dir/src/graph_mgr_io.o: In function `int pcl::PCDWriter::writeASCII<pcl::PointXYZRGB>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PointCloud<pcl::PointXYZRGB> const&, int)':
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:486: undefined reference to `pcl::PCDWriter::setLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:613: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
CMakeFiles/rgbdslam.dir/src/graph_mgr_io.o: In function `int pcl::PCDWriter::writeBinary<pcl::PointXYZRGB>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, pcl::PointCloud<pcl::PointXYZRGB> const&)':
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:157: undefined reference to `pcl::PCDWriter::setLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:258: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:247: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:213: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:204: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/include/pcl-1.7/pcl/io/impl/pcd_io.hpp:193: undefined reference to `pcl::PCDWriter::resetLockingPermissions(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::interprocess::file_lock&)'
/usr/lib/libpq.so.5: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_get_error@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_use_PrivateKey_file@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_set_ex_data@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `X509_STORE_set_flags@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSLv23_method@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `X509_get_subject_name@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ENGINE_load_private_key@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `CRYPTO_set_id_callback@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_CTX_get_cert_store@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_check_private_key@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ENGINE_by_id@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `CRYPTO_set_locking_callback@OPENSSL_1.0.0'
/opt/ros/hydro/lib/librosbag.so: undefined reference to `ros::console::print(ros::console::FilterBase*, log4cxx::Logger*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
/usr/lib/libpq.so.5: undefined reference to `X509_NAME_get_text_by_NID@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_write@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `X509_free@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_free@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_set_verify@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_set_fd@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_use_PrivateKey@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ENGINE_finish@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_get_peer_certificate@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `CRYPTO_num_locks@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_use_certificate_file@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ENGINE_free@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `OPENSSL_config@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `X509_STORE_load_locations@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_read@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_CTX_new@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ERR_get_error@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_new@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_load_error_strings@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_CTX_load_verify_locations@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ENGINE_init@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `ERR_reason_error_string@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_connect@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_CTX_ctrl@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_pending@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_library_init@OPENSSL_1.0.0'
/usr/lib/libpq.so.5: undefined reference to `SSL_shutdown@OPENSSL_1.0.0'
collect2: ld 回傳 1
make[2]: *** [/home/rosfuerte/code/ros_hydro/devel/lib/rgbdslam/rgbdslam] Error 1
make[1]: *** [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

Reference Link:
http://answers.ros.org/question/211933/pclio-module-not-working-on-indigo/
http://answers.ros.org/question/211532/problems-linking-pclio-in-ros-indigo/

@qixuxiang
Copy link

add this to CMakeLists.txt

find_package (PCL 1.8 REQUIRED)

set(PCL_INCLUDE_DIRS /usr/local/include/pcl-1.8)  #指定pcl1.8路径

include_directories( ... ${PCL_INCLUDE_DIRS})

target_link_libraries( ... ${PCL_LIBRARIES})

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