CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] [OpenFOAM plus] [v1612+] swak4Foam installation problem in Windows (Allwmake) (https://www.cfd-online.com/Forums/openfoam-community-contributions/187546-openfoam-plus-v1612-swak4foam-installation-problem-windows-allwmake.html)

LThomes May 9, 2017 08:27

[OpenFOAM plus] [v1612+] swak4Foam installation problem in Windows (Allwmake)
 
Hello,
I'm using OpenFoam for Windows and I'm having some trouble with the swak4Foam installation.
First of all, I used the git command:
Code:

git clone https://github.com/Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder2.0-libraries-swak4Foam.git swak4Foam
saving the swak4Foam files in the workingDir folder (C:\Users\adm).
Then, the next step would be to go into swak4Foam's main source folder and use the command:
Code:

./Allwmake > log.make 2>&1
That's the problem. The first time I did this, the following error message came up:

Code:

bash: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory
Then I found in the internet that I would have to convert the Allwmake file to UNIX. So I did so, but a new error message appeared:

Code:

Previously compiled for OpenFOAM v1612+
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
theFiles.sh: line 2:
: command not found
theFiles.sh: line 18:
: command not found
theFiles.sh: line 41: syntax error: unexpected end of file
Checking swak4Foam-version and generating file
/usr/bin/env: python
: No such file or directory
/opt/OpenFOAM/OpenFOAM-v1612+/wmake/wmake: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory

Requirements for Library not satisfied. I see no sense in going on
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard

Can anybody help me?

Thanks in advance

piu58 May 9, 2017 08:59

> /bin/bash^M

I assume, here is a ^M = 0xd too much. Remove it with a hex editor (replace it by 0xa).

LThomes May 10, 2017 08:16

Quote:

Originally Posted by piu58 (Post 648195)
> /bin/bash^M

I assume, here is a ^M = 0xd too much. Remove it with a hex editor (replace it by 0xa).

I don't get it. Where is there a ^M? In the Allwmake file there is no ^M.

piu58 May 10, 2017 08:36

Tha bash says it is :

> bash: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory

piu58 May 10, 2017 08:37

Tha bash ssay it is :

> bash: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory

Have you looked at the script with a hex editor?

LThomes May 10, 2017 10:09

Quote:

Originally Posted by piu58 (Post 648333)
Tha bash ssay it is :

> bash: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory

Have you looked at the script with a hex editor?

Oh, I think I got it. I looked at the Allwmake script with a hex editor and replaced the "0d"s with "0a". But it did not work. I'm having the same error (as follows) and serveral lines of the Allwmake file (not in hex) are missing.

Previously compiled for OpenFOAM v1612+
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
theFiles.sh: line 2:
: command not found
theFiles.sh: line 18:
: command not found
theFiles.sh: line 41: syntax error: unexpected end of file
Checking swak4Foam-version and generating file
/usr/bin/env: python
: No such file or directory
/opt/OpenFOAM/OpenFOAM-v1612+/wmake/wmake: ./Allwmake: /bin/bash^M: bad interpreter: No such file or directory

Requirements for Library not satisfied. I see no sense in going on
Check the README before you go on to ask. And search: Most likely your problem occured to 5 other people before and has been solved on the MessageBoard

wyldckat May 27, 2017 06:53

Greetings to all!

I'm a bit late in answering to this, but the problem seems like it is due to how git is configured. On the following stackoverflow thread you can find more details: https://stackoverflow.com/questions/...nding-settings

My suggestion is to start a new terminal (MSys command line?) where you are using Git and run:
Code:

git config --global core.autocrlf input
Then delete the previous swak4Foam repository folder that you cloned and "git clone" it again.

If you don't want to download again, you can try going into the folder "swak4Foam" via terminal and run:
Code:

rm -r *
git checkout .

WARNING: make sure you are running the first command in the correct folder, since it will delete all of the local files.
The second command will checkout the files once again.

Best regards,
Bruno


All times are GMT -4. The time now is 20:21.