CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Rules dirs missing and Allwmake not found (https://www.cfd-online.com/Forums/openfoam-installation/71951-rules-dirs-missing-allwmake-not-found.html)

mfiandor January 20, 2010 19:17

Rules dirs missing and Allwmake not found
 
Hi all, i'm trying to install OpenFOAM 1.6 in my ubuntu 9.10, but I fetch the following error when i try to execute ./Allwmake

Quote:

migui@ubuntu-laptop:~/OpenFOAM/OpenFOAM-1.6$ sudo ./Allwmake
+ cd wmake/src
+ make
Makefile:55: /rules//general: No such file or directory
Makefile:56: /rules: No such file or directory
make: *** No rule to make target `/rules'. Stop.
+ cd
+ ./Allwmake
./Allwmake: 1: ./Allwmake: not found
+ src/Allwmake
+ wmakePrintBuild -check
src/Allwmake: 1: wmakePrintBuild: not found
+ /bin/rm -f OpenFOAM/Make//global.?
+ wmakeLnInclude OpenFOAM
src/Allwmake: 1: wmakeLnInclude: not found
+ wmakeLnInclude OSspecific/
src/Allwmake: 1: wmakeLnInclude: not found

And if I execute the script 'foamInstallationTest', I get this:

Quote:

migui@ubuntu-laptop:~/OpenFOAM/OpenFOAM-1.6/bin$ sudo ./foamInstallationTest
Executing ./foamInstallationTest:
Checking basic setup...
-------------------------------------------------------------------------------

FATAL ERROR: OpenFOAM environment not configured.
I have no idea how to solve this.

olesen January 21, 2010 02:59

1st: If you post coding examples and/or shell output, it might be useful to wrap it as code (the '#' editor button) rather than as a quote, which seems to disappear when I replied to your message. This may be a bug in the forum software, I'm not sure.

Quote:

Originally Posted by mfiandor (Post 243221)
Hi all, i'm trying to install OpenFOAM 1.6 in my ubuntu 9.10, but I fetch the following error when i try to execute ./Allwmake
Code:

migui@ubuntu-laptop:~/OpenFOAM/OpenFOAM-1.6$ sudo ./Allwmake
+ cd wmake/src
+ make


Have you tried this as a normal user, or as root directly (without sudo)?
I have the strong suspicion that sudo will *not* preserve your environment and then the resulting shell does not have any information about your OpenFOAM setttings.

Try the following test:
Code:

# like you have
sudo /bin/sh -c 'echo FOAM=$WM_PROJECT_DIR'

# preserve the environment
sudo -E /bin/sh -c 'echo FOAM=$WM_PROJECT_DIR'

Even if you get this working, you most certainly do not need root permissions to compile/install OpenFOAM.

BTW:
Since the intent of sudo is to execute a command as another user (eg, root), it would be quite dangerous if the environment were actually preserved. For example,
Code:

PATH=/danger:$PATH
sudo ls

# and the shell script '/danger/ls' actually calls '/bin/rm -rf /' !!



All times are GMT -4. The time now is 05:17.