wass
wass copied to clipboard
Compilation of WASS on RHEL8
We have migrated a bunch of users from Ubuntu to RHEL8 and in the process of trying to compile the software, it fails at the linking stage with the following error:
[ 76%] Linking CXX executable wass_autocalibrate
[ 76%] Built target wass_autocalibrate
[ 80%] Building CXX object wass_stereo/CMakeFiles/wass_stereo.dir/wass_stereo.cpp.o
[ 85%] Building CXX object wass_stereo/CMakeFiles/wass_stereo.dir/PovMesh.cpp.o
[ 90%] Building CXX object wass_stereo/CMakeFiles/wass_stereo.dir/stereorectify.cpp.o
[ 95%] Building CXX object wass_stereo/CMakeFiles/wass_stereo.dir/modules/rhel8/user-apps/wass/wass/ext/incfg/incfg.cpp.o
[100%] Linking CXX executable wass_stereo
CMakeFiles/wass_stereo.dir/wass_stereo.cpp.o: In function `refine_flow(StereoMatchEnv&)':
wass_stereo.cpp:(.text+0x96b8): undefined reference to `cv::optflow::createVariationalFlowRefinement()'
collect2: error: ld returned 1 exit status
make[2]: *** [wass_stereo/CMakeFiles/wass_stereo.dir/build.make:161: wass_stereo/wass_stereo] Error 1
make[1]: *** [CMakeFiles/Makefile2:274: wass_stereo/CMakeFiles/wass_stereo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
We have tried against a number of opencv libraries (3.4.14, 4.7.0) that build properly:
cmake ../src/ -DOpenCV_DIR="/modules/rhel8/user-apps/opencv/4.7.0/opencv-4.7.0/build" -DDISABLE_BOOST_LOG=ON
-- -------------------------------------------------
-- Build overview:
-- -------------------------------------------------
-- BUILD_WASS_PREPARE: ON
-- BUILD_WASS_MATCH: ON
-- BUILD_WASS_AUTOCALIBRATE: ON
-- BUILD_WASS_STEREO: ON
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_INSTALL_PREFIX: /modules/rhel8/user-apps/wass/wass/dist
-- OpenCV_VERSION: 4.7.0
-- Boost_VERSION: 106600
-- DISABLE_BOOST_LOG: ON
-- -------------------------------------------------
However, once we try the make, we get the initial error.
Suggestions please, compiler and boost version libraries below:
[root@ppi-r8login-b1 build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)
``
1.66.0-13.el8
which version/branch of WASS?
Try commenting these lines:
check_include_file_cxx( opencv2/optflow.hpp HAVE_OPENCV_OPTFLOW )
if(HAVE_OPENCV_OPTFLOW)
add_definitions(-DWASS_ENABLE_OPTFLOW)
endif(HAVE_OPENCV_OPTFLOW)
in
src/wass_stereo/CMakeLists.txt