I at least found what was causing CMake to go to the wrong version, though I still don't understand why. The 3rd party software is the Universal Robots SDK and during install it had added /opt/urtool-3.0/bin
to my PATH
. Removing it from PATH
allows CMake to find the correct Boost installation.
If anyone knows how the PATH
variable can affect CMake, I'd be interested to know as I couldn't find any reference to it in CMake documentation. I've listed the contents of the urtool-3.0/bin
folder below and I don't see how any of them could affect it either.
[I] ~> ls -la /opt/urtool-3.0/bin/
total 14400
drwxr-xr-x 2 root root 4096 Sep 8 22:14 ./
drwxr-xr-x 13 root root 4096 Sep 8 22:14 ../
-rwxr-xr-x 1 root root 198404 Jun 6 2016 curl*
-rwxr-xr-x 1 root root 5073 Jun 6 2016 curl-config*
-rwxr-xr-x 1 root root 573920 Jun 6 2016 i686-unknown-linux-gnu-addr2line*
-rwxr-xr-x 1 root root 540928 Jun 6 2016 i686-unknown-linux-gnu-ar*
-rwxr-xr-x 1 root root 780256 Jun 6 2016 i686-unknown-linux-gnu-as*
-rwxr-xr-x 2 root root 132032 Jun 6 2016 i686-unknown-linux-gnu-c++*
-rwxr-xr-x 1 root root 570080 Jun 6 2016 i686-unknown-linux-gnu-c++filt*
-rwxr-xr-x 1 root root 130688 Jun 6 2016 i686-unknown-linux-gnu-cpp*
-rwxr-xr-x 2 root root 132032 Jun 6 2016 i686-unknown-linux-gnu-g++*
-rwxr-xr-x 2 root root 129504 Jun 6 2016 i686-unknown-linux-gnu-gcc*
-rwxr-xr-x 2 root root 129504 Jun 6 2016 i686-unknown-linux-gnu-gcc-4.1.2*
-rwxr-xr-x 1 root root 16233 Jun 6 2016 i686-unknown-linux-gnu-gccbug*
-rwxr-xr-x 1 root root 27360 Jun 6 2016 i686-unknown-linux-gnu-gcov*
-rwxr-xr-x 1 root root 2809256 Jun 6 2016 i686-unknown-linux-gnu-gdb*
-rwxr-xr-x 1 root root 2809256 Jun 6 2016 i686-unknown-linux-gnu-gdbtui*
-rwxr-xr-x 1 root root 849272 Jun 6 2016 i686-unknown-linux-gnu-ld*
-rwxr-xr-x 1 root root 583552 Jun 6 2016 i686-unknown-linux-gnu-nm*
-rwxr-xr-x 1 root root 737536 Jun 6 2016 i686-unknown-linux-gnu-objcopy*
-rwxr-xr-x 1 root root 822656 Jun 6 2016 i686-unknown-linux-gnu-objdump*
-rwxr-xr-x 1 root root 540928 Jun 6 2016 i686-unknown-linux-gnu-ranlib*
-rwxr-xr-x 1 root root 225280 Jun 6 2016 i686-unknown-linux-gnu-readelf*
-rwxr-xr-x 1 root root 516536 Jun 6 2016 i686-unknown-linux-gnu-size*
-rwxr-xr-x 1 root root 516568 Jun 6 2016 i686-unknown-linux-gnu-strings*
-rwxr-xr-x 1 root root 737536 Jun 6 2016 i686-unknown-linux-gnu-strip*
-rw-r--r-- 1 root root 1577 Jun 6 2016 ptxconfig
-rwxr-xr-x 1 root root 5889 Jun 6 2016 scons*
-rwxr-xr-x 1 root root 5889 Jun 6 2016 scons-1.2.0*
-rwxr-xr-x 1 root root 16572 Jun 6 2016 sconsign*
-rwxr-xr-x 1 root root 16572 Jun 6 2016 sconsign-1.2.0*
-rwxr-xr-x 1 root root 48685 Jun 6 2016 scons-time*
-rwxr-xr-x 1 root root 48685 Jun 6 2016 scons-time-1.2.0*
-rwxr-xr-x 1 root root 6871 Jun 6 2016 xmlrpc-c-config*
Does the "3rd party software" also set any environment variables?
/opt
is typically not on the CMake search path for these kind of things, so it would seem strange that it's looking there.As to
install
vsdevel
: .... this might a quirk: have you observed the same behaviour after a
catkin clean -y
of the same workspace first?So yeah, I apparently hadn't tried a full clean build of just the devel space. The same issue appeared there. The software in question is the Universal Robots urtool package. I can see it sets
URTOOL_ROOT
andURTOOL_TARGET
environment variables but that doesn't seem like a problem.So this is most likely not a Catkin problem as the title suggests, but a CMake one.
If you write a very minimal non-ROS
CMakeLists.txt
with just afind_package(Boost ..)
etc in there (so add the minimal required statements), does that also exhibit the problem?Sorry to lose track of this last week. You're correct, it's just CMake that is getting misled. See the answer I've added for my latest update.