|
[Sponsors] |
[OpenFOAM.org] ./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 3, 2017, 03:10 |
./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments
|
#1 |
New Member
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9 |
Hello,
I'm trying to compile Openfoam as explained here : https://openfoam.org/download/source...ling-openfoam/ But I have the following error when I run Allwmake: ./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments I checked my environment variables but I don't see any mistake. I'm pretty sure that the problem comes from the variable $WM_PROJECT_DIR, when I replace this in Allwmake by the true path the error disappears but I obtain a new one : /opt/OpenFOAM/OpenFOAM-4.x$ sudo ./Allwmake ./Allwmake: 9: ./Allwmake: wmakeCheckPwd: not found Allwmake error: Current directory is not $WM_PROJECT_DIR The environment variables are inconsistent with the installation. Check the OpenFOAM entries in your dot-files and source them. And when I check with echo : echo $WM_PROJECT_DIR /opt/OpenFOAM/OpenFOAM-4.x Any idea how to solve this problem? Thank you ! |
|
July 3, 2017, 05:55 |
|
#2 |
Senior Member
|
Hi,
sudo creates new environment, so in sudo shell WM_PROJECT_DIR is empty. So either use -E flag for sudo, or execute bash under sudo and there source etc/bashrc, compile software, etc. |
|
July 3, 2017, 07:31 |
|
#3 |
New Member
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9 |
Thank you for your response.
I did not know root created an environment. So, I used the -E flag and the error well disappeared however I have a new one, and still with the value of $WM_PROJECT_DIR : ./Allwmake: 9: ./Allwmake: wmakeCheckPwd: not found Allwmake error: Current directory is not $WM_PROJECT_DIR The environment variables are inconsistent with the installation. Check the OpenFOAM entries in your dot-files and source them. I don't understand why the variable is ok for the first occurence in Allwmake but not for the second path. How can i check the value of $WM_PROJECT_DIR in the sudo shell? |
|
July 3, 2017, 13:31 |
|
#4 | |
Senior Member
|
New error seems to be exactly the same as in your first message.
Quote:
You can check value of environment variable with Code:
sudo echo $WM_PROJECT_DIR |
||
July 5, 2017, 01:49 |
|
#5 |
New Member
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9 |
Yes it's the same error as before when I replaced the path manually. sudo -E has eliminated the first error (line 7 in Allwmake) but doesn't work after, even so "sudo echo $WM_PROJECT_DIR$" return the good path. Maybe the environment is not well preserved with -E flag?
However I've tried to source the bashrc file in root as you mentioned and the compiling started without any problem. I don't have the time to check if it will go all the way right now, but there is a good chance that my problem is solved. Thank you |
|
Tags |
compiling, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
OpenFoam "Permission denied" and "command not found" problems. | iyidaniel@yahoo.co.uk | OpenFOAM Running, Solving & CFD | 11 | January 2, 2018 07:47 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
OpenFOAM with IBM AIX | matthias | OpenFOAM Installation | 20 | March 25, 2008 03:36 |