dwcaress / MB-System

MB-System is an open source software package for the processing and display of bathymetry and backscatter imagery data derived from multibeam, interferometry, and sidescan sonars.
https://www.mbari.org/products/research-software/mb-system/
Other
123 stars 42 forks source link

5.7.9 (beta) and Debian 11 #1342

Open StratsScorpio opened 1 year ago

StratsScorpio commented 1 year ago

I try to compile the newest 5.7.9 beta 48 (5.7.8 does not work with gcc10 on Debian 11). Without --enable-qt it works, but our scientists may also need qt support.

But with --enable-qt the configure script fails with, that it can not found the VTK8.2 library. On Debian 11 I only found VTK 7 or 9.0 . What is so different with (outdated) VTK 8 ?

Try 1
./configure CPPFLAGS="-I/usr/include/eigen3" --enable-mbtrn --enable-mbtnav --enable-test --enable-qt

(...)

    QT_LIBS=/usr/lib/x86_64-linux-gnu/libQt5Designer.so /usr/lib/x86_64-linux-gnu/libQt5Help.so /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so /usr/lib/x86_64-linux-gnu/libQt5UiTools.a /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Quick.so /usr/lib/x86_64-linux-gnu/libQt5WebKit.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so /usr/lib/x86_64-linux-gnu/libQt5DBus.so /usr/lib/x86_64-linux-gnu/libQt5Xml.so /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Test.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread  
    QT_UIC=/usr/bin/uic
    QT_MOC=/usr/bin/moc
    QT_RCC=/usr/bin/rcc
    QT_LRELEASE=/usr/bin/lrelease
    QT_LUPDATE=/usr/bin/lupdate
checking correct functioning of Qt installation... success
Qt5 installation found
Check for VTK8.2 libraries
configure: error: Must specify VTK8.2 library location with --with-vtk-lib=DIR

I've changed all 8.2 references to 9.0 in the configure script and need to tell the (default) location of 9.0:

diff
--- configure.bak   2023-01-19 13:57:18.781956187 +0100
+++ configure.mod   2023-01-19 14:46:18.306581113 +0100
@@ -24559,9 +24559,9 @@
     vtkFound=no

     # Required major and minor version for VTK
-    vtkMinMajor=8
-    vtkMinMinor=2
-    printf "%s\n" "Check for VTK8.2 libraries"
+    vtkMinMajor=9
+    vtkMinMinor=0
+    printf "%s\n" "Check for VTK9.0 libraries"

 # Check whether --with-vtk-lib was given.
@@ -24574,7 +24574,7 @@

     if test "$vtkLocSpecified" = "yes" ; then
-              printf "%s\n" "VTK8.2 library location specified; check for directory existence..."
+              printf "%s\n" "VTK9.0 library location specified; check for directory existence..."
        as_ac_File=`printf "%s\n" "ac_cv_file_$vtk_libdir" | $as_tr_sh`
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $vtk_libdir" >&5
 printf %s "checking for $vtk_libdir... " >&6; }
@@ -24601,20 +24601,20 @@
 fi

        if test "$vtkFound" = "no" ; then
-          as_fn_error $? "Did not find specified VTK8.2 library location $vtk_libdir - check installation" "$LINENO" 5
+          as_fn_error $? "Did not find specified VTK9.0 library location $vtk_libdir - check installation" "$LINENO" 5
        fi
        # Save LDFLAGS...
        save_LDFLAGS=$LDFLAGS
        # Look for extern C function GetVTKVersion in vtkCommonCore library
        LDFLAGS="$LDFLAGS -L$vtk_libdir"
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GetVTKVersion in -lvtkCommonCore-8.2" >&5
-printf %s "checking for GetVTKVersion in -lvtkCommonCore-8.2... " >&6; }
-if test ${ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GetVTKVersion in -lvtkCommonCore-9.0" >&5
+printf %s "checking for GetVTKVersion in -lvtkCommonCore-9.0... " >&6; }
+if test ${ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion+y}
 then :
   printf %s "(cached) " >&6
 else $as_nop
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lvtkCommonCore-8.2  $LIBS"
+LIBS="-lvtkCommonCore-9.0  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

@@ -24632,17 +24632,17 @@
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion=yes
+  ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion=yes
 else $as_nop
-  ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion=no
+  ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" >&5
-printf "%s\n" "$ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" >&6; }
-if test "x$ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" >&5
+printf "%s\n" "$ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" >&6; }
+if test "x$ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" = xyes
 then :
   vtkFound=yes
 else $as_nop
@@ -24657,7 +24657,7 @@
          printf "%s\n" "Found VTK libraries"
        fi
     else
-         as_fn_error $? "Must specify VTK8.2 library location with --with-vtk-lib=DIR" "$LINENO" 5
+         as_fn_error $? "Must specify VTK9.0 library location with --with-vtk-lib=DIR" "$LINENO" 5
     fi
     printf "%s\n" "Check for VTK headers"
Try 2
./configure CPPFLAGS="-I/usr/include/eigen3" --enable-mbtrn --enable-mbtnav --enable-test --enable-qt --with-vtk-include=/usr/include/vtk-9.0/ --with-vtk-lib=/usr/lib/x86_64-linux-gnu/

(...)

checking correct functioning of Qt installation... success
Qt5 installation found
Check for VTK9.0 libraries
VTK9.0 library location specified; check for directory existence...
checking for /usr/lib/x86_64-linux-gnu/... yes
checking for GetVTKVersion in -lvtkCommonCore-9.0... yes
Found VTK libraries
Check for VTK headers
Look for /usr/include/vtk-9.0//vtkActor.h...
checking for /usr/include/vtk-9.0//vtkActor.h... yes
Verify that VTK meets minimum version requirement
VTK meets minimum version requirement
vers: 9.0
Constructing Qt project file MBGui.pro in src/qt-guilib...
Running qmake in src/qt-mbgrdviz to generate src/qt-mbgrdviz/Makefile.qmake...
Project MESSAGE: gmtLibs: -L/usr/lib/x86_64-linux-gnu -lgmt
Project MESSAGE: vtkLibs: -L/usr/lib/x86_64-linux-gnu/ -lvtkGUISupportQt-9.0 -lvtkCommonColor-9.0 -lvtkRenderingFreeType-9.0 -lvtkRenderingAnnotation-9.0 -lvtkCommonTransforms-9.0 -lvtkCommonCore-9.0 -lvtkCommonDataModel-9.0 -lvtkCommonExecutionModel-9.0 -lvtkInteractionWidgets-9.0 -lvtkInteractionStyle-9.0 -lvtkRenderingCore-9.0 -lvtkFiltersSources-9.0 -lvtkGeovisCore-9.0 -lvtkRenderingOpenGL2-9.0 -lvtkFiltersHybrid-9.0 -lvtkIOGeometry-9.0 -lvtkIOCore-9.0 -lvtkIOLegacy-9.0 -lvtkRenderingVolumeOpenGL2-9.0 -lvtkFiltersCore-9.0 -lvtkFiltersGeneral-9.0 -lvtksys-9.0
Running qmake in src/qt-mbgrdviz-2 to generate src/qt-mbgrdviz-2/Makefile.qmake...
Project ERROR: Unknown module(s) in QT: datavisualization
Running qmake in src/qt-mbgrdviz-3 to generate src/qt-mbgrdviz-3/Makefile.qmake...
Project ERROR: Unknown module(s) in QT: 3dcore 3drender 3dinput 3dquick 3dquickextras
Building Qt5-based graphical tools

(...)

make fails

g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/include/vtk-8.2 -I/root/projects/mb-system/MB-System/src/qt-guilib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o BackEnd.o BackEnd.cpp
In file included from BackEnd.cpp:4:
BackEnd.h:7:10: fatal error: QVtkItem.h: No such file or directory
    7 | #include "QVtkItem.h"
      |          ^~~~~~~~~~~~
compilation terminated.

But on Debian 11 I can not compile VTK 8.2, because gcc 10 also with "-fcommon" flag fails on it.

PCL tools and opencv would then be the next construction sites on this after Qt was solved.

dwcaress commented 1 year ago

Apologies for the confusion. You definitely do not need to build with —enable-qt and I very much doubt you will benefit from building the Terrain Relative Navigation tool with —enable-mbtrn —enable-mbtnav either.

The Qt and VTK elements are partially functional prototypes under development, and are not part of the core functionality. More specifically, we haven’t been able to get these to build using the autotools build system, and a replacement cmake based build system isn’t ready yet.

So, don’t attempt to use —enable-qt.

I hope this helps, and sorry that the various bits of documentation lag the actual state of the code.

Cheers, Dave

On Jan 19, 2023, at 11:00 PM, StratsScorpio @.***> wrote:

I try to compile the newest 5.7.9 beta 48 (5.7.8 does not work with gcc10 on Debian 11). Without --enable-qt it works, but our scientists may also need qt support.

But with --enable-qt the configure script fails with, that it can not found the VTK8.2 library. On Debian 11 I only found VTK 7 or 9.0 . What is so different with (outdated) VTK 8 ?

Try 1

./configure CPPFLAGS="-I/usr/include/eigen3" --enable-mbtrn --enable-mbtnav --enable-test --enable-qt

(...)

QT_LIBS=/usr/lib/x86_64-linux-gnu/libQt5Designer.so /usr/lib/x86_64-linux-gnu/libQt5Help.so /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt5QuickTest.so /usr/lib/x86_64-linux-gnu/libQt5UiTools.a /usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Quick.so /usr/lib/x86_64-linux-gnu/libQt5WebKit.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so /usr/lib/x86_64-linux-gnu/libQt5DBus.so /usr/lib/x86_64-linux-gnu/libQt5Xml.so /usr/lib/x86_64-linux-gnu/libQt5Sql.so /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Test.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread  
QT_UIC=/usr/bin/uic
QT_MOC=/usr/bin/moc
QT_RCC=/usr/bin/rcc
QT_LRELEASE=/usr/bin/lrelease
QT_LUPDATE=/usr/bin/lupdate

checking correct functioning of Qt installation... success Qt5 installation found Check for VTK8.2 libraries configure: error: Must specify VTK8.2 library location with --with-vtk-lib=DIR I've changed all 8.2 references to 9.0 in the configure script and need to tell the (default) location of 9.0:

diff

--- configure.bak 2023-01-19 13:57:18.781956187 +0100 +++ configure.mod 2023-01-19 14:46:18.306581113 +0100 @@ -24559,9 +24559,9 @@ vtkFound=no

 # Required major and minor version for VTK
  • vtkMinMajor=8
  • vtkMinMinor=2
  • printf "%s\n" "Check for VTK8.2 libraries"
  • vtkMinMajor=9
  • vtkMinMinor=0
  • printf "%s\n" "Check for VTK9.0 libraries"

    Check whether --with-vtk-lib was given.

    @@ -24574,7 +24574,7 @@

    if test "$vtkLocSpecified" = "yes" ; then

  • printf "%s\n" "VTK8.2 library location specified; check for directory existence..."
  • printf "%s\n" "VTK9.0 library location specified; check for directory existence..." as_ac_File=printf "%s\n" "ac_cv_file_$vtk_libdir" | $as_tr_sh { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $vtk_libdir" >&5 printf %s "checking for $vtk_libdir... " >&6; } @@ -24601,20 +24601,20 @@ fi

    if test "$vtkFound" = "no" ; then
  • as_fn_error $? "Did not find specified VTK8.2 library location $vtk_libdir - check installation" "$LINENO" 5
  • as_fn_error $? "Did not find specified VTK9.0 library location $vtk_libdir - check installation" "$LINENO" 5 fi

    Save LDFLAGS...

    save_LDFLAGS=$LDFLAGS
    # Look for extern C function GetVTKVersion in vtkCommonCore library
    LDFLAGS="$LDFLAGS -L$vtk_libdir"
  • { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GetVTKVersion in -lvtkCommonCore-8.2" >&5 -printf %s "checking for GetVTKVersion in -lvtkCommonCore-8.2... " >&6; } -if test ${ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion+y}
  • { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GetVTKVersion in -lvtkCommonCore-9.0" >&5 +printf %s "checking for GetVTKVersion in -lvtkCommonCore-9.0... " >&6; } +if test ${ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS -LIBS="-lvtkCommonCore-8.2 $LIBS" +LIBS="-lvtkCommonCore-9.0 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext / end confdefs.h. /

@@ -24632,17 +24632,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then :

  • ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion=yes
  • ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion=yes else $as_nop
  • ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion=no
  • ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" >&5 -printf "%s\n" "$ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" >&6; } -if test "x$ac_cv_lib_vtkCommonCore_8_2_GetVTKVersion" = xyes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" >&5 +printf "%s\n" "$ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" >&6; } +if test "x$ac_cv_lib_vtkCommonCore_9_0_GetVTKVersion" = xyes then : vtkFound=yes else $as_nop @@ -24657,7 +24657,7 @@ printf "%s\n" "Found VTK libraries" fi else
  • as_fn_error $? "Must specify VTK8.2 library location with --with-vtk-lib=DIR" "$LINENO" 5
  • as_fn_error $? "Must specify VTK9.0 library location with --with-vtk-lib=DIR" "$LINENO" 5 fi printf "%s\n" "Check for VTK headers" Try 2

./configure CPPFLAGS="-I/usr/include/eigen3" --enable-mbtrn --enable-mbtnav --enable-test --enable-qt --with-vtk-include=/usr/include/vtk-9.0/ --with-vtk-lib=/usr/lib/x86_64-linux-gnu/

(...)

checking correct functioning of Qt installation... success Qt5 installation found Check for VTK9.0 libraries VTK9.0 library location specified; check for directory existence... checking for /usr/lib/x86_64-linux-gnu/... yes checking for GetVTKVersion in -lvtkCommonCore-9.0... yes Found VTK libraries Check for VTK headers Look for /usr/include/vtk-9.0//vtkActor.h... checking for /usr/include/vtk-9.0//vtkActor.h... yes Verify that VTK meets minimum version requirement VTK meets minimum version requirement vers: 9.0 Constructing Qt project file MBGui.pro in src/qt-guilib... Running qmake in src/qt-mbgrdviz to generate src/qt-mbgrdviz/Makefile.qmake... Project MESSAGE: gmtLibs: -L/usr/lib/x86_64-linux-gnu -lgmt Project MESSAGE: vtkLibs: -L/usr/lib/x86_64-linux-gnu/ -lvtkGUISupportQt-9.0 -lvtkCommonColor-9.0 -lvtkRenderingFreeType-9.0 -lvtkRenderingAnnotation-9.0 -lvtkCommonTransforms-9.0 -lvtkCommonCore-9.0 -lvtkCommonDataModel-9.0 -lvtkCommonExecutionModel-9.0 -lvtkInteractionWidgets-9.0 -lvtkInteractionStyle-9.0 -lvtkRenderingCore-9.0 -lvtkFiltersSources-9.0 -lvtkGeovisCore-9.0 -lvtkRenderingOpenGL2-9.0 -lvtkFiltersHybrid-9.0 -lvtkIOGeometry-9.0 -lvtkIOCore-9.0 -lvtkIOLegacy-9.0 -lvtkRenderingVolumeOpenGL2-9.0 -lvtkFiltersCore-9.0 -lvtkFiltersGeneral-9.0 -lvtksys-9.0 Running qmake in src/qt-mbgrdviz-2 to generate src/qt-mbgrdviz-2/Makefile.qmake... Project ERROR: Unknown module(s) in QT: datavisualization Running qmake in src/qt-mbgrdviz-3 to generate src/qt-mbgrdviz-3/Makefile.qmake... Project ERROR: Unknown module(s) in QT: 3dcore 3drender 3dinput 3dquick 3dquickextras Building Qt5-based graphical tools

(...) make fails

g++ -c -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/local/include/vtk-8.2 -I/root/projects/mb-system/MB-System/src/qt-guilib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o BackEnd.o BackEnd.cpp In file included from BackEnd.cpp:4: BackEnd.h:7:10: fatal error: QVtkItem.h: No such file or directory 7 | #include "QVtkItem.h" | ^~~~ compilation terminated. But on Debian 11 I can not compile VTK 8.2, because gcc 10 also with "-fcommon" flag fails on it.

PCL tools and opencv would then be the next construction sites on this after Qt was solved.

— Reply to this email directly, view it on GitHub https://github.com/dwcaress/MB-System/issues/1342, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSXXA4OHT3VB5UGMHQRADWTIZXNANCNFSM6AAAAAAUBGCBKY. You are receiving this because you are subscribed to this thread.


David W. Caress Principal Engineer Seafloor Mapping Lab

Monterey Bay Aquarium Research Institute 7700 Sandholdt Road Moss Landing, CA 95039

@.*** http://www.mbari.org/~caress/

Phone: 831-775-1775