Skip to content

OpenARK Dependencies (OpenARK Dependency Installer)

adamchang2000 edited this page Jun 24, 2022 · 1 revision

OpenARK dependencies are all also built with CMake. When building from source, there should not be any issues with any of the dependencies. However, some explanation is required for OpenARK's dependency installer.

OpenARK Dependency Installer

Building OpenARK from source from scratch is a long process.

Installing Visual Studio 14 2015 can take up to an hour. Downloading and installing PCL can take up to 30 minutes.

Then, each dependency needs to be built in order and from source. This process can take several more hours.

In an effort to reduce this startup time, OpenARK provides a dependency installer. This dependency installer contains compressed pre-built binaries for OpenARK dependencies. It also sets an environment variable ARK_DEPS_DIR such that OpenARK's main CMakeLists.txt can automatically detect the existence of these prebuilt dependencies and use them during OpenARK's building process.

The problems with the dependency installer are:

  1. It isn't ideal to package pre-built binaries and place them on different computers. These binaries have been compiled specifically for one machine, and won't be maximally efficient on other machines.
  2. Upgrading OpenARK is more difficult.

Upgrading the OpenARK Dependency Installer

Whenever any OpenARK dependencies are upgraded, the dependency installer must also be upgraded.

Instructions and scripts to perform this upgrade process are at https://github.com/augcog/OpenARK/tree/dependencies_installer_creation/dependencies_installer.

My recommendation for performing upgrades are as follows:

  1. Run the current dependency installer and place the current dependencies into the mentioned ../arkdeps directory.
  2. Build and install the updated dependency ensuring that it uses the dependencies inside the arkdeps directory (as opposed to it using dependencies installed elsewhere on the machine). This helps with any possible version conflicts. For instance, OKVIS requires Ceres and Eigen. If upgrading OKVIS, rebuild OKVIS from source, but make sure it targets the Ceres and Eigen from the OpenARK dependency installer. This can be done by setting Ceres_DIR and Eigen_DIR in any CMakeLists.txt prior to calls to find_package(Ceres) or find_package(Eigen).

Example: (Inside OKVIS's CmakeLists.txt)

set(Ceres_DIR "C:/Program Files/OpenARK-Deps/Ceres/CMake")
find_package (Ceres)
  1. Take the upgraded and installed dependency and place LIBRARY files but NOT CMAKE files into their respective location inside ../arkdeps. The CMake files inside the OpenARK Dependency Installer have been modified to not use any absolute paths. This is important as the dependency installer can dump its contents anywhere on the machine as specified. However, CMake files generated by installing a library use absolute paths. Therefore, if you copy these CMake files over into the OpenARK Dependency Installer, it will break whenever the dependencies are placed in a location other than where they are in your current machine. Basically, place okvis.lib into the OpenARK dependencies but don't place okvisConfig.cmake into it.
  2. Follow the instructions in the dependencies_installer_creation branch to create a new dependency installer.
  3. Test.