Problems with the OpenFOAM 2.2.x on Windows.
I have some problems when I compile the OpenFOAM for windows version on Linux system (Ubuntu 12.04)
I try to follow the procedure : www.symscape.com/openfoam-2-2-x-on-windows
and then I modify the ubuntu building environment by these commands
step 1.
-------------------
apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev
apt-get install libscotch-dev libcgal-dev
and then install MinGW-w64 by using apt-get on ubuntu.
I had install OpenMPI 1.6.5 on my system
and then I download the zilb source from http://sourceforge.net/projects/mingw-w64/ and compile it too.
------------------
(Problem 1.)
I also finish the step "Create libmsmpi.a from Microsoft MPI Redistributable", but I don't know where I should put libmsmpi.a in.
step 2.
I try to install OpenFOAM by those commands :
git clone https://github.com/OpenFOAM/OpenFOAM-2.2.x.git
(in the git folder) git checkout -b Symscape 8a983dba63b246772c69ed0fa9cc3b3e33a10f92
and pitch it (git apply -p0 ../ v3-mingw-openfoam-2-2-x.patch )
I got the message
-------------------------
../v3-mingw-openfoam-2-2-x.patch:34: trailing whitespace.
AR = x86_64-w64-mingw32-gcc
../v3-mingw-openfoam-2-2-x.patch:40: trailing whitespace.
CCD =
../v3-mingw-openfoam-2-2-x.patch:44: trailing whitespace.
CP = cp
../v3-mingw-openfoam-2-2-x.patch:90: trailing whitespace.
**
../v3-mingw-openfoam-2-2-x.patch:96: trailing whitespace.
**
warning: squelched 277 whitespace errors
warning: 282 lines add whitespace errors.
-------------------------
there are some warnings. and 1 error I found.
I think that CCD should be equal to "x86_64-w64-mingw32-gcc" but AR = ??
Step 3.
Modify the linux environment
export FOAM_INST_DIR=/work3/OpenFoam; where I put the OpenFoam git folder under /work3/OpenFoam
and edit $(FOAM_INST_DIR)/OpenFOAM-2.2.x/etc/bashrc, and save as bashrc.mingw-w64
WM_OSTYPE=MSwindows WM_COMPILER=mingw-w64 WM_ARCH_OPTION=64 WM_PRECISION_OPTION=SP WM_CC=x86_64-w64-mingw32-gcc WM_CXX=x86_64-w64-mingw32-g++ compilerInstall=system WM_MPLIB=MSMPI
MPI_ARCH_PATH=/work3/OpenFoam/ms-hpc
source $(FOAM_INST_DIR)/OpenFOAM-2.2.x/etc/bashrc
step 4.
I try to Install the ThirdParty-2.2.1 source and build scotch, but I have a lot of errors. there is a bug. CCD is undefined. I have to edit the line 40 "CCD" in the pitch file.
but there are still many errors when I compile scotch. So I went to compile OpenFoam.
step 5.
when I compiled the source code, I got the error message
compilation terminated.
make[2]: *** [Make/linux64mingw-w64SPOpt/tractionDisplacementCorrectionFvPatchVectorField.o] Error 1
SOURCE=solidEquilibriumDisplacementFoam.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_SP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -I/work3/OpenFoam/OpenFOAM-2.2.x/src/finiteVolume/lnInclude -ItractionDisplacementCorrectionStress -I../solidDisplacementFoam -IlnInclude -I. -I/work3/OpenFoam/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude -I/work3/OpenFoam/OpenFOAM-2.2.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64mingw-w64SPOpt/solidEquilibriumDisplacementFoam.o
solidEquilibriumDisplacementFoam.C:38:19: fatal error: fvCFD.H: No such file or directory
compilation terminated.
make[2]: *** [Make/linux64mingw-w64SPOpt/solidEquilibriumDisplacementFoam.o] Error 1
make[2]: Target `/work3/OpenFoam/OpenFOAM-2.2.x/platforms/linux64mingw-w64SPOpt/bin/solidEquilibriumDisplacementFoam.exe' not remade because of errors.
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/work3/OpenFoam/OpenFOAM-2.2.x/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam'
make[1]: *** [solidEquilibriumDisplacementFoam] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/work3/OpenFoam/OpenFOAM-2.2.x/applications/solvers/stressAnalysis'
make: *** [stressAnalysis] Error 2
make: Target `application' not remade because of errors.
Actually, I got many error messages.
Anyone know how to do it. Thanks a lot.