Running OpenFOAM native compile on a non-admin Windows - windows

I have downloaded and installed a Windows native compiled OpenFOAM from here. But when I try to run any of the OF commands (e.g., blockMesh, foamDictionary, ...) in the MSYS2 terminal I get the message:
path/to/folder/v2106/msys64/home/ofuser/OpenFOAM/OpenFOAM-v2106/platforms/win64MingwDPInt32Opt/bin/blockMesh.exe: error while loading shared libraries: libstdc++-6.dll: cannot open shared object file: No such file or directory
and in the cmd terminal, I get the error message:
System Error The code execution cannot proceed because msmpi.dll was not found. Reinstalling the program may fix this problem.
From here, I see that I might have to reinstall OpenFOAM in admin mode, which I don't have on this work machine. so I tried installing MSMPI using pacman -S msmpi as I used to do here. But I get the error message:
error: target not found: msmpi
My goal is to install and use the OpenFOAM software, doesn't matter which release, on this Windows machine without admin privileges. I would appreciate it if you could help me know how can I fix the above problems, or find another way around.
P.S.1. Searching the installation directory, I see that the libstdc++-6.dll file is in the path\to\folder\v2106\msys64\home\ofuser\OpenFOAM\OpenFOAM-v2106\platforms\win64MingwDPInt32Opt\bin. So I wonder I get the first error message. Maybe OF is not compiled properly against the library? Should I try removing the path\to\folder\v2106\msys64\usr\lib\gcc\x86_64-pc-msys\7.4.0\libstdc++.dll.a as suggested here?
P.S.2. I had written this post ages ago about different ways to install OpenFOAM on Windows. Sadly it is still a big effort to get it up and running.
P.S.3. A follow-up on this issue here on the MSYS2 Discord server.
P.S.4. Opened a new issue here on the OpenFOAM repository.

With OpenFOAM-v2112 it is now possible to install without windows admin permissions.
The original problem will still be evident with older OpenFOAM versions since they relied on installing msmpi separately.

Related

cygheap mismatch error in git for windows

Trying to run a shell script in Git Bash. This particular script requires the Rcpp and RcppArmadillo packages. (creating an R package implemented in C++) Because I am on a Windows system I had to install Rtools40. Upon execution of the sh command I get the error:
fatal error - cygheap base mismatch detected - 0x180316408/0x180317408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
What I've tried:
Following the instructions in the error message. However, a search for cygwin1.dll comes up empty. Additionally, I have never installed Cygwin on my machine.
Updating R, Rtools40, and Git for Windows to the latest versions. This was much needed (apparently Windows doesn't update these programs automatically sigh) but it did not resolve the error message.
Turning off ASLR protections in Windows Security settings as described in this post and this post.
Deleting duplicate msys-2.0.dll files from my drive. This ultimately worked. I will post the solution in detail as an answer to this question.
Hope this helps anyone who, like me, has been sifting through the many posts that don't fully answer this question.
So here's how I solved this problem. From what I understand, the error message in Git Bash is outdated and deceptive. It references Cygwin, but Git Bash actually uses MSYS2, not Cygwin. So instead of searching for cygwin1.dll, I needed to search my drive for msys-2.0.dll. This file was present in two locations: Git\usr\bin and rtools40\SOMETHING (I don't remember the exact path, but it was associated with Rtools40). As per the directions in the error message, I deleted the version that was older, which happened to be the one associated with Rtools40. That left only one version of msys-2.0.dll on my drive, and the sh command then executed in Git Bash with no issues.
What I'm still confused about: Why hasn't the error message in Git Bash been updated? What's the difference between Cygwin and MSYS2? I know they both impose the UNIX environment on Windows, but are there advantages or disadvantages to one or the other? In the long run, if I want to execute scripts through the command line, is Git Bash sustainable, or should I just create a Linux partition on my machine?
I came across a post on GitHub that mentioned that if you are running into this issue after getting a "Resource temporarily unavailable" error, then the issue is likely that you are running 32-bit version of Git. Install Git 64 bit, and your issue should go away

Unable to install OMNeT++ 5.4 for Windows

When I run command ./configure I receive below mentioned error:
configure: error: Cannot build Qt apps, probably due to missing or too old Qt packages. Make sure Qt development packages are installed and newer than Qt 5.4. You can disable Qtenv by setting the WITH_QTENV variable to "no" in configure.user.
I have installed Qt5.9.0 after receiving above error, installed mingw-32bit but still receiving same error. Can anyone help me to solve the problem?
The OMNeT++ package for Windows contains all libraries and other tools (including JRE), so there is no need to install anything separately.
To install OMNeT++ in Windows one should:
Download a proper version of OMNeT++ - i.e. OMNeT++ 5.4 (Windows).
Turn off aniti-virus real time protection.
Extract the whole archive into a directory whose name doesn't contain spaces.
Double-click mingwenv.cmd, then press any key.
After some time in the mingwenv console type: ./configure, then make.
In the mingwenv console type omnetpp to start OMNeT++.
Later, to start OMNeT++ one should double click mingwenv.cmd, type omnetpp and do not close console.
I have removed polish characters from directory path and it solved thie problem. Check if directory has any special characters in directory path.
I'll share what worked for me. After installing the Qt package, remove the existing omnetpp directory and extract it from the zip file again. Run mingwenv.cmd, so that it initiates the tools extraction and is now able to load the installed Qt package. Running ./configure now doesn't show the error.

Unable to install Plattform IO IDE

I’m constantly failing to install Platform IO IDE for Visual Studio Code or Atom. I’m working on OSX with High Sierra.
I have two users, both are Admins. The first user can install with VSC and Atom just fine. The second user always gets this error message:
PIP: Error: spawn /Volumes/Macintosh
HD/Users/micha/.platformio/penv/bin/pip ENOENT
I already tried to delete the .platformio folder and start over, without success. The error shows up for Visual Studio Code and Atom.
Any ideas?
Well, not a solution, but a suitable workaround.
I installed platformio core with homebrew, which works fine. Then I installed the IDE plugin, which seams to detect that the core is already there and does not try to instal it a second time.
I did this for Visual Studio Code.
I am on Windows, I tried to install platform-io vs extension to use exsting anaconda.
After setting platformio-ide.useBuiltinPIOCore to false and platformio-ide.customPATH to "path/to/py27", I am able to install platformio with existing python vEnv, but it ended up in an endless loop [press restart -> checking install -> please restart]
After adjusting the customPath to pointing to both pio.exe and python.exe residing directory, it works all right:
platformio-ide.customPATH: "path/to/py27;path/to/py27/Scripts"
I think you can adjust these setting to make these two users use seperate venv, so that there won't be any permission conflict or related issues.

Issue with Julia build on Windows 7 64-bit

I am attempting to install Julia on my Samsung Series 7 laptop, which has OS Windows 7 64-bit. Instructions on how to do this are located at https://github.com/JuliaLang/julia/blob/master/README.windows.md, under the section "Compiling with MinGW/MSYS2".
Step 4-ii says to run the following command in MSYS2:
contrib/windows/get_toolchain.sh 64
When I run this command, I get the following error:
error: this script requires having 7z installed
I have no idea how to get around this. I already had 7zip installed on my computer, but I reinstalled it and am still having the issue. Later, the build step (step 4-iv in the link), which says to run the following command in MSYS2
make -j 4
also fails, giving me the error
bash: make: command not found
I suspect this is because of the earlier failure in step 4-ii, though I can't be sure.
My question: How do I get around these issues to get a good working version of Julia?
Incidentally, the immediate reason I am trying to do this is because I want to do the Julia tutorial located at https://www.youtube.com/watch?v=vWkgEddb4-A&feature=youtu.be&list=PLP8iPy9hna6T0dEHtj0GZymvT6ODIJWj0. I tried to just download the regular Julia installation located at http://julialang.org/downloads/ to do this, but it became apparent as I started going through the tutorial that that a more substantial Julia build was required, and I think this is the one that I need.
Thank you for any help.

Node.js - tutorials on getting it to work with Cygwin on a Vista machine

All,
Am trying to get Node.js to work on Vista machine.
I installed Cygwin (as per the Github instructions) which appears to have been installed correctly. However, none of the commands are executing.
Are there any tutorials for the stages after the Cygwin installation?
PROBLEM: When any command is executed, I get 'Bash: command not found' error.
Not even command like 'c:\cygwin\bin' is executing.
When I type 'user' in cygwin command prompt, I get 'ntvdm has encountered an system error. Parameter incorrect'.
I thought the above error may be due to the firewall, disabling the firewall did not have any effect, running the program with admin rights also did not change the results...
Am confused and would love to get some guidance on what steps to go with next on getting Node.js up and running on a Windows Vista machine.
Many thanks,
UPDATE1:
We managed to make a bit more progress. It appears that we had not installed all the relevant files related to Cygwin. Upon re-download and reinstalled, it ran well, however, we have driven into another error. Error we get:
How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).
We followed the instructions as per the above thread (3rd post from top for Windows machines), however, we are still stuck at the same error.
Any guidance please?
Have you tried just using the Windows self contained binaries? http://node-js.prcn.co.cc/ This way you actually don't need to bother with Cygwin.
At first, i tried it your way too, using Cygwin. After smashing my head for the 10th time against a wall i just stopped trying and found a much cleaner solution.
I'm using VirtualBox running a Debain guest system to locally develop on my Windows 7 machine. Using VirtualBox, you can easily set up shared folders or port forwarding for node apps between your Windows machine and your Debian guest system.
Since you are using a plain Linux-system, all the compiling-pain is blown away.
If you plan to run node.js in production on a windows system: don't. I hardly believe node.js will be ever stable enough on windows-based systems using MINGW/Cygwin...
People seem to run into problems with Cygwin because they think that they are using a Windows machine.
If you install Cygwin, and open a bash shell prompt using the Cygwin icon, you are now in a UNIX environment and everything works the same as it would on UNIX. That includes building node.js.
I think you added some info to the question and I can see your problem. Yes, normally on Cygwin it has been possible to build node.js just as you would on any UNIX system, but that is no longer possible on Windows 7. Before running ./configure you have to:
Close all cygwin apps.
Double-click on C:\Cygwin\bin\ash.exe
Run ./rebaseall and when it completes, run ./perlrebase.
exit from the ash shell window.
At this point Cygwin will be back to normal and you can ./configure and make install.

Resources