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

[OpenFOAM.org] ./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2017, 03:10
Default ./Allwmake: 7: .: Can't open /wmake/scripts/AllwmakeParseArguments
  #1
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9
Dorian1504 is on a distinguished road
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 !
Dorian1504 is offline   Reply With Quote

Old   July 3, 2017, 05:55
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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.
alexeym is offline   Reply With Quote

Old   July 3, 2017, 07:31
Default
  #3
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9
Dorian1504 is on a distinguished road
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?
Dorian1504 is offline   Reply With Quote

Old   July 3, 2017, 13:31
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
New error seems to be exactly the same as in your first message.

Quote:
I did not know root created an environment.
It depends on configuration, on my laptop, for example, sudo preserves environment.

You can check value of environment variable with

Code:
sudo echo $WM_PROJECT_DIR
alexeym is offline   Reply With Quote

Old   July 5, 2017, 01:49
Default
  #5
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 9
Dorian1504 is on a distinguished road
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
Dorian1504 is offline   Reply With Quote

Reply

Tags
compiling, openfoam


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
[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


All times are GMT -4. The time now is 00:51.