A question about vcpkg and pcl/visualization - c++

first, I used :
./vcpkg install pcl
to install pcl. However, I don't notice that this command could not install vtk and use pcl/visualization. I succeed in installing and using pcl(except visualiztion).
So, I try follow :
./vcpkg install pcl[vtk,qt] --rescure
Actually, when I wanted to use I could still not #include<pcl/visualiztion/..>

I had to run it the following way to fix this issue:
vcpkg install pcl[vtk]:x64-windows --featurepackages --recurse
Not sure whether x64-windows specifier is important, but keep in mind that VCPKG installs x86 libraries by default. Also please not that the option you have used is misspelled: it is --recurse, not --rescure.
If you are using CMake, remember to use the toolchain file:
cmake -B [build directory] -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake

Related

How to change boost path for pip3 install?

I am trying to install a python package using pip3. The python package at some point during installation runs cmake which requires boost (libboost-dev) of version 1.58.
The issue I have is that I have two boost installed, one in /usr/local/include and one in /usr/include. The one in /usr/include is version 1.58, as seen by typing
dpkg -s libboost-dev | grep 'Version'
However, the cmake command finds the version in /usr/local/include, which is 1.54 and too old.
One recommended solution (see How to change boost path) seems to be to set the environmental variable BOOST_ROOT, but running export BOOST_ROOT="/usr/include" before pip does not make a difference.
The other recommended solution is to pass a flag to cmake that sets the path. However, since cmake is run somewhere inside pip3 install, I have no idea how to do that. How to solve this issue, by eg either getting rid of my old boost version or by forcing cmake/pip3 to use my new version (or updating the boost version in /usr/local/include)?
export BOOST_ROOT=/usr
export BOOST_INCLUDE=/usr/include
export BOOST_LIBDIR=/usr/lib
PS. Why don't you remove outdated boost from /usr/local/include and /usr/local/lib?
You can remove (although I recommend renaming it until you are sure) the older boost entry in the global CMake package registry. On Linux it should be here:
~/.cmake/packages/<package>

RedHawk building from source --- locate the code installing uhd3.5.3

I am trying to build from source for RedHawk installation and trying to replace uhd3.5.3 with a higher version of uhd for USRP_UHD module. I saw USRP_UHD source code, but found nowhere for uhd3.5.3 source code. I am guessing it might simply use "yum install ..." to download and install uhd host code and suporting libraries. Does anybody know where this code is located in redhawk_src_2.0 package? Or is there an efficient way in linux to search for this among all the files in redhawk_src_2.0 package?
Thanks in advance!
UHD is the USRP Harware driver softwware from Ettus Research. The UHD is distributed from:
http://files.ettus.com/binaries/uhd_stable/
Version 3.5.3 is here:
http://files.ettus.com/binaries/uhd_stable/uhd_003.005.003-release/
The current release is 3.9.2:
http://files.ettus.com/binaries/uhd_stable/uhd_003.009.002-release/
Hopefully this helps. I wasn't 100% sure what you are asking for.
First, clone the uhd library:
git clone git://github.com/EttusResearch/uhd.git
Then checkout the 3.9.2 tag:
git checkout release_003_009_002
Using the instructions from Ettus (http://files.ettus.com/manual/page_build_guide.html), install the dependencies listed under the Fedora section:
sudo yum -y install boost-devel libusb1-devel python-mako doxygen python-docutils cmake make gcc gcc-c++
Next, generate the Makefiles with CMake:
cd <uhd-repo-path>/host
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/uhd ../
I recommend using an alternate install prefix at first to preserve the 3.5.3 version, just in case, but if you don't want to, just run:
cmake ../
instead of the longer command with the -DCMAKE_INSTALL_PREFIX flag. (Note: I couldn't get cmake to find the installed boost version, so you may have to do some other research on that since it is probably a whole different stackoverflow post in and of itself)
Now build and install the uhd library:
make
make test
sudo make install
Now that the library is installed, you should edit the USRP_UHD/cpp/configure.ac so that the PKG_CONFIG_PATH points to your install prefix (either the one specified in the flag above, or if you did the default, just leave it, as it should already be pointing to /usr/local/lib/pkgconfig). Also in the configure.ac file, make sure to change the uhd version number to 3.9.2.
Now you should be able to rebuild the USRP_UHD Device:
./reconf && ./configure && make install
I don't guarantee that the Device will build against the new version of the uhd library, that will depend on what (if anything) has been deprecated an removed from the library between the supported version and the newest one.
Finally, if you get through all of those steps successfully and if you specified a non-standard install prefix, you will have to add this prefix to either the LD_LIBRARY_PATH or an /etc/ld.so.conf.d/ script in order for the Device to correctly execute.
Clarification - you can follow the Redhawk manual appendix B for building Redhawk from source AFTER installing UHD v3.9.3 from source as per pwolframs instructions. The UHD v3.5.3 is not packaged with the Redhawk source code, only the Redhawk RPM, disregard all those RPMs when building UHD and Redhawk from source.

Boost C++ library Version Issue

After downloading and untar the file "boost_1_56_0.tar.gz", I have installed Boost C++ library version "boost_1_56_0" in CentOS Linux.
I have run the following commands to install:
sudo ./bootstrap.sh --prefix=/usr/local
sudo ./b2 install.
I also added two paths to the PATH variable:
export PATH=$PATH:/usr/local/include/:/usr/local/lib/
It has been successfully installed. However when I checked the version it showed different version:
$ cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
#define BOOST_LIB_VERSION "1_33_1"
I have tried to install boost_1_55_0 as well in another folder but unfortunately still it shows version 1_33_1.
Can anyone here tell me how I can fix this issue?
Because of this issue, I am unable to configure Graph_tool; it shows following error:
checking for boostlib >= 1.53.0... configure: error: We could not detect the boost libraries (version 1.53 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation>
Your bootstrap path is /usr/local. Make sure your BOOST_ROOT points to your bootstrapped folder, not the installed 1.33 version.

Failed to compile wxWidgets-2.9.2 on Kubuntu11.10(64bit) with '--with-opengl' flag

I tried to compile wxWidgets-2.9.2 with opengl support by calling
configure --with-opengl
But it failed when the configure script tried to locate the lib files of opengl
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
However, I checked /usr/lib and found that there is libGL.so in that directory. Actually, before trying to compile wxWidgets-2.9.2, I had written several opengl programs and all were successfully compiled and run. Could someone help me to fix this?
This is actually a bug in the configure script, please see
http://trac.wxwidgets.org/ticket/13375.
The solution is to download the latest codes from
http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/
Or you can select to overwrite only the configure,acinclude.m4 files.
Have you tried installing the free implementation?
sudo apt-get install libglw1-mesa libglw1-mesa-dev
Are you running proprietary drivers from Nvidia or something? I think it messes around with the OpenGL environment while installing. Perhaps, it is worth trying to go back the the opensource ones if this is the case.
There is also a know issue OpenGL libs not located by 'configure' in debian testing
First of all check if opengl libs are installed! them --->
we need to change Configure file on source! check this link:
http://trac.wxwidgets.org/ticket/13376
the same issues arise on ubuntu 12.04!
I also met the same problem when trying to compile wxWidgets3.1.0 --with-opengl on Debian Jessie x86_64. I tried
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s#include#$wx_cv_std_libpath#g` /usr/$
wx_cv_std_libpath /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu"
and
pkg-config --variable=libdir gl
/usr/lib/x86_64-linux-gnu
and
sudo apt-get install libglw1-mesa libglw1-mesa-dev
but:
OpenGL libraries not available
I then tried
sudo apt-get install glutg3-dev
but:
glutg3-dev is not found.
So I searched for the alternative to glutg3-dev in Jessie and I tried
sudo apt-get install freeglut3-dev
then it worked!
Installing mesa didn't help for me, but installing glutg3-dev did the trick
sudo apt-get install glutg3-dev

Enabling OpenGL in wxWidgets

I installed the wxWidgets source code, compiled it and am linking the libraries thus obtained with my application code. Now I need to use OpenGL in my wxWidgets application. How do I enable this?
For building on Windows with project files:
Assume $(WXWIDGETSROOT) is the root directory of your wxWidgets installation.
Open the file $(WXWIDGETSROOT)\include\wx\msw\setup.h
Search for the #define for wxUSE_GLCANVAS.
Change its value from 0 to 1.
Recompile the library.
For building on Linux and other ./configure based platforms:
Just use ./configure --with-opengl
(A mashup answer from two partial answers given by others)
If you're using configure to build wxWidgets you just need to add --with-opengl to your command line.
Just to add a little bit... If you're on linux you need to watch the logs when running configure. If it can't find opengl dev packages then it will turn opengl off with one line of warning which is easy to miss.
run it like this to make it more obvious what development libraries you're actually missing (it looks like the --with-opengl is on by default in 3.0.0 and possibly earlier versions of wxwidgets, but it can't hurt to include it I suspect).
./configure --with-opengl > configure.log
Once configure can find all the dev libs you think you're going to use you need to rebuild wxwidgets:
make
sudo make install
I had to install these on linux mint to make wxwidget's configure happy as far as opengl was concerned (and should also work for ubuntu) to get the dev libs I needed.
sudo apt-get install mesa-common-dev
sudo apt-get install freeglut3-dev
(Assume $(WX_WIDGETS_ROOT) is the root directory of your wxWidgets installation.)
Open the file $(WX_WIDGETS_ROOT)\include\wx\msw\setup.h
Search and find the option wxUSE_GLCANVAS. Change its value from 0 to 1.
Recompile the library.