Re: [deal.II] Example not Compiling in deallii on Docker

2020-05-18 Thread luca.heltai
You are trying to compile the examples in the /usr/local directory. 

The default user in the dealii docker image is the “dealii” user, and it does 
not have write access to those directories. If you really want work inside the 
docker image, you should copy the directory of the example(s) you want to 
compile under /home/dealii and compile from there. 

However, the usual way people use the docker image is to mount a local 
directory into the image, e.g., calling 

docker run -v $HOME:$HOME -t -i dealii/dealii:latest bash

and then building your examples/programs/etc. in a local directory under your 
home folder path. In this way you use the image, without modifying its content, 
and the build results are left in your home directory (in the host computer, 
and not in the image, where the changes you make are discarded when you exit).

Best,
Luca.

> On 15 May 2020, at 11:44, Jack Urombo  wrote:
> 
> 
> 
> I have installed dealii on docker and when itry t run the examples i get the 
> error below. What am i doing wrong?
> 
> 
> 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeFiles/CMakeTmp/testCCompiler.c
> 
>   try_compile() works only for enabled languages.  Currently these are:
> 
> C CXX
> 
>   See project() command to enable other languages.
> Call Stack (most recent call first):
>   CMakeLists.txt:38 (PROJECT)
> 
> 
> -- Check for working C compiler: /usr/bin/cc -- broken
> CMake Error at 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/cmake-3.14.4-7gmvmpryqyfj5m42vt5qj5tb27tw7un6/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:56
>  (file):
>   file failed to open for writing (No such file or directory):
> 
> 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeFiles/CMakeError.log
> Call Stack (most recent call first):
>   CMakeLists.txt:38 (PROJECT)
> 
> 
> CMake Error at 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/cmake-3.14.4-7gmvmpryqyfj5m42vt5qj5tb27tw7un6/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60
>  (message):
>   The C compiler
> 
> "/usr/bin/cc"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> 
> 
>   
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:38 (PROJECT)
> 
> 
> -- Configuring incomplete, errors occurred!
> CMake Error: Cannot open file for write: 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeCache.txt.tmp
> CMake Error: : System Error: Permission denied
> CMake Error: Unable to open cache file for save. 
> /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeCache.txt
> CMake Error: : System Error: Permission denied
> dealii@85f866bfa019:/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6$
>  ^C
> dealii@85f866bfa019:/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6$
>  
> 
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/77501932-426c-43d0-8607-7fa259151b6e%40googlegroups.com.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/C2ADFAA3-B45B-450E-8D56-BD0290A2A856%40gmail.com.


[deal.II] Example not Compiling in deallii on Docker

2020-05-15 Thread Jack Urombo


I have installed dealii on docker and when itry t run the examples i get 
the error below. What am i doing wrong?



/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeFiles/CMakeTmp/testCCompiler.c

  try_compile() works only for enabled languages.  Currently these are:

C CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at 
/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/cmake-3.14.4-7gmvmpryqyfj5m42vt5qj5tb27tw7un6/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:56
 
(file):
  file failed to open for writing (No such file or directory):


/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error at 
/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/cmake-3.14.4-7gmvmpryqyfj5m42vt5qj5tb27tw7un6/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60
 
(message):
  The C compiler

"/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:



  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: 
/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. 
/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6/CMakeCache.txt
CMake Error: : System Error: Permission denied
dealii@85f866bfa019:/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6$
 
^C
dealii@85f866bfa019:/usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/dealii-9.1.1-kbq6c5p67nir5zwpx5lbevwutndfivxz/share/deal.II/examples/step-6$
 


-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/77501932-426c-43d0-8607-7fa259151b6e%40googlegroups.com.