cmake example step1 ERROR

1,001 views
Skip to first unread message

Rami Aqqad

unread,
Feb 20, 2015, 10:48:03 AM2/20/15
to dea...@googlegroups.com
hello,
I am trying to build example step 1:
---------------------------------------------------------------------------------------------------------------
/deal.II/examples/step-1:$cmake -DDEAL_II_install_prefix=/home/aqqad/bin/deal.pre .
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!
-------------------------------------------------------------------------------------------------------------
any help please,

Timo Heister

unread,
Feb 20, 2015, 10:52:41 AM2/20/15
to dea...@googlegroups.com
Rami, please read this:
> 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.

--
Timo Heister
http://www.math.clemson.edu/~heister/

Rami Aqqad

unread,
Feb 20, 2015, 11:03:29 AM2/20/15
to dea...@googlegroups.com
thanks I read it but how can I pass a flag to CMAKE?

Rami Aqqad

unread,
Feb 20, 2015, 11:43:23 AM2/20/15
to dea...@googlegroups.com
I set an environment variable

------------------------------------------------
deal.II/examples/step-1:$printenv
,,,,,,,,,,,,,,,,
DDEAL_II_DIR=/home/aqqad/deal.II/
................
---------------------------------------------------

the same result

Daniel Arndt

unread,
Feb 20, 2015, 11:50:36 AM2/20/15
to dea...@googlegroups.com
Rami,

the environment variable you should set is DEAL_II_DIR and not DDEAL_II_DIR.
Alternatively, you might want to call
cmake -DDEAL_II_DIR=/home/aqqad/deal.II/ .

Best
Daniel

Rami Aqqad

unread,
Feb 20, 2015, 12:04:28 PM2/20/15
to dea...@googlegroups.com
thanks Daniel
done but still same problem!

---------------------------------------
~/deal.II/examples/step-1:$printenv
DEAL_II_DIR=/home/aqqad/deal.II/
--------------------------------------
Even if I use alternative way:
---------------------------
/deal.II/examples/step-1:$cmake -DDEAL_II_DIR=/home/aqqad/deal.II/

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!

------------------------------------------------------------------------

Martin Kronbichler

unread,
Feb 20, 2015, 12:09:29 PM2/20/15
to dea...@googlegroups.com

> ~/deal.II/examples/step-1:$printenv
> DEAL_II_DIR=/home/aqqad/deal.II/

This seems to be the path of the source code. You should point to the
directory where you installed deal.II, e.g. if you configured deal.II
with cmake [...] -D CMAKE_INSTALL_PREFIX="/home/aqqad/deal_install/",
then called make install, you need to write
cmake -DDEAL_II_DIR=/home/aqqad/deal_install/

Best,
Martin




Rami Aqqad

unread,
Feb 20, 2015, 12:22:18 PM2/20/15
to dea...@googlegroups.com
thanks Martin I tried
-------------------------------------------------------------------
cmake -DDEAL_II_install_prefix=/home/aqqad/bin/deal.pre ../
DONE WITHOUT PROBLEM

deal.II/examples/step-1:$cmake -DDEAL_II_DIR=/home/aqqad/bin/deal.pre
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!
-------------------------------------------------------------------------------

Martin Kronbichler

unread,
Feb 20, 2015, 12:26:12 PM2/20/15
to dea...@googlegroups.com

> -------------------------------------------------------------------
> cmake -DDEAL_II_install_prefix=/home/aqqad/bin/deal.pre ../
> DONE WITHOUT PROBLEM

Did you run 'make' and 'make install' on your build?

Can you also check the content of the folder /home/aqqad/bin/deal.pre ?

When you do 'ls' in that folder, you should see the following
directories:
bin cmake common doc examples include lib LICENSE README
README.md share

In particular, you need to make sure that the file
/home/aqqad/bin/deal.pre/lib/cmake/deal.II/deal.IIConfig.cmake
exists. My guess is that it does not.

Best,
Martin


Message has been deleted

Malik Tahiyat

unread,
Apr 9, 2020, 4:36:55 AM4/9/20
to deal.II User Group
Dear Dr Heister.

I was trying to follow this command in READ me section (after downloading and unpacking the dealii-9.1.1.tar.gz to set install directory of deal.II 
  cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/dir ../deal.II   

i had changed it to cmake -DCMAKE_INSTALL_PREFIX=/home/projects/deal.II/

However, everytime I got the following error
CMake Error: The source directory "/home/malik/projects/dealii-9.1.1/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

The only way it worked was if i added two dots after the command: 
$ cmake -DCMAKE_INSTALL_PREFIX=/home/projects/deal.II/ ..

But then, the installation does not happen in the deal.II directory. THe program is installed in ~/projects/dealii-9.1.1/build
THe deal.II folder stays empty

ANd of course i face the error
  *** 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.


I am fairly new to linux. Can you please say what is happening wrong here?

I will be obliged.
Reply all
Reply to author
Forward
0 new messages