CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] Fail to compile OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By treima
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2012, 06:55
Default Fail to compile OpenFoam
  #1
New Member
 
Hengjie Wang
Join Date: Dec 2012
Posts: 2
Rep Power: 0
Frank_Wang is on a distinguished road
Hi, everyone~

I installed OpenFoam2.1.1 on Ubuntu 10.04, then I try to build a debug version of it. There is what I have done and the problem I have got.:

I modified "/opt/openfoam211/etc/bashrc" by setting WM_COMPILE_OPTION to Debug.
I soursed this bashrc file in ~/.bashrc.
I checked that both flex and bison are installed
I start ./Allwmake under directory /opt/openfoam211

There came a lot of error and the original error I found is :
Code:
mkdir: cannot create directory `linux64GccDPDebug': Permission denied
     /bin/sh: cannot create linux64GccDPDebug/options: Directory nonexistent
I tried "ln -s linux64GccDPOpt linux64GccDPDebug " and it did not make a difference.

Did I miss something ?

Thanks~
Frank_Wang is offline   Reply With Quote

Old   December 6, 2012, 07:38
Default
  #2
Member
 
Join Date: Mar 2012
Location: Munich, Germany
Posts: 67
Rep Power: 14
treima is on a distinguished road
Hello,

I think, you donīt have the permission to compile and install the program in /opt.
Perhaps you try your home directory for installing OpenFOAM. I think, this might solve your problem.

Or you can change the permission rights of your OpenFOAM folder in /opt, so that you have a writing accesse without being a superuser or using sudo.


regards

treima
Frank_Wang likes this.
treima is offline   Reply With Quote

Old   December 7, 2012, 03:48
Default
  #3
New Member
 
Hengjie Wang
Join Date: Dec 2012
Posts: 2
Rep Power: 0
Frank_Wang is on a distinguished road
Hi, Treima.
Thanks for your advice. It works now.

Regards

Frank
Frank_Wang is offline   Reply With Quote

Old   August 6, 2015, 11:37
Default Changing permissions
  #4
Member
 
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11
WernerW is on a distinguished road
Hi Frank and Treima,

I'm dealing with the same problem as Frank did. How did it work Frank ?

I'm working in the option of getting permission in the folder opt/openfoam### (240 in my case) but it still doesn't work.

I introduce the command:

sudo chmod 755 ./opt/openfoam240

to give the user read/write/execute permissions (7) and the group and the world read+execute permissions (5 in both digits). I took this info from http://www.linux.org/threads/file-pe...ns-chmod.4094/.

When I run ./Allmake again (with the new permissions) the programm faces the same problem to create "linux64GccDPDebug".

Now I'm not even able to run my OpenFoam because the command (in this case pimpleDyMFoam) is not found. I tried to change the Compiler_options back to Opt and it didn't work either.

What should I do Know ? I would appreciate any help.
WernerW is offline   Reply With Quote

Old   August 10, 2015, 17:36
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Werner,

Mmmm... OK, you want to build the Debug version, based on the Deb package for OpenFOAM.
Very well, to avoid a situation where you might damage your system, then run the following command:
Code:
sudo chown -R $USER:$USER /opt/openfoam240
This will change the ownership of the folder and files within it to be available to your user. Then you should be able to build on that folder as a normal user.

I say "as a normal user", because the other way would be for you to build as root (super user), but in such a situation, you risk accidentally damaging your whole system, in case you accidentally erase/change the wrong file(s).

Best regards,
Bruno
arch.mr likes this.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
debug


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] compile OpenFOAM v5 source on Ubuntu 1706? phsieh2005 OpenFOAM Installation 3 August 26, 2017 15:57
[OpenFOAM.org] Failed to compile OpenFOAM 3.0.1 with icc xuegy OpenFOAM Installation 1 July 13, 2016 17:03
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Problems with compile OpenFoam Black-Pearl OpenFOAM Installation 6 July 12, 2012 08:01
[swak4Foam] how to compile groovyBC to OpenFoam v1.6? tamsilian OpenFOAM Community Contributions 1 May 27, 2010 04:15


All times are GMT -4. The time now is 16:29.