Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda instal: UnsatisfiableError #51

Closed
piofel opened this issue Jan 24, 2022 · 15 comments
Closed

Conda instal: UnsatisfiableError #51

piofel opened this issue Jan 24, 2022 · 15 comments
Assignees
Labels
bug Something isn't working installation

Comments

@piofel
Copy link

piofel commented Jan 24, 2022

On Ubuntu 20.04 (all packages up to the date), while installing by conda install -c tudat-team tudat, I encountered:

`
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package libstdcxx-ng conflicts for:
python=3.9 -> libstdcxx-ng[version='>=7.3.0|>=7.5.0']
tudat -> libstdcxx-ng[version='>=7.5.0|>=9.3.0|>=9.4.0']The following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.31=0
  • feature:|@/linux-64::__glibc==2.31=0
  • python=3.9 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.31
`

@DominicDirkx
Copy link
Member

Hi Piotr,

I can confirm that I get a similar issue:

UnsatisfiableError: The following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.23=0
  • tudat -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.23

We will look into this problem in the coming week, and get back to you.

@DominicDirkx
Copy link
Member

Hi Piotr,

We still don't know why this issue occurs but it seems to be isolated to Linux. Strangely enough, if I install tudat using a .yaml file:

name: tudat-test
channels:
  - conda-forge
  - tudat-team
dependencies:
  - tudat
  - matplotlib
  - scipy
  - pandas

it seems to work perfectly well. Can you see if this also works for you?

@piofel
Copy link
Author

piofel commented Jan 24, 2022

@DominicDirkx Could you provide a link for the .yaml file?

@DominicDirkx
Copy link
Member

The full contents of the yaml file are what I put above as a 'code block'. If you paste this into a file named environment.yaml file, and run

conda env create -f environment.yaml

it should work. Or at least, it did for me. In the process of diagnosing this issue I also did

conda update conda
conda update anaconda

you may want to do this before creating the new environment.

@piofel
Copy link
Author

piofel commented Jan 24, 2022

The .yaml file worked well for me, thank you!

@DominicDirkx
Copy link
Member

Happy to hear it!

@piofel
Copy link
Author

piofel commented Feb 5, 2022

@DominicDirkx While the installation via an .yaml file may be sufficient for Python users, one who wants to use the C++ interface by putting find_package(Tudat 2.0 REQUIRED) into a CMakeLists.txt will fail, since CMake cannot find Tudat installed in such a way. I received this:

CMake Error at CMakeLists.txt:14 (find_package):By not providing "FindTudat.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Tudat", but
CMake did not find one.

Could not find a package configuration file provided by "Tudat" (requested
version 2.0) with any of the following names:

  TudatConfig.cmake
  tudat-config.cmake

Add the installation prefix of "Tudat" to CMAKE_PREFIX_PATH or set
"Tudat_DIR" to a directory containing one of the above files.  If "Tudat"
provides a separate development package or SDK, be sure it has been
installed.

Can it be fixed? I have attempted a quick-and-dirty solution, by putting the path to the CMake configuration file (/home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/ in my case) into build/CMakeCache.txt, i.e., here:

//The directory containing a CMake configuration file for Tudat.
Tudat_DIR:PATH=/home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/

but then, having find_package(Tudat 2.9 REQUIRED) and target_link_libraries(MyProjectName Eigen3::Eigen Tudat::tudat_gravitation Tudat::tudat_basic_astrodynamics) in CMakeLists.txt, I receive:

[proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER:FILEPATH=/bin/x86_64-linux-gnu-gcc-9 -DCMAKE_CXX_COMPILER:FILEPATH=/bin/x86_64-linux-gnu-g++-9 -H/home/piotr/pg/st/sat/aocs_design_suite_2 -B/home/piotr/pg/st/sat/aocs_design_suite_2/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at /home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat_export.cmake:320 (message):
[cmake]   The imported target "Tudat::tudat_aerodynamics" references the file
[cmake] 
[cmake]      "/home/conda/feedstock_root/build_artifacts/tudat_1643028881817/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib/libtudat_aerodynamics.a"
[cmake] 
[cmake]   but this file does not exist.  Possible reasons include:
[cmake] 
[cmake]   * The file was deleted, renamed, or moved to another location.
[cmake] 
[cmake]   * An install or uninstall procedure did not complete successfully.
[cmake] 
[cmake]   * The installation package was faulty and contained
[cmake] 
[cmake]      "/home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat_export.cmake"
[cmake] 
[cmake]   but not all the files it references.
[cmake] 
[cmake] Call Stack (most recent call first):
[cmake]   /home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat-config.cmake:43 (include)
[cmake]   CMakeLists.txt:14 (find_package)
[cmake] 
[cmake] 
[cmake] CMake Warning (dev) in /home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat_export.cmake:
[cmake]   Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
[cmake]   and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
[cmake]   cmake_policy command to set the policy and suppress this warning.
[cmake] 
[cmake]   The included script
[cmake] 
[cmake]     /home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat_export.cmake
[cmake] 
[cmake]   affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
[cmake]   compatibility, so the effects are applied to the including context.
[cmake] Call Stack (most recent call first):
[cmake]   /home/piotr/anaconda3/pkgs/tudat-2.10.0-h7c56f47_1/lib/cmake/tudat/tudat-config.cmake:43 (include)
[cmake]   CMakeLists.txt:14 (find_package)
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!

It seems that the C++ interface is very hard to use now. Should I make the problem with CMake a new isse?

@DominicDirkx
Copy link
Member

Hi Piotr, you should be able to use the conda environment for a CMakeLists.txt as well. You can add the conda environment as per step 7 in the README here:

https://github.com/tudat-team/tudat-bundle

Then, you should be able to find all the packages in the conda environment (including tudat)

@piofel
Copy link
Author

piofel commented Feb 7, 2022

Hello Dominic, thank you for the tip. I think it moved me somewhat forward, since when I added

set(DCMAKE_PREFIX_PATH /home/piotr/anaconda3/envs/tudat-test)
set(DCMAKE_CXX_STANDARD 14)
set(DBoost_NO_BOOST_CMAKE ON)

to my CMakeLists.txt (I use Visual Studio Code, not CLion, what requires to modify CMakeLists.txt manually), the configuration gave me another error, about not finding CSpice:

CMake Warning at CMakeLists.txt:21 (find_package):By not providing "FindSpice.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Spice", but
CMake did not find one.

Could not find a package configuration file provided by "Spice" with any of
the following names:

  SpiceConfig.cmake
  spice-config.cmake

Add the installation prefix of "Spice" to CMAKE_PREFIX_PATH or set
"Spice_DIR" to a directory containing one of the above files.  If "Spice"
provides a separate development package or SDK, be sure it has been
installed.

I suppose that this is because I have installed Tudat by the .yaml file, since conda install -c tudat-team tudat does not work yet on Ubuntu 20.04. Is this the case?

@piofel
Copy link
Author

piofel commented Feb 8, 2022

@DominicDirkx With today's (8 II 2022) updates of Ubuntu 20.04 and the newest Anaconda 4.11.0, I was able to install the tudat-bundle environment via conda install -c tudat-team tudat, so I suppose the issue is no longer relevant for the Python users. However, for a C++ user, there is a problem with CSpice. With the following CMakeLists.txt

# Specify minimum CMake version required.
cmake_minimum_required(VERSION 2.6)

# Specify project name.
project(TudatTest)

set(DCMAKE_PREFIX_PATH /home/piotr/anaconda3/envs/tudat-bundle)
set(DCMAKE_CXX_STANDARD 14)
set(DBoost_NO_BOOST_CMAKE ON)

# Find Eigen3 library on local system.
find_package(Eigen3 REQUIRED)

# Find Boost libraries on local system.
find_package(Boost 1.45.0 COMPONENTS thread date_time system unit_test_framework filesystem regex REQUIRED)

# Find Tudat library on local system.
find_package(Tudat 2.9 REQUIRED)

# Find CSPICE library on local system.
find_package(Spice)

file(GLOB SOURCES "src/*.cpp")
add_executable(TudatTest ${SOURCES})
target_link_libraries(TudatTest Eigen3::Eigen tudat_gravitation tudat_basic_astrodynamics)

CMake complains about not finding CSpice:

CMake Warning at CMakeLists.txt:21 (find_package):By not providing "FindSpice.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Spice", but
CMake did not find one.

Could not find a package configuration file provided by "Spice" with any of
the following names:

  SpiceConfig.cmake
  spice-config.cmake

Add the installation prefix of "Spice" to CMAKE_PREFIX_PATH or set
"Spice_DIR" to a directory containing one of the above files.  If "Spice"
provides a separate development package or SDK, be sure it has been
installed.

Should I make this a new issue?

@DominicDirkx
Copy link
Member

I think this should be:

find_package(CSpice REQUIRED 1.0.0)

Possibly the name of the package we use (but not its contents) changed when moving from the old to the new tudat setup

@piofel
Copy link
Author

piofel commented Feb 9, 2022

@DominicDirkx Thank you, I will try this. I have tried to use conda install -c tudat-team tudat on another machine with fully updated Ubuntu 20.04 and Anaconda, and I received:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abor/ 
failed                                                                                                                   

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package _libgcc_mutex conflicts for:
tudat -> libgcc-ng[version='>=9.3.0'] -> _libgcc_mutex[version='*|0.1',build=main]
python=3.9 -> libgcc-ng[version='>=7.5.0'] -> _libgcc_mutex[version='*|0.1',build=main]

Package libgcc-ng conflicts for:
python=3.9 -> libgcc-ng[version='>=7.3.0|>=7.5.0']
python=3.9 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=7.2.0']The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.31=0
  - feature:|@/linux-64::__glibc==2.31=0
  - tudat -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.31

@DominicDirkx
Copy link
Member

Hmmm, it's weird that it works on some systems but not on others... But, on this new machine does the installation with teh yaml file work?

@piofel
Copy link
Author

piofel commented Feb 9, 2022

Yes, the installation by .yaml file works on the second machine.

@piofel
Copy link
Author

piofel commented Feb 10, 2022

@DominicDirkx And on my first machine (the one where conda install -c tudat-team tudat works) there is still problem with CSpice; when I use in CMakeLists.txt the find_package(CSpice REQUIRED 1.0.0) or find_package(CSpice 1.0.0 REQUIRED), I still receive:

CMake Error at CMakeLists.txt:21 (find_package):By not providing "FindCSpice.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CSpice", but
CMake did not find one.

Could not find a package configuration file provided by "CSpice" (requested
version 1.0.0) with any of the following names:

  CSpiceConfig.cmake
  cspice-config.cmake

Add the installation prefix of "CSpice" to CMAKE_PREFIX_PATH or set
"CSpice_DIR" to a directory containing one of the above files.  If "CSpice"
provides a separate development package or SDK, be sure it has been
installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working installation
Projects
None yet
Development

No branches or pull requests

2 participants