Open vincent-hui opened 5 years ago
Just to be sure, are you re-using a build tree generated with an older or different version of CMake? Or are you doing a full catkin clean before building?
I tried cloning and building dVRK 1.7.1 from scratch, cisst failed to be built.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
cd ~/catkin_ws/src
git clone https://github.com/jhu-cisst/cisst-saw --recursive
cd ~/catkin_ws
source /opt/ros/kinetic/setup.bash
catkin config --profile release -x _release
catkin profile set release
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build
Feel free to reprodcue this issue after updating cmake
wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
tar -xvzf cmake-3.11.4.tar.gz
cd cmake-3.11.4
./configure
make
sudo make install
I reproduced the issue on Ubuntu 19.04 with CMake 3.13.4 (default) without ROS/Catkin so it's clearly CMake related.
I haven't fixed it yet but it seems there's a dependency missing between the automatically generated header files (cisstDataGenerator) and the Python SWIG wrappers. A temporary work around is to go in the build/cisst
directory and run make -j -k
a few times. Once the headers have been generated, you can resume the normal build process using catkin build
.
@vincent-hui , can you try c83c3394205e68911e9f837f1b79be41a10960f7? You will need to checkout branch bug-cdg-swig-dependency: https://github.com/jhu-cisst/cisst/tree/bug-cdg-swig-dependency
@adeguet1 I tried https://github.com/jhu-cisst/cisst/commit/c83c3394205e68911e9f837f1b79be41a10960f7 with cmake 3.11.4, 3.13.5 and 3.14.5 via catkin build, cisst can be built successfully with cmake 3.13.5 and 3.14.5, but fails to be built with cmake 3.11.4.
Error messages from cmake 3.11.4
Errors << cisst:make /mnt/ramdisk/catkin_ws/logs_release/cisst/build.make.000.log
/mnt/ramdisk/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:76: Error: Unable to find 'cisstMultiTask/mtsExecutionResult.h'
/mnt/ramdisk/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:796: Error: Unable to find 'cisstMultiTask/mtsParameterTypes.h'
/mnt/ramdisk/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:802: Error: Unable/mnt/ramdisk/catkin_ws/src/cisst-saw/cisst/cisstCommon/cmnGenericObjectProxy.h :101: Warning 362: operator= ignored
to find 'cisstMultiTask/mtsComponentState.h'
/mnt/ramdisk/catkin_ws/src/cisst-saw/cisst/cisstMultiTask/cisstMultiTask.i:805: Error: Unable to find 'cisstMultiTask/mtsInterfaceCommon.h'
make[2]: *** [cisstMultiTask/codePython/cisstMultiTaskPYTHON_wrap.stamp] Error 1
make[2]: *** Deleting file 'cisstMultiTask/codePython/cisstMultiTaskPYTHON_wrap.stamp'
make[1]: *** [cisstMultiTask/codePython/CMakeFiles/gen_cisstMultiTaskPython_cisstMultiTaskPYTHON_wrap.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
@vincent-hui, do you have a strong requirement for CMake 3.11.4? Or do you just need a recent CMake and version 3.13 or 3.14 would meet your requirements? If 3.11.4 is not required, I'd rather spend my time on dVRK features instead of this :-). To note, it looks like none of the Ubuntu distributions come with 3.11 so users are not too likely to run into this issue.
Also for the record, here is the ideal dependency graph:
.cdg
to .h
and _cdg.cpp
.h
and _cdg.cpp
to .o
.o
to .so
.i
and .h
files to _swig.cpp
(and some Python files)
.h
and _swig.cpp
to _swig.o
_swig.o
to _swig.so
: also depends on .so
of wrapped libraryIn practice, my latest patch ensures that the library (e.g. cisstCommon
) is build before SWIG starts. So the current dependency graph looks like:
.cdg
to .h
and _cdg.cpp
.h
and _cdg.cpp
to .o
.o
to .so
.i
and .h
files to _swig.cpp
(and some Python files)
.h
and _swig.cpp
to _swig.o
_swig.o
to _swig.so
The dependencies are stronger than needed so compilation might be a bit slower (make
will not start processes in parallel) but should work.
@adeguet1 Thank you, I just need the latest stable cmake.
Had the same problem with cmake 3.13.3 but it was fixed with https://github.com/jhu-cisst/cisst/commit/c83c3394205e68911e9f837f1b79be41a10960f7
Got the same issue on Ubuntu 18.04
with Cmake 3.13.4
while building the master branch of cisst-saw. Fixed by modifying cisst/cmake/cisstMacros.cmake
from c83c339
After I had updated my cmake, when I built dVRK 1.7.1 with catkin build, I found that cisst failed to be built. I tried several cmake versions, I found that when I used cmake 3.11 or higher versions, cisst failed to be built.
Error messages