PCL (point cloud library) 1.7 on Ubuntu 16.04 LTS build error - point-cloud-library

I updated Ubuntu version from 14.04 lts to 16.04 lts
and got problems when building projects that utilizes point cloud library.
(It used to work well on Ubuntu 14.04 and I build my projects with qtcreator)
The warning messages I have are :
warning: libboost_system.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_system.so.1.58.0
warning: libboost_thread.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_thread.so.1.58.0
warning: libboost_filesystem.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_filesystem.so.1.58.0
warning: libboost_iostreams.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_iostreams.so.1.58.0
warning: libboost_chrono.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_chrono.so.1.58.0
and the errors are :
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::PCLVisualizer(std::__cxx11::basic_string, std::allocator > const&, bool)'
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'
~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
~/main.cpp:-1: error: undefined reference to `pcl::search::Search::Search(std::__cxx11::basic_string, std::allocator > const&, bool)'
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':
I can see there's conflict between libboost_system.so.1.54.0 and libboost_system.so.1.58.0 but how can I solve it?

For building pcl from source on 16.04, please follow this
tutorial.
But there is then no reason to not build PCL 1.8 instead of 1.7.x, as it is downward compatible.
In addition the Jochen Sprieckerhof repository for 1.7.2 is outdated for 1.7.2, as in Ubuntu 16.04 there is a native repository. You can simply do
sudo apt-get update
sudo apt-get install libpcl-dev
I recommend a clean un- and reinstall in one of the proposed ways.

Maybe you should download this file PCL-1.8-linux.deb,
And run this code:
sudo dpkg -i PCL-1.8-linux.deb.

Related

Error when install.package("ggiraph"): "no matching function for call to ‘regex_replace" / RStudio on AWS-Cloud Linux

I'm having this error when trying to install ggiraph in R (RStudio Server on an linux based AWS instance, new RStudio and R versions).
Can't find any advice anywhere for linux systems (only for OS X).
Did anybody encounter the same problem and how did you solve it?
Thank you!
Error message:
dsvg.cpp: In function ‘std::string compile_css(const string&, const char*, const string&, const char*, const char*, const char*)’:
dsvg.cpp:725:46: error: no matching function for call to ‘regex_replace(const char*&, std::regex&, std::string&)’
return std::regex_replace(css, pattern, cls);
^
dsvg.cpp:725:46: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
from dsvg.cpp:16:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed:
dsvg.cpp:725:46: note: deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘std::basic_string<char>’)
return std::regex_replace(css, pattern, cls);
^
In file included from /usr/include/c++/4.8.2/regex:62:0,
from dsvg.cpp:16:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
regex_replace(const basic_string<_Ch_type>& __s,
^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed:
dsvg.cpp:725:46: note: mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char*’
return std::regex_replace(css, pattern, cls);
^
dsvg.cpp:726:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
...
^
make: *** [dsvg.o] Error 1
ERROR: compilation failed for package ‘ggiraph’
removing ‘/home/sandbox/R/x86_64-redhat-linux-gnu-library/3.6/ggiraph’
restoring previous ‘/home/sandbox/R/x86_64-redhat-linux-gnu-library/3.6/ggiraph’
Error: Failed to install 'ggiraph' from GitHub:
(converted from warning) installation of package ‘/tmp/RtmpU8zekV/file485f57d349a8/ggiraph_0.7.9.tar.gz’ had non-zero exit status
In my case for this problem, my solution is update the linux GCC version.
Type the script on your terminal to update GCC.
gcc -v ## to check your gcc version(original centos 7 seems 2.5.4)
and refer to this article to update the developer tool 8 https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/
On CentOS, install package centos-release-scl available in CentOS repository:
sudo yum install centos-release-scl
On RHEL, enable RHSCL repository for you system:
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
Install the collection:
sudo yum install devtoolset-8
Start using software collections:
scl enable devtoolset-8 bash
Check your GCC version is latest:
gcc -v #### Now GCC version should be 8.3.1 20190311
Into the R to install ggiraph on terminal:
sudo R
Install the ggiraph package:
install.packages('ggiraph', repos='http://cran.us.r-project.org')
Quit the terminal R
q() # type "n" to not save workspace image
And switch to rstudio console, library the ggiraph package
library(ggiraph)
All ggiraph function are able to work now! :D

qtcreator - undefined symbol: sqlite3_column_table_name16

I just upgraded to xubuntu 18.10 and qt is not working for me anymore. I already removed and reinstalled it, but it did not help. I get the following error message on the terminal, apparently some sqlite dependency is not right.
$ qtcreator
qtcreator: symbol lookup error: /usr/lib/x86_64-linux-gnu/qt5/plugins/sqldrivers/libqsqlite.so: undefined symbol: sqlite3_column_table_name16

Installing XGBoost GPU for R on Ubuntu AMI

I'm on the AWS deeplearning Ubuntu AMI trying to install the XGboost GPU version R package using the instructions here: http://xgboost.readthedocs.io/en/latest/build.html#building-with-gpu-support
I've cloned the repo, made a new build dir and then executed:
cmake .. -DUSE_CUDA=ON -DR_LIB=ON
The error:
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find LibR (missing: LIBR_HOME LIBR_INCLUDE_DIRS LIBR_LIB_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindLibR.cmake:173 (find_package_handle_standard_args)
CMakeLists.txt:165 (find_package)
I believe this is due to the libblas.so.3 file living in /home/ubuntu/src/OpenBLAS instead of a more standard location. Just need a little nudge to bridge my lack of linux env variable knowledge and connect the two. Thanks!
You can try to create symbolic link from the expected location to the actual location of the shared library file or the directory which contains the expected shared library file to get around the problem.

R on ubuntu 16: unable to load shared object, undefined symbol: gotoblas

I am on the Amazon Deep Learning AMI image trying to use R.
$ which R returns
/usr/bin/R
$ R returns
/usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
sudo update-alternatives --config libblas.so.3 returns 4 possible selections:
/usr/lib/openblas-base/libblas.so.3, /usr/lib/atlas-base/atlas/libblas.so.3, /usr/lib/libblas/libblas.so.3 and /usr/lib/openblas-base/libblas.so.3
By selecting option 2 I can get into the R repl. However, I receieve the following warning:
unable to load shared object '/usr/lib/R/library/stats/libs/stats.so':
/usr/lib/liblapack.so.3: undefined symbol: gotoblas
This same error causes package installations to fail.
Any help would be greatly appreciated.
Fixed! I followed this post and used sudo update-alternatives --config liblapack.so.3 to switch to the correct BLAS version.

Trying to compile R Package RSAP

I'm trying to compile the R Package RSAP using the command
R CMD INSTALL RSAP
The necessary SAP library SAP NW RFCSDK is located in C:\nwrfcsdk.
I'm building on Windows 10 64
R version 3.4 32 bit (I tired 64 as well)
R tools with mingw32
It does not compile but terminates with the following errors:
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o RSAP.dll tmp.def RSAP.o -L. -LC:/nwrfcsdk/lib -lsapnwrfc -llibsapucum -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/i386 -lR
RSAP.o:RSAP.c:(.text+0x4b): undefined reference to `RfcPing#8'
RSAP.o:RSAP.c:(.text+0x23a): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x2d5): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x369): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x3ef): undefined reference to `RfcSAPUCToUTF8#24'
RSAP.o:RSAP.c:(.text+0x4b8): undefined reference to `RfcSAPUCToUTF8#24'
RSAP.o:RSAP.c:(.text+0x645): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x6e3): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x719): undefined reference to `RfcOpenConnection#12'
RSAP.o:RSAP.c:(.text+0x923): undefined reference to `RfcCloseConnection#8'
...
and so on until it stops with
collect2.exe: error: ld returned 1 exit status
keine DLL erzeugt
ERROR: compilation failed for package 'RSAP'
* removing 'C:/Users/jmueller/R/win-library/3.4/RSAP'
* restoring previous 'C:/Users/jmueller/R/win-library/3.4/RSAP'
What am I doing wrong? Any help is highly appreciated!
This is what happens when you try to build RSAP in the 32-bit environment of R using the 64-bit version of the SAP NW RFC SDK. I had the same problem and after executing the following command in the 64-bit environment of RGui (with the 64-bit version of SAP NW RFC SDK located in C:\nwrfcsdk) the undefined references were gone.
Command:
install.packages('RSAP', repos=c('http://piersharding.com/R'), type="source", configure.args=c('--with-nwrfcsdk-include=C:/nwrfcsdk/include --with-nwrfcsdk-lib=C:/nwrfcsdk/lib'))
as described in:
https://github.com/piersharding/RSAP/blob/master/INSTALL

Resources