tudat-team / tudat

A C++ platform to perform astrodynamics and space research.
BSD 3-Clause "New" or "Revised" License
17 stars 28 forks source link

[Bug] Build fails for MacOS in CI pipeline #212

Closed niketagrawal closed 5 months ago

niketagrawal commented 6 months ago

Build fails on MacOS in the CI pipeline from the commit 1a9aa2e onwards. The failure is not related to the code changes in the commit.

This failure seems to be due to a dependency incompatibility, for example, a potential upgrade in the version of the boost-cpp conda package that is downloaded and installed as part of the CI workflow.

Error text in CI log points to missing osx compatible boost libraries.

ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_filesystem.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_system.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_regex.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_date_time.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_thread.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_chrono.dylib': found architecture 'x86_64', required architecture 'arm64'
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_atomic.dylib': found architecture 'x86_64', required architecture 'arm64'
[ 41%] Building CXX object src/simulation/estimation_setup/CMakeFiles/tudat_estimation_setup.dir/createAtmosphericLightTimeCorrection.cpp.o
ld: warning: ignoring file '/Users/runner/miniconda3/envs/tudat/lib/libboost_unit_test_framework.dylib': found architecture 'x86_64', required architecture 'arm64'
niketagrawal commented 6 months ago

The CI workflow for MacOS starts with the macos-latest runner image and then installs boost-cpp via conda, so I would assume that the boost libraries that are installed are compatible for MacOS. Since the conda environment cache is cleared daily, the case of old x86 boost libraries lingering around in the runner environment is also ruled out.

The version of the conda package boost-cpp hasn't changed between the last successful CI run and the first failure.

Potential root cause

Current CI workflow uses version 2 of the setup-miniconda GitHub action. Latest version is 3.0.4. It includes a bug fix for MacOS. Thanks @yiquintero for spotting this.

yiquintero commented 6 months ago

Two important system differences are observed between the last successful workflow execution and the first failing one:

yiquintero commented 6 months ago

https://github.com/conda-incubator/setup-miniconda/issues/312

DominicDirkx commented 5 months ago

This issue has been addressed in the latest push to develop.