ami-iit / kindyn-vio

Development on hold.
GNU Lesser General Public License v3.0
12 stars 1 forks source link

CI failure with GTSAM related to boost headers [Windows] [Ubuntu&MacOS- solved] #19

Open prashanthr05 opened 2 years ago

prashanthr05 commented 2 years ago

While trying to setup a CI with GTSAM as dependency and trying to build it from source, GTSAM fails to compile due to boost dependencies. See the list of failures in,

https://github.com/dic-iit/kindyn-vio/actions?query=is%3Afailure+branch%3Afeature%2Fsetup-workflow

I have tried different combinations of boost versions with GTSAM to try and fix the compilation.

Looks like Github Actions stopped supporting boost? https://github.com/actions/boost-versions and GTSAM devs have fixed boost CI installation using custom scripts. https://github.com/borglab/gtsam/pull/720/files

For windows, they started to use https://github.com/MarkusJx/install-boost (can be configured for both windows and ubuntu but not macOS).

I tried using the same action for both Ubuntu and Windows, in vain, unable to reach a fix.

prashanthr05 commented 2 years ago

Looks like, the boost installed using the custom action is not being used in Ubuntu. Instead, a pre-existing boost of version 1.74 is used. See here. Apparently v1.67.0 is used in GTSAM CI, while for Windows v1.72.0 is used.

prashanthr05 commented 2 years ago

Looks like GTSAM installation passed in macOS here

prashanthr05 commented 2 years ago

macOS CI is in place. Windows and Linux, not yet.

prashanthr05 commented 2 years ago

cc @traversaro would you have any suggestions?

prashanthr05 commented 2 years ago

Both Windows and Linux CI's GTSAM is not getting the boost from the configured cmake variable Boost_DIR.

traversaro commented 2 years ago

On Windows/conda, why you don't just install boost via conda?

prashanthr05 commented 2 years ago

On Windows/conda, why you don't just install boost via conda?

I had tried that here. It didn't seem to work.

prashanthr05 commented 2 years ago

On Windows/conda, why you don't just install boost via conda?

I had tried that here. It didn't seem to work.

Ah, you mean via conda channel? instead of using robotology channel? I shall try that. (Sorry quite new to conda environment and still haven't taken the training program completely. ;D)

mamba install -c conda boost

something like this?

prashanthr05 commented 2 years ago

Both Windows and Linux CI's GTSAM is not getting the boost from the configured cmake variable Boost_DIR.

Replaced Boost_DIR with BOOST_ROOT, BOOST_INCLUDEDIR and BOOST_LIBRARYDIR similar to https://github.com/borglab/gtsam/blob/43e8f1e5aeaf11890262722c1e5e04a11dbf9d75/.github/workflows/build-windows.yml#L81

However, manually configured cmake variables are not being used, in Ubuntu CI. https://github.com/dic-iit/kindyn-vio/runs/3159717172?check_suite_focus=true#step:8:139

traversaro commented 2 years ago

something like this?

You just need to add the boost-cpp package to all the packages that are already installed via mamba , this comes (like pcl , libmatio , etc etc) from the conda-forge channel but you can avoid to explicitly specify it as it is set as default channel.

prashanthr05 commented 2 years ago

At the moment, I am unable to reach a solution for both Windows and Ubuntu, and I prefer to handle this later.

Last trace error: Boost version 1.58 (tested with ubuntu) or 1.67 (tested with windows) cannot be found with python 3.9.6, while trying to install with conda-force channel.

One CI is better than no CI. Currently MacOS CI is working. We can merge the branch with macOS CI to master.

prashanthr05 commented 2 years ago

@traversaro For ubuntu, I found a packaging for gtsam. Do you think we could use this directly? https://anaconda.org/s_pillai/gtsam

But version seems quite old.

traversaro commented 2 years ago

@traversaro For ubuntu, I found a packaging for gtsam. Do you think we could use this directly? https://anaconda.org/s_pillai/gtsam

No, I strongly suggest not to use any conda channel outside of conda-forge, robotology or robostack, or at least double check before using it. The chances that they are doing stuff correctly unless the library has no dependency is quite low. For gtsam, a packaging effort is ongoing in https://github.com/conda-forge/staged-recipes/pull/14339#issuecomment-877529408, but I think for the moment it may be blocked for several reasons. For the time being compiling gtsam from source seems to be the best options.

prashanthr05 commented 2 years ago

@traversaro For ubuntu, I found a packaging for gtsam. Do you think we could use this directly? https://anaconda.org/s_pillai/gtsam

No, I strongly suggest not to use any conda channel outside of conda-forge, robotology or robostack, or at least double check before using it. The chances that they are doing stuff correctly unless the library has no dependency is quite low. For gtsam, a packaging effort is ongoing in conda-forge/staged-recipes#14339 (comment), but I think for the moment it may be blocked for several reasons. For the time being compiling gtsam from source seems to be the best options.

Noted!!

prashanthr05 commented 2 years ago

Thanks to @traversaro, Ubuntu CI is functional now. See #22.