CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM with Cygwin (https://www.cfd-online.com/Forums/openfoam-installation/57653-openfoam-cygwin.html)

kitchener April 15, 2006 15:51

Thanks for the hard work by Pe
 
Thanks for the hard work by Petr,Brooks,
Niklas,Cresswell,etc on making OpenFOAM work in Cygwin. I try to follow the method described in the web: http://files.dpdx.net/openfoam/cygwi...M-Cygwin-HOWTO . However I have some troubles to locate the followings files

1) OpenFOAM-1.2.General.gtgz
2) Patch file:
OpenFOAM-1.2.Cygwin.patch.gz
3) Compilation and pre-install scripts:
gccCompile.sh
preInstall.sh

If you have these files, would you please kindly send me a copy or let me know where to download those files. My email is wang3400@wlu.ca Many thanks,

Wang

brooksmoses April 15, 2006 23:47

Wang - The document that yo
 
Wang -

The document that you reference is Petr's original description of a very early version of the Cygwin port; at this point it's quite out of date.

The current version of the installation process is described on http://dpdx.net/openfoam-cygwin/. Simply download the four .tar.gz files from that page that are listed under "Current Distribution" (or the ones under "Past Distribution", if you prefer to use OpenFOAM-1.2 rather than OpenFOAM-1.3), and install them with the following set of commands, or something similar:

cd $HOME
mkdir OpenFOAM
cd OpenFOAM
tar -xzf ../OpenFOAM-1.3.cygwin-src-0.5.tar.gz
tar -xzf ../OpenFOAM-1.3.cygwin-bin-0.5.tar.gz
tar -xzf ../OpenFOAM-1.3.Docs.tar.gz
mkdir cygwin
cd cygwin
tar -xzf ../../gcc-4.1.0.cygwin-OpenFOAM.tar.gz

(This assumes that you downloaded the four files to your $HOME directory. If not, change the file references accordingly....)

Once you've done that, you should set up your .bashrc file or .cshrc file as described in the installation directions for the Linux distribution on the main OpenFOAM website. That should be all that you need to do.

Hope this helps,
- Brooks

frank April 24, 2006 10:55

Now I am trying to port your O
 
Now I am trying to port your OpenFOAM-1.3 with cygwin to win-XP , I follows your instructions above and it works fine. But when I wanted to recompile OpenFOAM directory for obtaining OpenFOAM.dll, I have got the error as following:

"chFields.o slipPointPatchFields.o symmetryPointPatchFields.o processorPointPatchFields.o globalProcessorPointPatchFields
.o pointFields.o bandCompression.o preservePatchTypes.o PatchToPatchInterpolationName.o meshWaveName.o curve.o graph.o r
awGraph.o gnuplotGraph.o xmgrGraph.o jplotGraph.o \
Pstream_import.o IPread_import.o OPwrite_import.o -Wl,--no-whole-archive -L/home/Liqiang/OpenFOAM/OpenFOAM-1.3/lib/
cygwinGcc4DPOpt \
-lfoamUser -lz -o /home/Liqiang/OpenFOAM/OpenFOAM-1.3/lib/cygwinGcc4DPOpt/libOpenFOAM.dll
/usr/bin/ld: cannot find -luser32
collect2: ld returned 1 exit status
make: *** [/home/Liqiang/OpenFOAM/OpenFOAM-1.3/lib/cygwinGcc4DPOpt/libOpenFOAM.dll] Error 1"

I think it maybe is the LD_LIBRARY_PATH's bug, so I tried to add "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cygdrive/c/WINDOWS/system32", However it doesn't work yet.

Please help me. Thanks in advance!
Best regards

Q.Li

brooksmoses April 24, 2006 12:28

The "user32" library is a Cygw
 
The "user32" library is a Cygwin system library, which should be in /usr/lib/w32api/lib as the file libuser32.a. If that's not there, then you need to install the "w32api" Cygwin package.

I've added this to the list of dependencies on the webpage.

frank April 24, 2006 22:33

I have just installed the "w32
 
I have just installed the "w32api" Cygwin package, It has been in my /lib/w32api/lib dirctory. But when I tried to recompiled foamToGMV again, instead of OpenFOAM for saving-time. I have got:
"$ wmake
Making dependency list for source file foamToGMV.C
Making dependency list for source file itoa.C
Dropping import dependency files

SOURCE_DIR=.
SOURCE=foamToGMV.C ; g++ -m32 -Dcygwin -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepos
late-depth-30 -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/home/Liqiang/OpenFOAM/Open
/sampling/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/turbulenceModels/incompressible/lnIncl ude -I/h
OpenFOAM/OpenFOAM-1.3/src/transportModels/incompressible/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src
lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/liquids/lnInclude -I/home/Liqiang/O
FOAM-1.3/src/thermophysicalModels/specie/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalM
physicalFunctions/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/browser/lnInclude -I/home/Liqiang/Open
M-1.3/src/foam/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/lagrangian/basic/lnInclude -I/home/Liqian
penFOAM-1.3/src/lagrangian/dieselSpray/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclud
e -I. -c $SOURCE -o Make/cygwinGcc4DPOpt/foamToGMV.o
SOURCE_DIR=.
SOURCE=itoa.C ; g++ -m32 -Dcygwin -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository
depth-30 -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-
ling/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/turbulenceModels/incompressible/lnIncl ude -I/home/L
OAM/OpenFOAM-1.3/src/transportModels/incompressible/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/lagr
lude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/liquids/lnInclude -I/home/Liqiang/OpenFO
1.3/src/thermophysicalModels/specie/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels
calFunctions/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/browser/lnInclude -I/home/Liqiang/OpenFOAM/
/src/foam/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/lagrangian/basic/lnInclude -I/home/Liqiang/Ope
AM-1.3/src/lagrangian/dieselSpray/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -Il
-c $SOURCE -o Make/cygwinGcc4DPOpt/itoa.o
/home/Liqiang/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/Liqiang/OpenFOAM/OpenFOAM-1.3/applic
ygwinGcc4DPOpt/foamToGMV
g++ -m32 -Dcygwin -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth
Liqiang/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/sampling/
/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/turbulenceModels/incompressible/lnInclud e -I/home/Liqiang/OpenFOAM/O
src/transportModels/incompressible/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/lagrangian/lnInclude
ang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/liquids/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/s
sicalModels/specie/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/thermophysicalModels/thermophysicalFu
clude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/browser/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/
de -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/lagrangian/basic/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.
gian/dieselSpray/lnInclude -I/home/Liqiang/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. M
c4DPOpt/foamToGMV.o Make/cygwinGcc4DPOpt/itoa.o -L/home/Liqiang/OpenFOAM/OpenFOAM-1.3/lib/cygwinGcc4DPOpt \
-lfiniteVolume -llagrangian -lOpenFOAM -liberty -o /home/Liqiang/OpenFOAM/OpenFOAM-1.3/applications/b
4DPOpt/foamToGMV
Info: resolving Foam::IOobject::typeName by linking to __imp___ZN4Foam8IOobject8typeNameE (auto-import)
Info: resolving Foam::cloud::typeName by linking to __imp___ZN4Foam5cloud8typeNameE (auto-import)
Info: resolving Foam::fvPatchField<foam::vector<double> >::typeNameby linking to __imp___ZN4Foam12fvPatchFie
rIdEEE8typeNameE (auto-import)
Info: resolving Foam::IOField<double>::typeNameby linking to __imp___ZN4Foam7IOFieldIdE8typeNameE (auto-impo
Info: resolving Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::typeNameby li
mp___ZN4Foam14GeometricFieldINS_6VectorIdEENS_12fv PatchFieldENS_7volMeshEE8typeN ameE (auto-import)
Info: resolving Foam::particle<foam::passiveparticle>::typeName by linking to __imp___ZN4Foam8particleIN
articleEE8typeNameE (auto-import)
Info: resolving Foam::GeometricField<double,>::typeNameby linking to __imp
GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE8ty peNameE (auto-import)
Info: resolving Foam::fvPatchField<double>::typeName by linking to __imp___ZN4Foam12fvPatchFieldIdE8typeName
rt)
Info: resolving Foam::IOField<foam::vector<double> >::typeNameby linking to __imp___ZN4Foam7IOFieldINS_6Vect
NameE (auto-import)
Info: resolving vtable for Foam::lduCoupledInterfaceby linking to __imp___ZTVN4Foam19lduCoupledInterfaceE (a
Info: resolving Foam::word::debug by linking to __imp___ZN4Foam4word5debugE (auto-import)
Info: resolving Foam::FatalError by linking to __imp___ZN4Foam10FatalErrorE (auto-import)
Info: resolving Foam::DLListBase::endConstIter by linking to __imp___ZN4Foam10DLListBase12endConstIter
rt)
Info: resolving Foam::SLListBase::endConstIter by linking to __imp___ZN4Foam10SLListBase12endConstIter
rt)
Info: resolving Foam::Vector<double>::zeroby linking to __imp___ZN4Foam6VectorIdE4zeroE (auto-import)
Info: resolving Foam::GeometricField<double,>::debugby linking to __imp___
metricFieldIdNS_12fvPatchFieldENS_7volMeshEE5debug E (auto-import)
Info: resolving Foam::Info by linking to __imp___ZN4Foam4InfoE (auto-import)
Info: resolving Foam::pTraits<double>::zeroby linking to __imp___ZN4Foam7pTraitsIdE4zeroE (auto-import)
Info: resolving Foam::cyclicPolyPatch::typeName by linking to __imp___ZN4Foam15cyclicPolyPatch8typeName
rt)
Info: resolving Foam::cloud::debug by linking to __imp___ZN4Foam5cloud5debugE (auto-import)
Info: resolving Foam::DLListBase::endIter by linking to __imp___ZN4Foam10DLListBase7endIterE (auto-impo
Info: resolving Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::debugby linki
__ZN4Foam14GeometricFieldINS_6VectorIdEENS_12fvPat chFieldENS_7volMeshEE5debugE (auto-import)
Info: resolving Foam::FatalIOError by linking to __imp___ZN4Foam12FatalIOErrorE (auto-import)
Info: resolving Foam::Warning by linking to __imp___ZN4Foam7WarningE (auto-import)
Info: resolving Foam::Vector<double>::typeNameby linking to __imp___ZN4Foam6VectorIdE8typeNameE (auto-import
Info: resolving Foam::pTraits<double>::typeNameby linking to __imp___ZN4Foam7pTraitsIdE8typeNameE (auto-impo
Info: resolving Foam::fvPatchField<foam::vector<double> >::debugby linking to __imp___ZN4Foam12fvPatchFieldI
EEE5debugE (auto-import)
Info: resolving Foam::fvPatchField<foam::vector<double> >::patchConstructorTablePtr_by linking to __imp___ZN
chFieldINS_6VectorIdEEE25patchConstructorTablePtr_ E (auto-import)
Info: resolving Foam::fvPatchField<double>::debug by linking to __imp___ZN4Foam12fvPatchFieldIdE5debugE (aut
Info: resolving Foam::fvPatchField<double>::patchConstructorTableP tr_ by linking to __imp___ZN4Foam12fvPatc
atchConstructorTablePtr_E (auto-import)
Info: resolving Foam::fvPatchField<double>::dictionaryConstructorT ablePtr_ by linking to __imp___ZN4Foam12f
dE30dictionaryConstructorTablePtr_E (auto-import)
Info: resolving Foam::fvPatchField<double>::disallowDefaultFvPatch Field by linking to __imp___ZN4Foam12fvPa
7disallowDefaultFvPatchFieldE (auto-import)
Info: resolving Foam::emptyPolyPatch::typeName by linking to __imp___ZN4Foam14emptyPolyPatch8typeNameE
)
Info: resolving Foam::word::null by linking to __imp___ZN4Foam4word4nullE (auto-import)
Info: resolving Foam::dimless by linking to __imp___ZN4Foam7dimlessE (auto-import)
Info: resolving Foam::fvPatchField<foam::vector<double> >::dictionaryConstructorTablePtr_by linking to __imp
fvPatchFieldINS_6VectorIdEEE30dictionaryConstructo rTablePtr_E (auto-import)
Info: resolving Foam::fvPatchField<foam::vector<double> >::disallowDefaultFvPatchFieldby linking to __imp___
atchFieldINS_6VectorIdEEE27disallowDefaultFvPatchF ieldE (auto-import)
Info: resolving Foam::Time::controlDictName by linking to __imp___ZN4Foam4Time15controlDictNameE (auto-
Info: resolving Foam::polyMesh::defaultRegion by linking to __imp___ZN4Foam8polyMesh13defaultRegionE (a
Info: resolving Foam::fileName::debug by linking to __imp___ZN4Foam8fileName5debugE (auto-import)
Info: resolving Foam::IOstream::currentVersion by linking to __imp___ZN4Foam8IOstream14currentVersionE
)
Info: resolving vtable for Foam::IOdictionaryby linking to __imp___ZTVN4Foam12IOdictionaryE (auto-import)"

Would you given me any further information. Thanks for above suggestions!

regards

Q.Li

brooksmoses April 24, 2006 22:48

Is there some reason that you
 
Is there some reason that you think there's still something wrong? Those are all "Info" messages, not error messages, and are perfectly normal.

Did you check to see if a new foamToGMV.exe file got created?

(If you are still having errors as well as the info messages that you posted, the reason is probably because your previous compilation attempts deleted the original libOpenFOAM.dll file, and you haven't replaced it by recompiling it. But you need to post the error messages, not the info messages, for me to tell. If there are a lot of them, just post the first few.)

frank April 24, 2006 23:09

haha! you are right. Just as w
 
haha! you are right. Just as what you said, libOpenFOAM.dll file had been deleted. Now I re-construct it and all package have worked perfectly.

Thank you for your contributions to OpenFOAM community.

Good luck to you!

Q.Li


All times are GMT -4. The time now is 07:50.