CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2010, 04:57
Default
  #21
New Member
 
Thomas Frank Petersen
Join Date: May 2010
Posts: 5
Rep Power: 16
ThomasFP is on a distinguished road
Hi Bruno.

Wow, thank you very much for your quick and detailed reply. I'm impressed!

Just a quick update, I am using Ubuntu 10.04 LTS. I am trying out your suggestions today and will let you know the results.

Regards,
Thomas
ThomasFP is offline   Reply With Quote

Old   October 24, 2010, 08:16
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Thomas,
Quote:
Originally Posted by ThomasFP View Post
Wow, thank you very much for your quick and detailed reply. I'm impressed!
You're welcome! I'm also thankful to you for giving such a detailed report, otherwise I would still be clueless as to why building Scotch was such a tricky business!

Quote:
Originally Posted by ThomasFP View Post
Just a quick update, I am using Ubuntu 10.04 LTS. I am trying out your suggestions today and will let you know the results.
Interesting, it's same version I've used for the development of the patches. Therefore the problem has to be another.

I've given it some thought and I think I know why the patches have worked for me and not for you and Billy: I've always been using 2 or more cores for building the whole thing, while you guys use only one core. This means that with me, libscotcherr gets built in parallel and ends before libscotch is built, therefore with me this issue has never happened before! But for you guys, with single core, libscotch had to be built before libscotcherr. This is not much of a problem in Linux (except in Fedora 13), since libraries can have loose links, but with Windows DLLs, there has to be a very clear existence of the necessary libraries!

I'll update the patches ASAP to fix this problem. But hopefully things should now go well for you Thomas, since the instructions I gave you are the ones I'm going to follow to fix the patches But nonetheless, please give me some feedback if it has worked or not!

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Old   October 24, 2010, 15:58
Default
  #23
New Member
 
Thomas Frank Petersen
Join Date: May 2010
Posts: 5
Rep Power: 16
ThomasFP is on a distinguished road
Hi again Bruno.

Ok short update. Everything seems to work! Scotch build without problems and openFOAM has just finished building INCLUDING snappyHexMesh.exe. I'm currently compiling the documentation and the tutorials and haven't tested OF yet but will get back to you when I get a chance to test the build.

With regards to the error DOS_Mode.bat gives I have uploaded a screen shot of it, however because of my OS (Win 7), it is Danish.

A rough translation would be:

Procedureentrypoint_ZTVN10_cxxabiv117_class_type_i nfoE was not found in DLL-library libstdc++-6.dll.

I believe the error is because I have a python distribution installed which has a local copy libstdc++-6.dll which is on the Windows PATH. When DOS_Mode.bat sets an additional PATH to the OF version of libstdc++-6.dll you get problems.

I tested my previous compilations of OF at work where they ran without any problems, so I believe the above error is only a problem at my home computer.

Kind regards,
Thomas.
Attached Images
File Type: jpg oferror.jpg (26.9 KB, 6 views)
ThomasFP is offline   Reply With Quote

Old   October 24, 2010, 16:23
Default
  #24
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Thomas,

Sweet! Once again, thanks for the feedback

As for that error with "libstdc++.dll", the trick is to:
  1. Edit the file "setvars.bat";
  2. Go near the end of the file and find the line that starts with:
    Code:
    set PATH=%PATH%;%MPI_ARCH_....
  3. Now move the string "%PATH%;" to the end of the line, and use a semi-colon ";" to separate "%PATH%" from the previous end of that line.
  4. Save and close. And voilá, it's fixed
This way Windows default PATH gets pushed to the end, and Python will no longer get in the way Although there might be an issue if you try to use the python command in that window... or perhaps there won't be, if python has the library it needs in the same folder as the python executable file.


By the way, I haven't checked this in Windows, because I mainly use Windows in English, so if you have any problems using ParaView 3.8.0 to open the ".foam" files, it's likely due to your Windows being in Danish. In Linux I know this is an issue with locales different from English (explained here), so you can try the same trick in Windows:
  1. Edit the file "paraFoam.bat";
  2. Add this line, before the "start paraview" line:
    Code:
    set LC_ALL=C
  3. Save and close.
Try running paraFoam now in the "Windows Command Line" and see if ParaView now behaves well

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Old   October 25, 2010, 16:09
Default
  #25
New Member
 
Thomas Frank Petersen
Join Date: May 2010
Posts: 5
Rep Power: 16
ThomasFP is on a distinguished road
Hi Bruno.

I have tested the new compilation of OF and everything works, including snappyHexMesh! Your tip about putting %PATH% at the end of the line in setvars.bat also worked perfectly. Thank you very much for all your help.

I haven't found out if there's any problems with parafoam. I simply use paraView and foamToVtk, but thanks for the tip though.

I have a few final comments on the build.

1) When I run any openFOAM command in get the following warning.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
--> FOAM Warning :
From function openLibrary(const fileName& libName)
in file MSwindows.C at line 1142
\ LoadLibrary failed. "Error 126: Det angivne modul blev ikke fundet.
"

Is that a problem or just part the porting from linux to Windows?

2) In the section "9.2 Packing up and leaving for Windows" I think I have found a small error. The code :

Code:
tar -chjf OpenFOAM.$WM_OPTIONS.tar.bz2 OpenFOAM-1.7.0/applications/bin/$WM_OPTIONS \
OpenFOAM-1.7.0/etc OpenFOAM-1.7.0/bin OpenFOAM-1.7.0/lib/$WM_OPTIONS \
OpenFOAM-1.7.0/doc/Guides-a4 ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER/mpich2-1.2.1p1 \
$USER-1.7.0/applications/bin/$WM_OPTIONS $USER-1.7.0/tutorials ThirdParty-1.7.0/mpich2-1.1.1p1/source
should be changed to:

Code:
tar -chjf OpenFOAM.$WM_OPTIONS.tar.bz2 OpenFOAM-1.7.0/applications/bin/$WM_OPTIONS \
OpenFOAM-1.7.0/etc OpenFOAM-1.7.0/bin OpenFOAM-1.7.0/lib/$WM_OPTIONS \
OpenFOAM-1.7.0/doc/Guides-a4 ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER/mpich2-1.2.1p1 \
$USER-1.7.0/applications/bin/$WM_OPTIONS $USER-1.7.0/tutorials ThirdParty-1.7.0/mpich2-1.2.1p1/source
3) In the setvars.bat file, what does the line "%HOME%\Ruby187\bin\setrbvars.bat" do? In my version of discretizer it includes it's own ruby distribution, why is there a need to set the path when you start OF?

Again thank you very much for all you help.

Kind regards,
Thomas.
ThomasFP is offline   Reply With Quote

Old   October 25, 2010, 18:08
Default
  #26
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Thomas,
Quote:
Originally Posted by ThomasFP View Post
1) When I run any openFOAM command in get the following warning.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
--> FOAM Warning :
From function openLibrary(const fileName& libName)
in file MSwindows.C at line 1142
\ LoadLibrary failed. "Error 126: Det angivne modul blev ikke fundet.
"

Is that a problem or just part the porting from linux to Windows?
It's probably a bug on my part Sorry about. It shouldn't affect operationality, since it's just a warning. But did you do this step while still in Linux:
Quote:
The following steps are required due to a minor glitch in the patches:
  1. Go into the library folders of each build:
    Code:
    cd $FOAM_LIBBIN
    cp libgnurx-0.dll libregex.dll
Quote:
Originally Posted by ThomasFP View Post
2) In the section "9.2 Packing up and leaving for Windows" I think I have found a small error. The code :
(...)
should be changed to:

Code:
tar -chjf OpenFOAM.$WM_OPTIONS.tar.bz2 OpenFOAM-1.7.0/applications/bin/$WM_OPTIONS \
OpenFOAM-1.7.0/etc OpenFOAM-1.7.0/bin OpenFOAM-1.7.0/lib/$WM_OPTIONS \
OpenFOAM-1.7.0/doc/Guides-a4 ThirdParty-1.7.0/platforms/$WM_ARCH$WM_COMPILER/mpich2-1.2.1p1 \
$USER-1.7.0/applications/bin/$WM_OPTIONS $USER-1.7.0/tutorials ThirdParty-1.7.0/mpich2-1.2.1p1/source
Weird, I thought I changed them all! Thanks for the report! (Edit: I just fixed this one! The others will have to wait a few more hours...)

Quote:
Originally Posted by ThomasFP View Post
3) In the setvars.bat file, what does the line "%HOME%\Ruby187\bin\setrbvars.bat" do? In my version of discretizer it includes it's own ruby distribution, why is there a need to set the path when you start OF?
Ooops, that's a leftover from the blueCFD package; it sets up the Ruby environment so Discretizer can be launched from the command line.

And Thank You as well, because it's good thing you reported about all of these issues! The release we made of blueCFD 1.7-1 had none of these issues, because I fixed them as I found them and always used multi-core, so none of these issues ended up in the final product... but the documentation in the wiki didn't get the same testing treatment

Hopefully tomorrow I'll get to fixing these issues.

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Old   October 26, 2010, 03:46
Default
  #27
New Member
 
Thomas Frank Petersen
Join Date: May 2010
Posts: 5
Rep Power: 16
ThomasFP is on a distinguished road
Hi Bruno.

I did run
Code:
cd $FOAM_LIBBIN
cp libgnurx-0.dll libregex.dll
Both of the files are present in my ".\OpenFOAM-1.7.0\lib\linuxmingw-w32DPOpt" directory. Wierd, but if it is not a problem I won't worry about it and concentrate on doing some CFD .

Regards,
Thomas.
ThomasFP is offline   Reply With Quote

Old   June 4, 2012, 07:07
Default
  #28
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
I have try and get some bugs, this is my build log
Code:
========================================
Start ThirdParty Allwmake
========================================

========================================
Compile zlib library

'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/libz.dll' is up to date.
========================================
Compile regex library

regex already installed... run ./AllwcleanRegEx if you feel that it needs rebuilding!
========================================
Copying gcc related DLLs

========================================
Compile specific mpi libraries

Setup MPICH2 stubs...
[1m Generating MPICH2 stub... [0m
[1m MPICH2 stub is already built and ready to use. [0m
========================================
Build Scotch decomposition library

have scotch shared libraries
========================================
Build PTScotch decomposition library (requires MPI)

have ptscotch shared libraries
========================================
Build Metis decomposition

+ cd metis-5.0pre2
+ cpMakeFiles metis
+ set +x
+ wmake libso GKlib
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/libGKlib.dll' is up to date.
+ wmake libso libmetis
linuxmingw-w64DPOpt/options:10: *** missing separator.  Stop.
wmake error: file 'Make/linuxmingw-w64DPOpt/objectFiles' could not be created //Start error from here
========================================
Build ParMetis decomposition. Requires MPI.

+ cd ParMetis-3.1
+ WM_OPTIONS_LOCAL=linuxmingw-w64DPOptMPICH
+ cpMakeFiles ParMetis
+ set +x
+ wmake libso METISLib
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/mpich2-1.4.1p1/libmetis-parmetis.dll' is up to date.
+ wmake libso ParMETISLib
linuxmingw-w64DPOpt/options:10: *** missing separator.  Stop.
wmake error: file 'Make/linuxmingw-w64DPOpt/objectFiles' could not be created
+ unset WM_OPTIONS_LOCAL
========================================
Build ParMGridGen

+ cd ParMGridGen-1.0
+ cpMakeFiles ParMGridGen
+ set +x
+ wmake libso MGridGen/IMlib
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/libIMlib.dll' is up to date.
+ wmake libso MGridGen/Lib
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/libMGridGen.dll' is up to date.
========================================
Done ThirdParty Allwmake
========================================

+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/linuxmingw-w64DPOpt/global.?
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/MSwindows
+ Pstream/Allwmake
+ buildMode=libso
+ echo mingw-w64
+ grep mingw
+ [ x != xmingw-w64 ]
+ [  = LINKTOPSTREAM ]
+ buildMode=libo
+ wmake libo dummy
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/dummy/libPstream.o' is up to date.
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers
+ wmake libo mpi
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/mpich2-1.4.1p1/libPstream.o' is up to date.
+ unset buildMode
+ wmake libo OSspecific/MSwindows
'/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/libOSspecific.o' is up to date.
+ wmake libso OpenFOAM
linuxmingw-w64DPOpt/options:13: *** missing separator.  Stop.
wmake error: file 'Make/linuxmingw-w64DPOpt/objectFiles' could not be created
+ echo mingw-w64
+ grep mingw
+ [ x != xmingw-w64 ]
+ export WM_PSTREAMLINK=LINKTOPSTREAM
+ cd Pstream
+ ./Allwmake
+ buildMode=libso
+ echo mingw-w64
+ grep mingw
+ [ x != xmingw-w64 ]
+ [ LINKTOPSTREAM = LINKTOPSTREAM ]
+ buildMode=libso
+ wmake libso dummy
x86_64-w64-mingw32-g++ -Dlinux -DWM_DP -DWIN64 -DLITTLE_ENDIAN -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -O2 -DNDEBUG -fno-strict-aliasing -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-1.7.0/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-1.7.0/src/OSspecific/MSwindows/lnInclude -I/home/longlp/OpenFOAM/ThirdParty-1.7.0/zlib-1.2.5 -I/home/longlp/OpenFOAM/ThirdParty-1.7.0/platforms/linuxmingw-w64/mingw-libgnurx-2.5.1/include /home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/OFversion.o -Wl,--output-def,/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/dummy/libPstream.def,--out-implib,/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/dummy/libPstream.a,--enable-auto-import,--strip-all -shared Pstream.o IPread.o OPwrite.o -L/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt -lOpenFOAM -o /home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/dummy/libPstream.dll
/home/longlp/OpenFOAM/ThirdParty-1.7.0/platforms/linuxmingw-w64/mingw/lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make: *** [/home/longlp/OpenFOAM/OpenFOAM-1.7.0/lib/linuxmingw-w64DPOpt/dummy/libPstream.dll] Error 1
+ set +x
........ and more
I use 7.1 Using custom built MinGW cross-compilers
after use
Code:
./build-mingw45
I did follow 7.3.1
Code:
cd $WM_DIR/rules
sed -i -e 's=-O2 -DNDEBUG=-O2 -DNDEBUG -fno-strict-aliasing=' "$WM_ARCH$WM_COMPILER/c++Opt"
and cd to OpenFOAM project and
Code:
./Allwmake
Did i miss st??
Mr.Cloud is offline   Reply With Quote

Old   June 4, 2012, 07:23
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Mr.Cloud,

That's an old issue, due to the evolution of the "cpp" binary.
Edit the file "$WM_DIR/rules/$WM_ARCH$WM_COMPILER/general" and make the 1st line look like the first one from here: https://github.com/OpenCFD/OpenFOAM-...nuxGcc/general

Namely this one:
Code:
CPP        = cpp -traditional-cpp $(GFLAGS)
Best regards,
Bruno
Mr.Cloud likes this.
__________________

Last edited by wyldckat; June 6, 2012 at 19:17. Reason: one " too many...
wyldckat is online now   Reply With Quote

Old   June 4, 2012, 22:22
Default
  #30
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Mr.Cloud,

That's an old issue, due to the evolution of the "cpp" binary.
Edit the file "$WM_DIR/rules/"$WM_ARCH$WM_COMPILER/general" and make the 1st line look like the first one from here: https://github.com/OpenCFD/OpenFOAM-...nuxGcc/general

Namely this one:
Code:
CPP        = cpp -traditional-cpp $(GFLAGS)
Best regards,
Bruno
First thanks for your quickly reply and i edited that file follow your tutorial but it still the same...
Code:
CPP        = cpp -traditional-cpp $(GFLAGS)
LD         = x86_64-w64-mingw32-ld

PROJECT_LIBS = -l$(WM_PROJECT) -L$(FOAM_MPI_LIBBIN) -lPstream
PROJECT_INC  += -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.5 \
    -I$(WM_THIRD_PARTY_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER)/mingw-libgnurx-2.5.1/include

include $(GENERAL_RULES)/standard

include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++

SO      = dll
EXE_EXT = .exe

# Ensure we know what OS we are compiling for
# during MakefileFiles and MakefileOptions
GFLAGS  += -DWIN64 -DLITTLE_ENDIAN
Is there sts wrong at file ~/OpenFOAM/ThirdParty-1.7.0/ParMetis-3.1/Make??
Code:
/* NOTE: make any changes to this file in wmakeFiles/ */

sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)

EXE_INC  = $(PFLAGS) $(PINC)
LIB_LIBS = $(PLIBS)

/*neutralize this variable...*/
PROJECT_LIBS =
Mr.Cloud is offline   Reply With Quote

Old   June 6, 2012, 19:24
Default
  #31
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Le Phi Long,

OK, I finally managed to get around to test this. Run the following commands:
Code:
foam3rdParty
./Allclean
./Allwmake
./Allwmake
You should now no longer see any major problems for the ThirdParty folder.

Now you can move onto the OpenFOAM folder:
Code:
foam
wclean all
./Allwmake > make.log 2>&1
This way you get a full build log in the file "make.log", so it's easier to keep track of the errors that occur.

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Old   June 6, 2012, 23:34
Default
  #32
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
Oh... THanks you so much Bruno... I have done follow you, and it got no error so far...
Mr.Cloud is offline   Reply With Quote

Old   August 29, 2012, 06:51
Default
  #33
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
Quote:
Originally Posted by Mr.Cloud View Post
Oh... THanks you so much Bruno... I have done follow you, and it got no error so far...
Hi Bruno,I was success in buiding OF 1.7.x for win 64, and thanks you so much for that..., Now i'm building version 2.1.0. I has an release from Ect and it's work well but I need build and OF source to make my thermal foam (simpleThermal,...). I followed this tutorial http://www.symscape.com/openfoam-2-1...windows-64-mpi but got alot of error .
I user the mingw-w64, with this version, i was success in build a OF1.7.x version. Looking for your tutorial like version 1.7, so detail and comfortable.

This is the begin...
Quote:
make: Nothing to be done for `all'.
no ThirdParty sources found - skipping
+ set -e
+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/*/global.?
+ wmakeLnInclude OpenFOAM
wmakeLnInclude: linking include files to OpenFOAM/lnInclude
+ wmakeLnInclude OSspecific/MSwindows
wmakeLnInclude: linking include files to OSspecific/MSwindows/lnInclude
+ OSspecific/MSwindows/Allwmake
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file MSwindows.C
Making dependency list for source file printStack.C
Making dependency list for source file regExp.C
Making dependency list for source file signals/sigFpe.C
Making dependency list for source file signals/sigSegv.C
Making dependency list for source file signals/sigInt.C
Making dependency list for source file signals/sigQuit.C
Making dependency list for source file signals/sigStopAtWriteNow.C
Making dependency list for source file signals/sigWriteNow.C
Making dependency list for source file timer.C
Making dependency list for source file fileMonitor.C
Making dependency list for source file fileStat.C
Making dependency list for source file cpuTime/cpuTime.C
Making dependency list for source file clockTime/clockTime.C
SOURCE=MSwindows.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/MSwindows.o
SOURCE=printStack.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/printStack.o
SOURCE=regExp.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/regExp.o
SOURCE=signals/sigFpe.C ; x86_64-w64-mingw32-g++ -m64 -Dlinux64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/MSwindows/lnInclude -c $SOURCE -o Make/linux64GccDPOpt/sigFpe.o
signals/sigFpe.C: In function ‘void clearFpe()’:
signals/sigFpe.C:45:15: error: ‘_clearfp’ was not declared in this scope
signals/sigFpe.C:46:35: error: ‘_controlfp’ was not declared in this scope
signals/sigFpe.C: In member function ‘void Foam::sigFpe::set(bool)’:
signals/sigFpe.C:136:33: error: ‘_controlfp’ was not declared in this scope
signals/sigFpe.C:138:22: error: ‘_EM_ZERODIVIDE’ was not declared in this scope
signals/sigFpe.C:138:39: error: ‘_EM_INVALID’ was not declared in this scope
signals/sigFpe.C:138:53: error: ‘_EM_OVERFLOW’ was not declared in this scope
signals/sigFpe.C:139:27: error: ‘_MCW_EM’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/sigFpe.o] Error 1
Mr.Cloud is offline   Reply With Quote

Old   August 30, 2012, 00:43
Default
  #34
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
This is my buildlog so far.
Here is the full log https://docs.google.com/document/d/1...-D3iu1mh0/edit
I terminated it when i got these errors.
Quote:
wclean mpi
wmake libso mpi
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file UOPwrite.C
could not open file mpi.h for source file UOPwrite.C
Making dependency list for source file UIPread.C
could not open file mpi.h for source file UIPread.C
Making dependency list for source file UPstream.C
could not open file mpi.h for source file UPstream.C
Making dependency list for source file PstreamGlobals.C
could not open file mpi.h for source file PstreamGlobals.C
SOURCE=UOPwrite.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/longlp/OpenFOAM/ThirdParty-2.1.x/platforms/linux64Gcc/openmpi-1.5.3/include -IlnInclude -I. -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/longlp/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOptOPENMPI/UOPwrite.o
UOPwrite.C:29:17: fatal error: mpi.h: No such file or directory
compilation terminated.
....
Mr.Cloud is offline   Reply With Quote

Old   August 31, 2012, 07:49
Default
  #35
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Mr.Cloud,

If you still have problems with this, I suggest you start a new thread for the instructions you are following, instead of asking the same question on multiple threads
(the duplicate question I'm talking about is this one: http://www.cfd-online.com/Forums/ope...tml#post379260 )

Best regards,
Bruno
__________________
wyldckat is online now   Reply With Quote

Old   September 3, 2012, 22:43
Default
  #36
New Member
 
Le Phi Long
Join Date: Feb 2011
Posts: 18
Rep Power: 15
Mr.Cloud is on a distinguished road
Ok... Thanks for your reply Bruno. From now i will post my problems to this thread "OF 2.1.0 under Windows XP or Windows 7", it look suitable with my problem than this. And can you come there, and have a look at my problem?
Thanks you so much. And st, please forgive for my poor English.
Mr.Cloud is offline   Reply With Quote

Old   October 24, 2012, 08:10
Default Problem when patching ThirdParty-1.7.0
  #37
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
Hi,

I am trying to cross compile OpenFoam1.7 in cygwin, I therefore used the wiki instructions on:
Code:
http://openfoamwiki.net/index.php/Tip_Using_Cygwin_for_cross-compiling_OpenFOAM
and
Code:
http://openfoamwiki.net/index.php/Tip_Cross_Compiling_OpenFOAM_1.7_in_Linux_For_Windows_with_MinGW
The installataion of Cygwin went fine (as far as I know).
In one of the first steps of the second link, however, when patching ThirdParty-1.7.0, I get the error_

Code:
...
patching file ThirdParty-1.7.0/wmakeFiles/ParMetis/METISLib/options
patching file ThirdParty-1.7.0/wmakeFiles/ParMetis/ParMETISLib/options
can't find file to patch at input line 18082
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/scotch_5.1/src/libscotch/Makefile b/scotch_5.1/src/libscotch/Makefile
|index d18c9be..e8244ce 100644
|--- a/scotch_5.1/src/libscotch/Makefile
|+++ b/scotch_5.1/src/libscotch/Makefile
--------------------------
File to patch:
...and then it asks me for the file to patch.

Anybody any clue? (I don't know anything about linux so I'm following the wiki instructions like a blind robot... ..and hope to end up with win32 executables )
gerritgroot is offline   Reply With Quote

Old   October 24, 2012, 15:53
Default
  #38
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings gerritgroot,

I did a quick test in Ubuntu and it's very simple:
  1. When it asks that question "File to patch:", you simply press the Enter key.
  2. It then asks if it should skip it, for which you answer:
    Code:
    y
    And press the Enter key.
And you're good to go onward! Don't worry about this particular file not being patched, because that was a glitch the patch that I created back then. Said file will be properly fixed during compilation!

Best regards,
Bruno

PS: I moved your post to this thread, because this is the thread dedicated to questions for the patches posted for that series of instruction pages.
__________________
wyldckat is online now   Reply With Quote

Old   October 25, 2012, 07:07
Default "File to patch?"
  #39
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
Muito obrigado Bruno,

I never thought it would be that simple. I'm sure more questions will come up as this is all new to me.

Gerrit.

BTW: It took me some time to find my own messages back. Isn't there a button like "my messages" somewhere? (I've seen that on other forums)
gerritgroot is offline   Reply With Quote

Old   October 25, 2012, 12:21
Default
  #40
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
Hi,

As was to be expected, I got stuck again. I hope you can help me out.

First of all some downloads didn't work. I solved this by placing the compressed files under the "download" directory:
Code:
./home/MyUser/OpenFOAM/ThirdParty-1.7.0/download
Then after uncompressing and building the compiler I got the following error
Code:
make of binutils failed - log available: /home/MyUser/OpenFOAM/buildLogs/binutils-mingw32_configure.log
which made me have a look in the log file where I found:

Code:
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking to see if cat works as expected... /home/MyUser/OpenFOAM/ThirdParty-1.7.0/binutils-2.20.1/configure: 3590: test: a: unexpected operator
no
configure: error: The cat command does not ignore carriage return characters.
  Please either mount the build directory in binary mode or run the following
  commands before running any configure script:
set -o igncr
export SHELLOPTS
So, to solve this, I typed:
Code:
set -o igncr
export SHELLOPTS
at the CygWin prompt.

And ran the script again
Code:
./build-mingw44
The script seems clever enough to skip the downloading of the files if they are available. Nevertheless, I got the same error again at the very end.

How can I solve this?
gerritgroot is offline   Reply With Quote

Reply

Tags
mingw-w32, mingw-w64, mingw32


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 14:24.