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

Provide better error message, if deal.II version is too old #52

Closed
BenjaminRodenberg opened this issue Mar 18, 2021 · 2 comments · Fixed by #50
Closed

Provide better error message, if deal.II version is too old #52

BenjaminRodenberg opened this issue Mar 18, 2021 · 2 comments · Fixed by #50
Labels
enhancement New feature or request question Further information is requested

Comments

@BenjaminRodenberg
Copy link
Member

I tried installing the adapter after installing Deal.II using apt on my Ubuntu 20.04 system. By default Ubuntu 20.04 gives me Deal.II 9.1.0, but the adapter requires 9.2.0 as indicated here. Since installing via apt was recommended by the documentation of the adapter this situation confused me a bit.

What I tried

cmake . gave the following error

~/dealii-adapter/linear_elasticity$ cmake .
-- Build type: Release
CMake Error at CMakeLists.txt:39 (MESSAGE):


  *** Could not locate a (sufficiently recent) version of deal.II.  ***



  You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake

  or set an environment variable "DEAL_II_DIR" that contains this path.


-- Configuring incomplete, errors occurred!

Here, I was unsure whether my deal.II installation is found or not. I finally cloned the deal.II github repository and when trying to build an example I got the following error

~/dealii/examples/step-1$ cmake .
CMake Warning at CMakeLists.txt:26 (FIND_PACKAGE):
  Could not find a configuration file for package "deal.II" that is
  compatible with requested version "9.3.0".

  The following configuration files were considered but not accepted:

    /usr/share/cmake/deal.II/deal.IIConfig.cmake, version: 9.1.1



CMake Error at CMakeLists.txt:30 (MESSAGE):


  *** Could not locate a (sufficiently recent) version of deal.II.  ***



  You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake

  or set an environment variable "DEAL_II_DIR" that contains this path.


-- Configuring incomplete, errors occurred!

From my perspective this error message was very useful, since it told me that:

  1. my deal.II is found
  2. my deal.II version is too old

My Suggestion

Is it possible to add a similar error in the CMakeLists.txt of the adapter?

@BenjaminRodenberg BenjaminRodenberg added enhancement New feature or request question Further information is requested labels Mar 18, 2021
@davidscn
Copy link
Member

The key is here the QUIET:

FIND_PACKAGE(deal.II 9.2.0 QUIET

I addded it as part of #50. As open TODO, we should update the website docs for building from apt.

davidscn added a commit to davidscn/dealii-adapter that referenced this issue Mar 18, 2021
@davidscn davidscn linked a pull request Mar 18, 2021 that will close this issue
@davidscn
Copy link
Member

Has been addressed in #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants