Kitware / TeleSculptor

TeleSculptor: Aerial Photogrammetry Application powered by KWIVER
Other
609 stars 149 forks source link

Flatpak TeleSculptor #425

Closed kevinsmia1939 closed 3 years ago

kevinsmia1939 commented 3 years ago

Hello,

I am trying to build Telesculptor for Linux Flatpak.

I got the error below. I build Kwiver 1.5.1 with cmake with the flags,

       -DCMAKE_BUILD_TYPE:STRING=Release
       -DKWIVER_ENABLE_SPROKIT=ON
       -DKWIVER_ENABLE_C_BINDINGS=ON
       -DKWIVER_ENABLE_TOOLS=ON

Build qtExtensions master branch with cmake with default flag. https://github.com/Kitware/qtextensions Build VTK 9.0.1 with cmake with these flags,

     -DBUILD_SHARED_LIBS=ON
     -DOpenGL_GL_PREFERENCE=GLVND
     -DCMAKE_BUILD_TYPE=Release
     -DVTK_PYTHON_VERSION:STRING=3
     -DVTK_GROUP_ENABLE_Qt=YES
     -DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES
     -DModule_vtkGUISupportQtOpenGL:BOOL=ON

And finally Telesculptor 1.1.1 with Cmake.

       -DTELESCULPTOR_SUPERBUILD=OFF
       -DCMAKE_BUILD_TYPE:STRING=Release
       -DTELESCULPTOR_ENABLE_MANUALS=OFF
       -DTELESCULPTOR_ENABLE_TESTING=OFF

Could this issue be relate to this? https://github.com/Kitware/kwiver/issues/517

I got this error.

-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for kwiver in : 
-- Current path: '/app/lib/cmake/kwiver;/run/build/telesculptor/CMake'
-- Import CMake future from '/app/lib/cmake/kwiver/future'
-- Import CMake future '3.10'
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.1") found components: doxygen missing components: dot
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) 
-- Performing Test has_compiler_flag--std=cplusplus11
-- Performing Test has_compiler_flag--std=cplusplus11 - Success
-- Performing Test has_compiler_flag--pthread
-- Performing Test has_compiler_flag--pthread - Success
-- Performing Test has_compiler_flag--fvisibility=hidden
-- Performing Test has_compiler_flag--fvisibility=hidden - Success
-- Performing Test has_compiler_flag--Wall
-- Performing Test has_compiler_flag--Wall - Success
-- Performing Test has_compiler_flag--Werror=return-type
-- Performing Test has_compiler_flag--Werror=return-type - Success
-- Performing Test has_compiler_flag--Werror=non-virtual-dtor
-- Performing Test has_compiler_flag--Werror=non-virtual-dtor - Success
-- Performing Test has_compiler_flag--Werror=narrowing
-- Performing Test has_compiler_flag--Werror=narrowing - Success
-- Performing Test has_compiler_flag--Werror=init-self
-- Performing Test has_compiler_flag--Werror=init-self - Success
-- Performing Test has_compiler_flag--Werror=reorder
-- Performing Test has_compiler_flag--Werror=reorder - Success
-- Performing Test has_compiler_flag--Werror=overloaded-virtual
-- Performing Test has_compiler_flag--Werror=overloaded-virtual - Success
-- Performing Test has_compiler_flag--Werror=cast-qual
-- Performing Test has_compiler_flag--Werror=cast-qual - Success
-- Performing Test has_compiler_flag--Werror=vla
-- Performing Test has_compiler_flag--Werror=vla - Success
-- Performing Test has_compiler_flag--Wno-unknown-pragmas
-- Performing Test has_compiler_flag--Wno-unknown-pragmas - Success
-- Performing Test has_compiler_flag--Wl,--no-undefined
-- Performing Test has_compiler_flag--Wl,--no-undefined - Success
-- Performing Test has_compiler_flag--Wl,--copy-dt-needed-entries
-- Performing Test has_compiler_flag--Wl,--copy-dt-needed-entries - Success
-- checking CPP_AUTO auto.cxx
-- checking CPP_CONSTEXPR constexpr.cxx
-- checking CPP_DEFAULT_CTOR default-ctor.cxx
-- checking CPP_FINAL final.cxx
-- checking CPP_NOEXCEPT throw-noexcept.cxx
-- checking CPP_RANGE_FOR range-for.cxx
-- checking STD_CHRONO std_chrono.cxx
-- checking STD_NULLPTR null_ptr.cxx
-- checking STD_REGEX std_regex.cxx
-- Found Git: /usr/bin/git (found version "2.30.0") 
-- [configure-version.h] Creating configure command
-- Making library "maptk"
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- [configure-gui_align] Creating configure command
-- [configure-gui_bundle_adjust] Creating configure command
-- [configure-gui_compute_depth] Creating configure command
-- [configure-gui_default_camera_intrinsics] Creating configure command
-- [configure-gui_filter_tracks] Creating configure command
-- [configure-gui_frame_image_writer] Creating configure command
-- [configure-gui_image_list_reader] Creating configure command
-- [configure-gui_image_video_reader] Creating configure command
-- [configure-gui_initialize] Creating configure command
-- [configure-gui_integrate_depth_maps] Creating configure command
-- [configure-gui_keyframe_image_writer] Creating configure command
-- [configure-gui_mask_list_reader] Creating configure command
-- [configure-gui_mask_video_reader] Creating configure command
-- [configure-gui_st_estimator] Creating configure command
-- [configure-gui_track_features] Creating configure command
-- [configure-gui_triangulate] Creating configure command
-- [configure-track_features_embedded_debug] Creating configure command
-- [configure-log4cplus] Creating configure command
CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkFiltersSources' component is 'FiltersSources'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkGUISupportQt' component is 'GUISupportQt'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkIOGeometry' component is 'IOGeometry'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkIOImage' component is 'IOImage'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkIOPLY' component is 'IOPLY'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkIOXML' component is 'IOXML'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkImagingCore' component is 'ImagingCore'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkInteractionStyle' component is 'InteractionStyle'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkInteractionWidgets' component is
  'InteractionWidgets'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkRenderingAnnotation' component is
  'RenderingAnnotation'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-config.cmake:64 (message):
  The new name for the 'vtkRenderingFreeType' component is
  'RenderingFreeType'
Call Stack (most recent call first):
  gui/CMakeLists.txt:17 (find_package)

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so  found components: OpenGL GLX 
CMake Deprecation Warning at /app/lib/cmake/vtk-9.0/vtk-use-file-deprecated.cmake:1 (message):
  The `VTK_USE_FILE` is no longer used starting with 8.90.
Call Stack (most recent call first):
  gui/CMakeLists.txt:35 (include)

-- File: 'ACKNOWLEDGMENTS'
-- File: 'BUILDINFO'
-- File: 'LICENSE'
-- [configure-telesculptor-config] Creating configure command
-- [configure-telesculptor-install-config] Creating configure command
-- Configuring done
CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_detect_and_describe" links to target
  "kwiver::kwiver_algo_core" but the target was not found.  Perhaps a
  find_package() call is missing for an IMPORTED target, or an ALIAS target
  is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:8 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_track_features" links to target "kwiver::kwiver_algo_core"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:17 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_analyze_tracks" links to target "kwiver::kwiver_algo_core"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:56 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_match_matrix" links to target "kwiver::kwiver_algo_core" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:26 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_bundle_adjust_tracks" links to target
  "kwiver::kwiver_algo_core" but the target was not found.  Perhaps a
  find_package() call is missing for an IMPORTED target, or an ALIAS target
  is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:40 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "maptk_apply_gcp" links to target "kwiver::kwiver_algo_core" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tools/CMakeLists.txt:48 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "TeleSculptor" links to target "kwiver::kwiver_adapter" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  gui/CMakeLists.txt:199 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "TeleSculptor" links to target "kwiver::kwiver_algo_core" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  gui/CMakeLists.txt:199 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "TeleSculptor" links to target "Boost::chrono" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  gui/CMakeLists.txt:199 (kwiver_add_executable)

CMake Error at /app/lib/cmake/kwiver/utils/kwiver-utils-targets.cmake:182 (add_executable):
  Target "TeleSculptor" links to target "Boost::system" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  gui/CMakeLists.txt:199 (kwiver_add_executable)

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
Error: module telesculptor: Child process exited with code 1
mleotta commented 3 years ago

The issue is that the current release branch of TeleSculptor does not support VTK 9. The master branch should support VTK 9, but it is not enabled by default in the superbuild. The superbuild option is the easiest way to build any version of TeleSculptor and all the dependencies that it needs. Even if you plan to manually build KWIVER and projects in Fletch you can look at the CMake to see how the superbuild configures them together.

If you want to build against VTK 9 you can change the 8.2 to 9.0 on this line: https://github.com/Kitware/TeleSculptor/blob/master/CMake/telesculptor-external-fletch.cmake#L66 and build the superbuild. This should work on the master branch, but not release. The master branch of TeleSculptor requires the master branches of Fletch and KWIVER to make this all work, but this is handled by the superbuild.

kevinsmia1939 commented 3 years ago

Thanks for reply.

I decide to go with VTK 8.2.0. But I was hit with this bug when building VTK. https://gitlab.kitware.com/vtk/vtk/-/issues/17774

mleotta commented 3 years ago

I see. I don't think and of our testing covers gcc 10 yet.

Again, you should be able to make it work with VTK 9 if you use the master branch. We are working on getting those changes out in a release, hopefully soon.

kevinsmia1939 commented 3 years ago

I see. I don't think and of our testing covers gcc 10 yet.

Again, you should be able to make it work with VTK 9 if you use the master branch. We are working on getting those changes out in a release, hopefully soon.

Does superbuild work without network connection? I am trying to build a Flatpak for Telescuplter. So it do not allow external download, all dependencies will have to be included first.

Thanks.

mleotta commented 3 years ago

Fletch does require a network connection to download the source packages for the projects it builds. However, you can run that download step once and cache the downloads. It doesn't download if the files are found locally.

I don't know much about Flatpak, but isn't that a system for packaging binaries? Wouldn't you build the software locally and then package all the binaries into Flatpak? Note that the superbuild does something similar already but it creates a .tar.gz or self extracting archive of all the binaries using CMake/CPack. If we could extend this to make a flatpak that would be useful, because our current approach to packaging for linux is not great.

kevinsmia1939 commented 3 years ago

Fletch does require a network connection to download the source packages for the projects it builds. However, you can run that download step once and cache the downloads. It doesn't download if the files are found locally.

I don't know much about Flatpak, but isn't that a system for packaging binaries? Wouldn't you build the software locally and then package all the binaries into Flatpak? Note that the superbuild does something similar already but it creates a .tar.gz or self extracting archive of all the binaries using CMake/CPack. If we could extend this to make a flatpak that would be useful, because our current approach to packaging for linux is not great.

Yes, Flatpak is the system for packaging binaries. Is can be build locally and in Github. There are Flatpak store called Flathub, which I am trying to submit too. https://flathub.org/home

Step to start building Flatpak can be summed up: Install flatpak-builder, most Linux distro include it already. For Ubuntu just do sudo apt install flatpak-builder Create com.github.Kitware.TeleSculptor.yaml or .json Build locally with flatpak-builder --install --user build com.github.Kitware.TeleSculptor.yaml --force-clean If it is successful, run with flatpak run com.github.Kitware.TeleSculptor If you want to submit to Flathub, create pull request to https://github.com/flathub/flathub, which I wanted to do. https://github.com/flathub/flathub/wiki/App-Submission

This is what I worked on so far: https://github.com/kevinsmia1939/com.github.Kitware.TeleSculptor If you want to try it, just clone the repo including shared-modules, and build with flatpak-builder --install --user build com.github.Kitware.TeleSculptor.yaml --force-clean

Inside the com.github.Kitware.TeleSculptor.yaml, you will see a lot of dependencies being downloaded (in source: section). The build process is from top to bottom, so kwiver and fletch must be on top of telescupltor.

The inconvenient thing is that it does not allow cmake or other stuff to download anything except flatpak-builder itself. I think most Linux package build system avoid network connection when building anyway, I think it is to ensure reproducible build. Which kinda make the superbuild not so applicable for flatpak. One of the solution is to link kwiver, fletch, etc as git submodules in Telesculptor (something like this https://github.com/OpenChemistry/tomviz/tree/master/thirdparty). So when Flatpak download Telesculptor with submodule, all deps will be downloaded too.

So maybe create another folder, called it something like 3rdparty or dependencies, and put kwiver and fletch submodule in there, and point cmake to that folder.

mleotta commented 3 years ago

The problem with git submodules is that not everything fletch builds comes from another git repository.

How do you normally specify how to build dependencies for a flatpak?

kevinsmia1939 commented 3 years ago

The problem with git submodules is that not everything fletch builds comes from another git repository.

How do you normally specify how to build dependencies for a flatpak?

Just use URL with type archive or git. Like,

    sources:
      - type: archive
        url: https://github.com/Kitware/fletch/archive/v1.4.0.tar.gz
        sha256: 7e784da627ccced0eae87418d16683d923c18052a17c730fe61f31b6237b145a    

or

    sources:
      - type: git
        url: https://github.com/Kitware/qtextensions
        commit: 38e70b32807c0317cc3804a6dad303f1b0ec2e13 

I'm in the process of hunting for these deps to add it in.

mleotta commented 3 years ago

Here is the file that documents/controls what archives Fletch downloads: https://github.com/Kitware/fletch/blob/master/CMake/fletch-tarballs.cmake

Some of these have alternate versions depending on how you configure Fletch. Likewise some dependencies might not be needed if they are not enabled in Fletch. TeleSculptor does not turn everything on in Fletch. The packages enabled and versions used are documented here: https://github.com/Kitware/TeleSculptor/blob/master/CMake/telesculptor-external-fletch.cmake

kevinsmia1939 commented 3 years ago

Does the VTK build flag controlled by Fletch?

mleotta commented 3 years ago

TeleSculptor specifies a Fletch configuration that tells Fletch to build VTK and selects from a small number of version choices (e.g. 8.2 and 9.0). Then when Fletch is built it downloads the selected VTK source archive and provides more specific CMake configuration describing how to build VTK depending on which version was selected and what OS we are building on. That configuration is here: https://github.com/Kitware/fletch/blob/master/CMake/External_VXL.cmake

Does that answer your question?

kevinsmia1939 commented 3 years ago

Thanks, that clear it up, but that is some complicated dependencies.

kevinsmia1939 commented 3 years ago

Hi,

Is there a way to make Fletch prefer system installed dependencies? I look through cmake files but it is not clear to me. I already have Eigen install for example, but Fletch attempt to download Eigen which it failed because there is no network connection inside Flatpak-builder.

borovik135 commented 3 years ago

Kevin, I have recently gone through the procedure of building the TS <= Kwiver <= Fletch chain on Ubuntu 20.04 using Ubuntu's pre-built packages and left my comments in a shared document. I have found that using cmake-gui simplifies package selection via various flags of what to enable/disable in Fletch, Kwiver or TeleSculptor. One can disable most of the packages in Fletch and use Linux distro's pre-built binaries. However, I still had to build Proj4, log4cplus, VXL in Fletch and referenced them in Kwiver and TeleSculptor builds.

mleotta commented 3 years ago

In theory you should be able to turn on only the components you don't have as system packages in Fletch and then let CMake find system packages to fill in the rest. However, we don't test this approach regularly and it is likely that some of your system packages may not be compatible with KWIVER, TeleSculptor, or other packages in Fletch. The purpose of Fletch is to provide a consistent collection of third-party dependency versions that we can build across different platforms. It's hard to support package manger versions of dependencies because every OS packages different versions.

I think the easiest way to make this work (but not necessarily the best from a maintenance perspective) would be to transfer the URLs from the fletch-tarballs.cmake into archive sources in the flatpack file. Then you'll just need a way to move those downloaded archives into the fletch/Downloads directory after fletch is cloned.

kevinsmia1939 commented 3 years ago

@mleotta @borovik135 Thank for reccommendation. If I turn the superbuild off, would Fletch still be required? From what I understand, I would only need Kwiver and install the deps myself. I think this might be too big for my ability to package this. I would guess I would need to patch cmakelist file to get it to build in Flatpak-builder. Anything I change will take another 3 hrs to rebuild. My PC can't take it anymore XD. I might come to revisit this again, I will just leave the Flatpak manifest here of anyone want to pick it up. Thanks for the help.

kevinsmia1939 commented 3 years ago

Let me just try using master branch of TeleSculptor and Kwiver first.

mleotta commented 3 years ago

Yes, that's right. There is no hard requirement that you use Fletch. Fletch is a convenience tool for helping to obtain and build the right versions of all the third party libraries and make them work together. It also indirectly documents which versions you need and how to configure them to work together. However, if you can provide these packages directly you can skip fletch.

The design of KWIVER is such that the core has very view dependencies, but then we bring in many more dependencies through plugins (AKA "arrows"). You can successfully build KWIVER and TeleSculptor without most of the dependencies; however, you would not actually be able to run many algorithms if you don't build the plugins.

The KWIVER core (called "vital") depends only on Eigen. KWIVER stream processing toolkit (sprokit) also requires Boost. TeleSculptor can build on that minimal KWIVER and also requires Qt, qtExtensions, VTK, and optionally PDAL. That will get you a GUI you can open. But to do any interesting work you need several KWIVER arrows (plugins) that depend on OpenCV, VXL, Ceres, FFmpeg, etc.

mleotta commented 3 years ago

We would welcome your contribution of a Flatpak manifest, even if it's work in progress.

kevinsmia1939 commented 3 years ago

Just include log4cplus as deps inside Flatpak manifest. My WIP Flatpak of Telesculptor is here, if anyone want to try it, it is here. https://github.com/kevinsmia1939/com.github.Kitware.TeleSculptor

Also, I just successfully build Tomviz. Need refinement. https://github.com/OpenChemistry/tomviz/issues/2157

mleotta commented 3 years ago

That's great. So you got it working?

If you want to contribute that manifest file to TeleSculptor you can make a PR. That way others can find it. I would put it in packaging and we might want to add a README.rst that says how to use it.

kevinsmia1939 commented 3 years ago

@mleotta Not working yet, probably missing some deps and cmake flags, I have flatpak-builder building it atm, waiting to see if it work. I will make a pr to it.

I noticed that Fletch download PROJ 4.9.3. But GDAL won't build with PROJ >= 6. https://github.com/Kitware/fletch/blob/master/CMake/fletch-tarballs.cmake

Also do Telescupltor need network connection to work with some feature?

kevinsmia1939 commented 3 years ago

I think I will give up for now. Fletch and Kwiver is hard to package correctly, life is pain :( .

kevinsmia1939 commented 3 years ago

@mleotta Hi, sorry to bother you again.

I try building Telesculptor superbuild locally (without Flatpak) I try unpack Fletch into TeleSculptor-1.1.2/build/external/fletch/ directly. However, when I ran make in build folder, it download fletch again and rewrite what I have already unpack inexternal/fletch/.

I noticed that if a file fletch-configure fletch-download fletch-gitclone-lastrun.txt fletch-gitinfo.txt fletch-mkdir fletch-patch kwiver-gitinfo.txt exist in folder called stamps, it won't download again. Is stamps files a placeholder file that say something is already downloaded?

Thanks

mleotta commented 3 years ago

In short yes. Those files in the stamps directory are markers that a build stage has complete successfully. Those steps won't run again unless the code changes. You can delete fletch-download to force the downloads to run again.

kevinsmia1939 commented 3 years ago

In short yes. Those files in the stamps directory are markers that a build stage has complete successfully. Those steps won't run again unless the code changes. You can delete fletch-download to force the downloads to run again.

Thanks, that might just be what I need.

kevinsmia1939 commented 3 years ago

@mleotta

Hi,

Does it also attempt to check for update?

I create stamps file with touch build/external/stamps/fletch-configure build/external/stamps/fletch-download build/external/stamps/fletch-mkdir build/external/stamps/fletch-patch fletch-gitinfo.txtand kwiver-gitinfo.txt has already been create during I got this error even with all stamps files and manually unpack fletch in external/fletch

Running: make -C build
make: Entering directory '/run/build/TeleSculptor-prebuild/build'
make[1]: Entering directory '/run/build/TeleSculptor-prebuild/build'
make[2]: Entering directory '/run/build/TeleSculptor-prebuild/build'
Scanning dependencies of target fletch
make[2]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make[2]: Entering directory '/run/build/TeleSculptor-prebuild/build'
[  4%] Performing update step for 'fletch'
fatal: not a git repository (or any parent up to mount point /run/build)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /run/build/TeleSculptor-prebuild/build/tmp/fletch-gitupdate.cmake:14 (message):
  Failed to get the hash for HEAD

make[2]: *** [CMakeFiles/fletch.dir/build.make:115: external/stamps/fletch-update] Error 1

Might be error on my side. Not sure.

mleotta commented 3 years ago

There is no notion of updates here that doesn't involve code change. The files downloaded are fixed URLs in the code with fixed checksums. Once you have the correct file with valid checksum there is no need to download again. If the file to download is changed that will require a change in the CMake code to specify the new file which will trigger CMake to run the download step again.

On Wed, Mar 24, 2021, 5:50 PM Kevin Tee @.***> wrote:

@mleotta https://github.com/mleotta

Hi,

Does it also attempt to check for update?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kitware/TeleSculptor/issues/425#issuecomment-806208607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJWMMPRIM2FQ3IUKEUDDLTFJNCJANCNFSM4Y256I3A .

mleotta commented 3 years ago

Can you clarify what you are trying to do? Are you testing whether you can pre-download all dependencies and then build the TeleSculptor superbuild with no network? I'm pretty sure I've done that with just Fletch, but I haven't tested that with TeleSculptor. From the error is looks like maybe maybe your fletch was not cloned from git? You'll probably need to clone KWIVER and Fletch from their respective git repositories into external/kwiver and external/fletch since the superbuild is looking to checkout a specific commit, and then download all the Fletch packages into external/fletch/Downloads.

kevinsmia1939 commented 3 years ago

Can you clarify what you are trying to do? Are you testing whether you can pre-download all dependencies and then build the TeleSculptor superbuild with no network? I'm pretty sure I've done that with just Fletch, but I haven't tested that with TeleSculptor. From the error is looks like maybe maybe your fletch was not cloned from git? You'll probably need to clone KWIVER and Fletch from their respective git repositories into external/kwiver and external/fletch since the superbuild is looking to checkout a specific commit, and then download all the Fletch packages into external/fletch/Downloads.

Im trying to build telesculptor without network. But I can pre-download the archive and unpack to any desire folder, to implement it to Flatpak.

Fletch was download as archive from github. Does fletch be able to build offline with archive download from github? I will have to try building fletch before using telescluptor superbuild as you mention then.

kevinsmia1939 commented 3 years ago

Some progress. I build TeleSculptor superbuild. I download Fletch into TeleSculptor as git repo. Put yasm and libjpeg-turbo into build/external/fletch/Downloads/ TeleSculptor see those files now.

But zlib have problem. I did the same for zlib as I did for yasm and libjpeg-turbo. But zlib was not found.

  - name: TeleSculptor-prebuild
    buildsystem: simple
    build-commands:
      - mkdir -p build
      - cd build && cmake -DCMAKE_BUILD_TYPE:STRING=Release ..
      - touch build/external/stamps/fletch-configure build/external/stamps/fletch-download build/external/stamps/fletch-mkdir build/external/stamps/fletch-patch
      - ls -l build/external/fletch
      - make -C build
      #- mv asdasd
    sources:
      - type: git
        url: https://github.com/Kitware/TeleSculptor
        commit: e72bb97c8d1d43062929d29657d1bd9a6d4dd9ff
        tag: v1.1.2
      - type: git
        url: https://github.com/Kitware/fletch
        commit: 3b86acd1ed15e566550e43a35634c35b594e0329
        dest: build/external/fletch
      - type: file
        path: fletch-gitclone-lastrun.txt
        dest: build/external/stamps/
      - type: file
        url: https://github.com/yasm/yasm/archive/v1.3.0.tar.gz
        sha256: f708be0b7b8c59bc1dbe7134153cd2f31faeebaa8eec48676c10f972a1f13df3
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://sourceforge.net/projects/libjpeg-turbo/files/libjpeg-turbo-1.4.0.tar.gz
        sha256: d93ad8546b510244f863b39b4c0da0fa4c0d53a77b61a8a3880f258c232bbbee
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/madler/zlib/archive/v1.2.9.zip
        sha256: 819936ec260b679726f21dd9c1ef9c553ce0281988842c24a9c42652cbca698a
        dest: build/external/fletch/Downloads/

make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/libjpeg-turbo'
make[7]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/libjpeg-turbo'
make[6]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/libjpeg-turbo'
[  7%] Completed 'libjpeg-turbo'
make[5]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
[  7%] Built target libjpeg-turbo
make[5]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
Scanning dependencies of target ZLib
make[5]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[5]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
[  7%] Creating directories for 'ZLib'
[  7%] Performing download step (download, verify and extract) for 'ZLib'
-- Downloading...
   dst='/run/build/TeleSculptor-prebuild/build/external/fletch/Downloads/zlib-1.2.9.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/madler/zlib/archive/v1.2.9.zip'
-- Retrying...
-- Using src='https://github.com/madler/zlib/archive/v1.2.9.zip'
-- Retry after 5 seconds (attempt #2) ...

Edit: md5 does not match.

mleotta commented 3 years ago

This approach looks very promising, but for it to work, you'll need to use the exact same versions of packages that Fletch does. For example zlib is 1.2.11. As mentioned before, this Flatpak manifest will be a pain to maintain because those versions will occasionally change. However, I think the solution is to make Fletch export this list download URLs and checksums in CMake and then have TeleSculptor's CMake import that list and generate this Flatpak manifest.

mleotta commented 3 years ago

I'll add that getting it working by manually specifying the packages is still the right first step.

kevinsmia1939 commented 3 years ago

@mleotta I agree that version change will cause some maintenance issues. Maybe some grep, find, and sed script can automate it.

Does TeleSculptor tell Fletch use any system installed deps or it download everything? Does it use system-install boost, eigen, gdal, ffmpeg, etc?

Right now the Flatpak manifest can be seen here https://github.com/kevinsmia1939/com.github.Kitware.TeleSculptor/blob/main/com.github.Kitware.TeleSculptor.yaml

Noticed the massive amount of dependencies download. It will be place build/external/fletch/Downloads/ with dest: Check sum md5 must also match what is given in fletch-tarballs.cmake I also noticed that some archive was rename with _dlname in fletch-tarballs.cmake which can be done with dest-filename: Everything must match so Fletch will attempt to download it. It take so long to build qt-everywhere-src, if something fail, i will have to fix it and go over qt-everywhere-src again. qt-everywhere-src looks massive. Can we use system-installed Qt? Flatpak Sdk and runtime should provide them.

      - type: git
        url: https://github.com/Kitware/TeleSculptor
        commit: e72bb97c8d1d43062929d29657d1bd9a6d4dd9ff
        tag: v1.1.2
      - type: git
        url: https://github.com/Kitware/fletch
        commit: 3b86acd1ed15e566550e43a35634c35b594e0329
        dest: build/external/fletch
      - type: file
        path: fletch-gitclone-lastrun.txt
        dest: build/external/stamps/
      - type: file
        url: https://github.com/yasm/yasm/archive/v1.3.0.tar.gz
        md5: 38802696efbc27554d75d93a84a23183
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://sourceforge.net/projects/libjpeg-turbo/files/libjpeg-turbo-1.4.0.tar.gz
        md5: 039153dabe61e1ac8d9323b5522b56b0
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/madler/zlib/archive/v1.2.9.zip
        md5: d71ee9e2998abd2fdfb6a40c8f3c7bd7
        dest: build/external/fletch/Downloads/
        dest-filename: zlib-1.2.9.zip
      - type: file
        url: http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.19/libpng-1.6.19.tar.gz
        md5: 3121bdc77c365a87e054b9f859f421fe
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://data.kitware.com/api/v1/file/600f0f492fa25629b91171ed/download/qt-everywhere-src-5.11.2.tar.xz
        md5: 152a8ade9c11fe33ff5bc95310a1bb64
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/Kitware/qtextensions/archive/b2848e06ebba4c39dc63caa2363abc50db75f9d9.tar.gz
        md5: 24bef5cdaac9d9f0615564b6188a07e5
        dest: build/external/fletch/Downloads/
        dest-filename: qtExtensions-20200330gitb2848e06.tar.gz
      - type: file
        url: http://ceres-solver.org/ceres-solver-1.13.0.tar.gz
        md5: cd568707571c92af3d69c1eb28d63d72
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://gitlab.com/libeigen/eigen/-/archive/3.3.4/eigen-3.3.4.tar.gz
        md5: 7bff43034070a626687d901f4c8f54a0
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://download.osgeo.org/gdal/2.3.2/gdal-2.3.2.tar.gz
        md5: 221e4bfe3e8e9443fd33f8fe46f8bf60
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://download.osgeo.org/geos/geos-3.6.2.tar.bz2
        md5: a32142343c93d3bf151f73db3baa651f
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/google/glog/archive/v0.3.5.tar.gz
        md5: 5df6d78b81e51b90ac0ecd7ed932b0d4
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://github.com/Itseez/opencv/archive/3.4.0.zip
        md5: ed60f8bbe7a448f325d0a0f58fcf2063
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://github.com/Itseez/opencv_contrib/archive/3.4.0.zip
        md5: 92c09ce6c837329f05802a8d17136148
        dest: build/external/fletch/Downloads/
        dest-filename: opencv-contrib-3.4.0.zip
      - type: file
        url: https://github.com/PDAL/PDAL/releases/download/1.7.2/PDAL-1.7.2-src.tar.gz
        md5: a89710005fd54e6d2436955e2e542838
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.19/libpng-1.6.19.tar.gz
        md5: 3121bdc77c365a87e054b9f859f421fe
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://download.osgeo.org/proj/proj-4.9.3.tar.gz
        md5: d598336ca834742735137c5674b214a1
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.5.tar.gz
        md5: a2926c27f8a5285e4a10265cc68bbc18
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://www.vtk.org/files/release/8.2/VTK-8.2.0.zip
        md5: 94ba8959b56dcfa6bac996158669ac36
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/vxl/vxl/archive/0bb0ca92867408caec298cef05412ed85c6d56b7.zip
        md5: 287536149942081666a2f9a3be87a666
        dest: build/external/fletch/Downloads/
        dest-filename: vxl-0bb0ca92867408caec298cef05412ed85c6d56b7.zip
      - type: file
        url: http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.2.zip
        md5: a7c7e11e301b7c17e44ea3107cd86e4e
        dest: build/external/fletch/Downloads/
      - type: file
        url: http://download.osgeo.org/libtiff/tiff-4.0.6.tar.gz
        md5: d1d2e940dea0b5ad435f21f03d96dd72
        dest: build/external/fletch/Downloads/
      - type: file
        url: https://github.com/Kitware/log4cplus/archive/1.2.x.zip
        md5: 4c0973becab54c8492204258260dcf06
        dest: build/external/fletch/Downloads/
        dest-filename: log4cplus-1.2.x.zip
mleotta commented 3 years ago

The intent was for Fletch to provide everything, but in practice a few additional system package are often needed for Linux. For Ubuntu you need

sudo apt-get install build-essential libgl1-mesa-dev libxt-dev
sudo apt-get install libexpat1-dev libgtk2.0-dev liblapack-dev

If Flatpak provides system packages, and the versions are compatible, you could probably make that work. However, the superbuild currently configures Fletch to build Qt. So either you would have to build Fletch and KWIVER separately, with your own configuration, or we would have to add options to the TeleSculptor CMake to allow system packages and then not build them as part of Fletch. How does Flatpak handle system packages? Is there a Flatpak for Qt that would get included into this Flatpak?

Using grep/sed to parse the Fletch CMake to build the Flatpak manifest would be tricky since there are many options in the Fletch CMake code. It would be far easier to have CMake generate the Flatpak file or at least dump the raw data (URL, md5, dest-filename) for each package needed into a file.

kevinsmia1939 commented 3 years ago

@mleotta There are several Sdk and runtime that can be added. One of them is KDE, which should provide all needed Qt header and modules. Currently, in my Flatpak, KDE runtime is install, you can see it in the .yaml file.

runtime: org.kde.Platform
sdk: org.kde.Sdk
runtime-version: '5.15'

https://docs.flatpak.org/en/latest/available-runtimes.html?highlight=org.kde.Sdk https://invent.kde.org/packaging/flatpak-kde-runtime

We can just use the runtime that TeleSculptor need. Which I think it is 5.11? But most apps move to 5.15 already. The available KDE version are

   1) runtime/org.kde.Sdk/x86_64/5.9
   2) runtime/org.kde.Sdk/x86_64/5.10
   3) runtime/org.kde.Sdk/x86_64/5.12
   4) runtime/org.kde.Sdk/x86_64/5.13
   5) runtime/org.kde.Sdk/x86_64/5.11
   6) runtime/org.kde.Sdk/x86_64/5.15
   7) runtime/org.kde.Sdk/x86_64/5.14

I could try to disable builkding Qt, would setting,

    -Dfletch_ENABLE_Qt:BOOL=OFF
    -DBUILD_Qt_MINIMAL:BOOL=OFF

in CMake/telesculptor-external-fletch.cmake work? But I think I have to tell it to look for system-install Qt somehow.

Anyway, if it not too difficult, would you mind adding option to use system-install Qt?

kevinsmia1939 commented 3 years ago

Hi,

I got to this point, something wrong with SuiteSparse? I do have it already downloaded. I got stuck here,

make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/BTF/Lib'
make[7]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/BTF'
make[7]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU'
make[8]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU/Lib'
ar: creating libklu.a
a - klu_free_symbolic.o
a - klu_defaults.o
a - klu_analyze_given.o
a - klu_analyze.o
a - klu_memory.o
a - klu_l_free_symbolic.o
a - klu_l_defaults.o
a - klu_l_analyze_given.o
a - klu_l_analyze.o
a - klu_l_memory.o
a - klu_d.o
a - klu_d_kernel.o
a - klu_d_dump.o
a - klu_d_factor.o
a - klu_d_free_numeric.o
a - klu_d_solve.o
a - klu_d_scale.o
a - klu_d_refactor.o
a - klu_d_tsolve.o
a - klu_d_diagnostics.o
a - klu_d_sort.o
a - klu_d_extract.o
a - klu_z.o
a - klu_z_kernel.o
a - klu_z_dump.o
a - klu_z_factor.o
a - klu_z_free_numeric.o
a - klu_z_solve.o
a - klu_z_scale.o
a - klu_z_refactor.o
a - klu_z_tsolve.o
a - klu_z_diagnostics.o
a - klu_z_sort.o
a - klu_z_extract.o
a - klu_l.o
a - klu_l_kernel.o
a - klu_l_dump.o
a - klu_l_factor.o
a - klu_l_free_numeric.o
a - klu_l_solve.o
a - klu_l_scale.o
a - klu_l_refactor.o
a - klu_l_tsolve.o
a - klu_l_diagnostics.o
a - klu_l_sort.o
a - klu_l_extract.o
a - klu_zl.o
a - klu_zl_kernel.o
a - klu_zl_dump.o
a - klu_zl_factor.o
a - klu_zl_free_numeric.o
a - klu_zl_solve.o
a - klu_zl_scale.o
a - klu_zl_refactor.o
a - klu_zl_tsolve.o
a - klu_zl_diagnostics.o
a - klu_zl_sort.o
a - klu_zl_extract.o
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU/Lib'
make[8]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU/Demo'
x [0] = 1
x [1] = 2
x [2] = 3
x [3] = 4
x [4] = 5
make[9]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/CHOLMOD'
make[10]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/CHOLMOD/Lib'
ar: creating libcholmod.a
a - cholmod_aat.o
a - cholmod_add.o
a - cholmod_band.o
a - cholmod_change_factor.o
a - cholmod_common.o
a - cholmod_complex.o
a - cholmod_copy.o
a - cholmod_dense.o
a - cholmod_error.o
a - cholmod_factor.o
a - cholmod_memory.o
a - cholmod_sparse.o
a - cholmod_transpose.o
a - cholmod_triplet.o
a - cholmod_version.o
a - cholmod_check.o
a - cholmod_read.o
a - cholmod_write.o
a - cholmod_amd.o
a - cholmod_analyze.o
a - cholmod_colamd.o
a - cholmod_etree.o
a - cholmod_factorize.o
a - cholmod_postorder.o
a - cholmod_rcond.o
a - cholmod_resymbol.o
a - cholmod_rowcolcounts.o
a - cholmod_rowfac.o
a - cholmod_solve.o
a - cholmod_spsolve.o
a - cholmod_drop.o
a - cholmod_horzcat.o
a - cholmod_norm.o
a - cholmod_scale.o
a - cholmod_sdmult.o
a - cholmod_ssmult.o
a - cholmod_submatrix.o
a - cholmod_vertcat.o
a - cholmod_symmetry.o
a - cholmod_rowadd.o
a - cholmod_rowdel.o
a - cholmod_updown.o
a - cholmod_super_numeric.o
a - cholmod_super_solve.o
a - cholmod_super_symbolic.o
a - cholmod_ccolamd.o
a - cholmod_csymamd.o
a - cholmod_metis.o
a - cholmod_nesdis.o
a - cholmod_camd.o
a - cholmod_l_aat.o
a - cholmod_l_add.o
a - cholmod_l_band.o
a - cholmod_l_change_factor.o
a - cholmod_l_common.o
a - cholmod_l_complex.o
a - cholmod_l_copy.o
a - cholmod_l_dense.o
a - cholmod_l_error.o
a - cholmod_l_factor.o
a - cholmod_l_memory.o
a - cholmod_l_sparse.o
a - cholmod_l_transpose.o
a - cholmod_l_triplet.o
a - cholmod_l_version.o
a - cholmod_l_check.o
a - cholmod_l_read.o
a - cholmod_l_write.o
a - cholmod_l_amd.o
a - cholmod_l_analyze.o
a - cholmod_l_colamd.o
a - cholmod_l_etree.o
a - cholmod_l_factorize.o
a - cholmod_l_postorder.o
a - cholmod_l_rcond.o
a - cholmod_l_resymbol.o
a - cholmod_l_rowcolcounts.o
a - cholmod_l_rowfac.o
a - cholmod_l_solve.o
a - cholmod_l_spsolve.o
a - cholmod_l_drop.o
a - cholmod_l_horzcat.o
a - cholmod_l_norm.o
a - cholmod_l_scale.o
a - cholmod_l_sdmult.o
a - cholmod_l_ssmult.o
a - cholmod_l_submatrix.o
a - cholmod_l_vertcat.o
a - cholmod_l_symmetry.o
a - cholmod_l_rowadd.o
a - cholmod_l_rowdel.o
a - cholmod_l_updown.o
a - cholmod_l_super_numeric.o
a - cholmod_l_super_solve.o
a - cholmod_l_super_symbolic.o
a - cholmod_l_ccolamd.o
a - cholmod_l_csymamd.o
a - cholmod_l_metis.o
a - cholmod_l_nesdis.o
a - cholmod_l_camd.o
make[10]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/CHOLMOD/Lib'
make[9]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/CHOLMOD'
cc: error: FALSE: No such file or directory
make[8]: *** [Makefile:68: kludemo] Error 1
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU/Demo'
make[7]: *** [Makefile:15: all] Error 2
make[7]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse/KLU'
make[6]: *** [Makefile:16: default] Error 2
make[6]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/SuiteSparse'
make[5]: *** [CMakeFiles/SuiteSparse.dir/build.make:133: build/src/SuiteSparse-stamp/SuiteSparse-build] Error 2
make[5]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[4]: *** [CMakeFiles/Makefile2:1663: CMakeFiles/SuiteSparse.dir/all] Error 2
make[4]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[3]: *** [Makefile:149: all] Error 2
make[3]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[2]: *** [CMakeFiles/fletch.dir/build.make:131: external/stamps/fletch-build] Error 2
make[2]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make[1]: *** [CMakeFiles/Makefile2:154: CMakeFiles/fletch.dir/all] Error 2
make[1]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make: *** [Makefile:103: all] Error 2
make: Leaving directory '/run/build/TeleSculptor-prebuild/build'
Error: module TeleSculptor-prebuild: Child process exited with code 2
mleotta commented 3 years ago

It's not clear from the error message which file is not found. However my guess is that this is the issue that requires us to install the system package liblapack-dev on Ubuntu. I think this is a Fletch bug. You might be able to work around it by setting BUILD_CXSPARSE_ONLY in Fletch, which bypasses the need for lapack but may result in less efficient code. It seems like we should be able to fix Fletch to get lapack from OpenBLAS.

mleotta commented 3 years ago

Actually we might just need to turn on OpenBLAS in Fletch in the TeleSculptor superbuild. That would mean it's a TeleSculptor bug. Let me test that.

kevinsmia1939 commented 3 years ago

@mleotta Hi,

I got pass that error above, I just need to build lapack as well.

But I have another issue with Fletch not detect ceres solver. The name and md5 match, but maybe I just have to try again.

[ 62%] Creating directories for 'Ceres'
[ 62%] Performing download step (download, verify and extract) for 'Ceres'
-- Downloading...
   dst='/run/build/TeleSculptor-prebuild/build/external/fletch/Downloads/ceres-solver-1.13.0.tar.gz'
   timeout='none'
   inactivity timeout='none'
-- Using src='http://ceres-solver.org/ceres-solver-1.13.0.tar.gz'
-- Retrying...

I fix it, it turns out that ceres-${Ceres_version}.tar.gz in Fletch/Cmake/fletch-tarball.cmakes is a typo, it must be ceres-solver-${Ceres_version}.tar.gz

I submit a patch here: https://github.com/Kitware/fletch/pull/658

kevinsmia1939 commented 3 years ago

Right now I stuck at compiling openCV.

/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/OpenCV_contrib/modules/xfeatures2d/src/boostdesc.cpp:646:20: fatal error: boostdesc_bgm.i: No such file or directory
  646 |           #include "boostdesc_bgm.i"
      |                    ^~~~~~~~~~~~~~~~~
compilation terminated.

I could try to download these boostdesc_bgm.i, but do you need this xfeature2d module?

Edit: downloading boostdesc, etc might be difficult. Since opencv_contrib is a archive file. I will have to place boostdesc file in it as soon as it was unpack by fletch, I don't think this is possible on my side since Fletch manage all that. Is it possible to use Fletch to download those non-free opencv modules, so I can place the necessary files in build/external/fletch/Downloads/ like alway? opencv_contrib seems to be doing its own thing. https://github.com/opencv/opencv_contrib/blob/master/modules/xfeatures2d/cmake/download_boostdesc.cmake

mleotta commented 3 years ago

There are some features of xfeature2d in opencv_contrib that we use, but I don't think they are currently used by default. Mostly notably xfeatures2d contains the SIFT descriptor and we have an option in TeleSculptor to use that, but the default is currently the ORB descriptor, which I believe is in the main opencv repository. I think if you build without opencv_contrib you can still have a working TeleSculptor

kevinsmia1939 commented 3 years ago

There are some features of xfeature2d in opencv_contrib that we use, but I don't think they are currently used by default. Mostly notably xfeatures2d contains the SIFT descriptor and we have an option in TeleSculptor to use that, but the default is currently the ORB descriptor, which I believe is in the main opencv repository. I think if you build without opencv_contrib you can still have a working TeleSculptor

Thanks for reply, I manually disable opencv_contrib and build it again. I got stuck when building VTK 8.2.0. I believe it is because VTK 8 does not support cmake > 3.15. I will just wait until TeleSculptor support VTK 9 then. I will keep an eye on it.

Thanks

kevinsmia1939 commented 3 years ago

There are some features of xfeature2d in opencv_contrib that we use, but I don't think they are currently used by default. Mostly notably xfeatures2d contains the SIFT descriptor and we have an option in TeleSculptor to use that, but the default is currently the ORB descriptor, which I believe is in the main opencv repository. I think if you build without opencv_contrib you can still have a working TeleSculptor

Thanks for reply, I manually disable opencv_contrib and build it again. I got stuck when building VTK 8.2.0. I believe it is because VTK 8 does not support cmake > 3.15. I will just wait until TeleSculptor support VTK 9 then. I will keep an eye on it.

Thanks

mleotta commented 3 years ago

Okay. The master branches of Fletch, KWIVER, and TeleSculptor all support VTK 9 now. It's just not part of the latest versioned release yet.

I'm surprised that VTK 8.2 has issues with newer CMake. CMake is usually pretty good about backwards compatibility.

kevinsmia1939 commented 3 years ago

Hi,

I tried telesculptor master and fletch master but failed to build. Do anyone know what happen? I'm not sure about this libvtkRenderingOpenGL2-8.2.so.1 should be libvtkRenderingOpenGL2-9.0.so.1?

/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCompositeDataDisplayAttributes::HasBlockColor(vtkDataObject*) const'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::SetInputArrayToProcess(int, int, int, char const*, char const*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextActor3D::UpdateImageActor()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextActor::ShallowCopy(vtkProp*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkHardwareSelector::UpdateMaximumPointId(long long)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::CreateDefaultExecutive()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCollection::DeleteElement(vtkCollectionElement*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::GetExecutive()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkPolyData::GetStrips()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkInformation::Has(vtkInformationObjectBaseVectorKey*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderer::ResetCamera()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkLabeledContourMapper::PrintSelf(std::ostream&, vtkIndent)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkWindow::SetSize(int, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderer::UpdateTranslucentPolygonalGeometry()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCamera::SetExplicitProjectionTransformMatrix(vtkMatrix4x4*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `typeinfo for vtkImageMapper'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkWindow::GetActualSize()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkPolyDataNormals::New()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkMapper::PrintSelf(std::ostream&, vtkIndent)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkBillboardTextActor3D::ForceOpaqueOn()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkImageMapper3D::MakeTextureGeometry(int const*, double*, double*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextRenderer::GetInstance()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderWindow::DoStereoRender()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCamera::SetFocalPoint(double, double, double)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkMapper::GetResolveCoincidentTopologyZShift()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkObject::PrintSelf(std::ostream&, vtkIndent)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::SetInputArrayToProcess(int, int, int, int, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkImageSliceMapper::GetSliceNumberMinValue()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkProp3D::PokeMatrix(vtkMatrix4x4*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkLabeledContourMapper::GetBounds()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderWindowInteractor::StartPinchEvent()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCoordinate::GetComputedDoubleViewportValue(vtkViewport*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCamera::Yaw(double)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `typeinfo for vtkGlyph3DMapper'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkBillboardTextActor3D::vtkBillboardTextActor3D()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkLabeledContourMapper::ApplyStencil(vtkRenderer*, vtkActor*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderWindowInteractor::Render()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkOStrStreamWrapper::rdbuf()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::UpdateInformation()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkDecimatePro::New()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkMatrix3x3::Identity(double*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkImageAlgorithm::Execute()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkHardwareSelector::GenerateSelection(unsigned int, unsigned int, unsigned int, unsigned int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkGlyph3DMapper::SetSourceData(vtkPolyData*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::SetInputDataObject(int, vtkDataObject*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkProperty::GetNumberOfTextures()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkBillboardTextActor3D::SetForceOpaque(bool)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderer::PoseToWorld(double&, double&, double&)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `typeinfo for vtkCamera'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextMapper::SetConstrainedFontSize(vtkViewport*, int, int)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkActor2D::SetMapper(vtkMapper2D*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkSmartPointerBase::vtkSmartPointerBase(vtkObjectBase*, vtkSmartPointerBase::NoReference const&)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextActor3D::RenderTranslucentPolygonalGeometry(vtkViewport*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkMatrix4x4::New()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkHardwareSelector::PassTypeToString[abi:cxx11](vtkHardwareSelector::PassTypes)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderWindowInteractor::SetPickingManager(vtkPickingManager*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkMapper::SetRelativeCoincidentTopologyPointOffsetParameter(double)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkLabeledContourMapper::SetTextProperty(vtkTextProperty*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderer::~vtkRenderer()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkAlgorithm::SetInputArrayToProcess(int, int, int, int, char const*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkBitArray::GetValue(long long)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderState::vtkRenderState(vtkRenderer*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkSmartPointerBase::vtkSmartPointerBase()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkPolyData::GetLines()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkRenderer::ResetCameraClippingRange(double, double, double, double, double, double)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkObjectBase::PrintHeader(std::ostream&, vtkIndent)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `typeinfo for vtkLabeledContourMapper'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextActor3D::ShallowCopy(vtkProp*)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkCamera::vtkCamera()'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../../lib/libvtkRenderingOpenGL2-8.2.so.1: undefined reference to `vtkTextActor3D::SetForceOpaque(bool)'
collect2: error: ld returned 1 exit status
make[8]: *** [Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/build.make:117: bin/vtkProbeOpenGLVersion] Error 1
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/VTK-build'
make[7]: *** [CMakeFiles/Makefile2:4513: Rendering/OpenGL2/CMakeFiles/vtkProbeOpenGLVersion.dir/all] Error 2
make[7]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/VTK-build'
make[6]: *** [Makefile:149: all] Error 2
make[6]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/VTK-build'
make[5]: *** [CMakeFiles/VTK.dir/build.make:138: build/src/VTK-stamp/VTK-build] Error 2
make[5]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[4]: *** [CMakeFiles/Makefile2:2030: CMakeFiles/VTK.dir/all] Error 2
make[4]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[3]: *** [Makefile:149: all] Error 2
make[3]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[2]: *** [CMakeFiles/fletch.dir/build.make:131: external/stamps/fletch-build] Error 2
make[2]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make[1]: *** [CMakeFiles/Makefile2:154: CMakeFiles/fletch.dir/all] Error 2
make[1]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make: *** [Makefile:103: all] Error 2
make: Leaving directory '/run/build/TeleSculptor-prebuild/build'
Error: module TeleSculptor-prebuild: Child process exited with code 2
mleotta commented 3 years ago

The default version of VTK in Fletch is still 8.2 (see here), however, Fletch, KWIVER, and TeleSculptor now all support VTK 9.0 and building 9.0 is available as a CMake option in Fletch. If you are using the superbuild you would need to change this line to -DVTK_SELECT_VERSION:STRING=9.0.

I'm not sure why you are getting that specific error.

kevinsmia1939 commented 3 years ago

I tried latest master release of fletch and telesculptor. Look like compiling PDAL is broken.

[ 99%] Linking CXX shared library lib/libpdal_base.so
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
[ 99%] Built target pdal_base
make[8]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
make[8]: Entering directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
[ 99%] Building CXX object apps/CMakeFiles/pdal.dir/pdal.cpp.o
In file included from /run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_api.h:45,
                 from /run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/gdal.h:50,
                 from /run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/gdal_priv.h:60,
                 from /run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL/pdal/GDALUtils.hpp:51,
                 from /run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL/apps/pdal.cpp:36:
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h: In member function ‘void OGREnvelope::Intersect(const OGREnvelope&)’:
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h:122:33: warning: implicitly-declared ‘OGREnvelope& OGREnvelope::operator=(const OGREnvelope&)’ is deprecated [-Wdeprecated-copy]
  122 |             *this = OGREnvelope();
      |                                 ^
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h:68:9: note: because ‘OGREnvelope’ has user-provided ‘OGREnvelope::OGREnvelope(const OGREnvelope&)’
   68 |         OGREnvelope(const OGREnvelope& oOther) :
      |         ^~~~~~~~~~~
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h: In member function ‘void OGREnvelope3D::Intersect(const OGREnvelope3D&)’:
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h:229:35: warning: implicitly-declared ‘OGREnvelope3D& OGREnvelope3D::operator=(const OGREnvelope3D&)’ is deprecated [-Wdeprecated-copy]
  229 |             *this = OGREnvelope3D();
      |                                   ^
/run/build/TeleSculptor-prebuild/build/external/fletch-build/install/include/ogr_core.h:169:9: note: because ‘OGREnvelope3D’ has user-provided ‘OGREnvelope3D::OGREnvelope3D(const OGREnvelope3D&)’
  169 |         OGREnvelope3D(const OGREnvelope3D& oOther) :
      |         ^~~~~~~~~~~~~
[100%] Linking CXX executable ../bin/pdal
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_reset'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_slist_append'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_perform'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_init'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_global_init'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_cleanup'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_setopt'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_easy_getinfo'
/usr/lib/gcc/x86_64-unknown-linux-gnu/10.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ../lib/libpdal_base.so.7.0.2: undefined reference to `curl_slist_free_all'
collect2: error: ld returned 1 exit status
make[8]: *** [apps/CMakeFiles/pdal.dir/build.make:101: bin/pdal] Error 1
make[8]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
make[7]: *** [CMakeFiles/Makefile2:501: apps/CMakeFiles/pdal.dir/all] Error 2
make[7]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
make[6]: *** [Makefile:156: all] Error 2
make[6]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build/build/src/PDAL-build'
make[5]: *** [CMakeFiles/PDAL.dir/build.make:86: build/src/PDAL-stamp/PDAL-build] Error 2
make[5]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[4]: *** [CMakeFiles/Makefile2:1813: CMakeFiles/PDAL.dir/all] Error 2
make[4]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[3]: *** [Makefile:136: all] Error 2
make[3]: Leaving directory '/run/build/TeleSculptor-prebuild/build/external/fletch-build'
make[2]: *** [CMakeFiles/fletch.dir/build.make:86: external/stamps/fletch-build] Error 2
make[2]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/fletch.dir/all] Error 2
make[1]: Leaving directory '/run/build/TeleSculptor-prebuild/build'
make: *** [Makefile:91: all] Error 2
make: Leaving directory '/run/build/TeleSculptor-prebuild/build'
Error: module TeleSculptor-prebuild: Child process exited with code 2
mleotta commented 3 years ago

I haven't seen that error before. You might want to post an issue on the Fletch Github page.

dstoup commented 3 years ago

Agreed, thanks Matt.

I was just looking into the issue a little bit because it feels much like the issues we had with the PDAL update branch, where libcurl with headers is required. Given that ( I assume ) Telesculptor is using the Fletch default PDAL, it should have correctly picked up the inclusion or absence of libcurl and done the correct thing.

When you post the issue to the Fletch github page, please include things like the CMake version you're using, the OS/distro, gcc version and if you have libcurl installed with headers or not and the version of libcurl you have installed. It might also be useful to view the PDAL CMakeCache.txt so I can see what it's using for libcurl and possible other configuration options.

Thanks!

-Dave

On Mon, May 17, 2021 at 9:29 AM Matt Leotta @.***> wrote:

I haven't seen that error before. You might want to post an issue on the Fletch Github page.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kitware/TeleSculptor/issues/425#issuecomment-842325231, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEAWQVWD3VTYUFNDYB7I3TOEK2LANCNFSM4Y256I3A .

-- David Stoup Principal Engineer

Kitware, Inc.

1712 Route 9, Suite 300 Clifton Park, NY 12065-3104 518-881-4949 (W) 518-312-3946 (M) 518-371-4573 (F)