|
[Sponsors] |
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 26, 2012, 19:32 |
|
#41 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi gerritgroot,
You can find your posts by clicking on the menu "User Panel", then on the "Your Profile" link and then on the statistics tab you should find a link for listing the posts you've made. As for the error you got, it took me a while to notice the following message: Quote:
Best regards, Bruno
__________________
|
||
October 27, 2012, 16:18 |
|
#42 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
Thank you very much Bruno, especially for making me find my posts.
I went all the way back to the step you indicated (I guess something went wrong there) and, just in case started all over again with everything clean, when trying to untar the openfoam code with Code:
tar xzf OpenFOAM-1.7.0.gtgz Code:
$ tar xzf OpenFOAM-1.7.0.gtgz tar (child): OpenFOAM-1.7.0.gtgz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now Code:
Microsoft Windows XP [Versión 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\cygwin\home\root\OpenFOAM>dir Directory C:\cygwin\home\root\OpenFOAM 27/10/2012 20:59 <DIR> . 27/10/2012 20:59 <DIR> .. 22/10/2012 19:06 38,998,257 OpenFOAM-1.7.0.gtgz 22/10/2012 19:08 55,390,881 ThirdParty-1.7.0.gtgz 2 files 94,389,138 bytes 2 dirs 3,723,649,024 bytes free C:\cygwin\home\root\OpenFOAM> ...I remember why I gave up with Linux two years ago after a try.... |
|
October 27, 2012, 16:21 |
|
#43 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
With "ls" in cygwin I don't see the files by the way
Code:
root@MyComputer ~/OpenFOAM $ ls root@MyComputer ~/OpenFOAM |
|
October 27, 2012, 16:35 |
|
#44 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Well, you better at least read the Cygwin "Using" instructions: http://cygwin.com/cygwin-ug-net/using.html
The following command should get you a better feel for where your current folder really is: Code:
cygpath -w $PWD Good luck!
__________________
|
|
October 29, 2012, 12:09 |
Cross compiling for mortals
|
#45 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
Thank you Bruno,
Standing at the prompt without being in any subdirectoy, gives me Code:
$ cygpath -w $PWD C:\cygwin\home\root Code:
$ cygpath -u $PWD /home/root Code:
mkdir OpenFoam "c:\cygwin\home\root" as a new empty directory, great! That makes sense! However, as soon as I switch to the "Tip Cross Compiling OpenFOAM 1.7 in Linux For Windows with MinGW" instructions page and give the command: Code:
cd $HOME/OpenFOAM Code:
$ cygpath -u $PWD /home/root/OpenFOAM Code:
$ cygpath -w $PWD C:\o Code:
C:\home\root\OpenFOAM I guess that line that was added to "/etc/fstab" has something to do with it and tells windows to go to "C:\o" when it's standing in the OpenFOAM directory in cygwin. Anyway, I placed the whole "OpenFOAM" directory under "C:\o" so cygwin could see it and to get it working, unpacked the zipped files successfully and started the script: Code:
./build-mingw44 Code:
Configuring binutils make of binutils failed - log available: /home/root/OpenFOAM/buildLogs/binutils-mingw32_configure.log Code:
C:/o /home/root/OpenFOAM ntfs binary,posix=1 0 0 C:/dump /tmp ntfs binary,posix=1 0 0 Again I type: Code:
set -o igncr export SHELLOPTS get the same error! ??? By the way, in step 9, after: Code:
ln -s /usr/bin/cpp /lib/cpp Best regards, Gerrit |
|
October 31, 2012, 14:33 |
|
#46 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Gerrit,
It's been years since I've written those instructions. Cygwin has evolved and things might not be working as they were in the past. Which Windows version are you using? I'll see if I can do a quick test to it this coming weekend. As for step #9, you only need to do it once. And possibly with the latest Cygwin versions, you don't need to do it at all! Best regards, Bruno
__________________
|
|
November 5, 2012, 05:40 |
|
#47 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
Thanks a lot!!!
In the mean time, I was considering to run the LiveCD in a VM, but, though that's easy to get it working, it goes so much worse than just an own OS executable, that I tried this. Another option would be to install CAE_Linux directly on a separate computer, but that's costly as you need an extra computer for that. I'm running on XP. Thank you for being willing to help. Apart from that, I wonder (in general) whether there is going to be an update of this cross compilation for either newer versions of OF, CygWin or the third party software. I am also surprised that the OF people themselves stick so much to Linux, they can reach sooo much more people if they would only be willing to bring a standard windows executable directly from the OF page. I really think that, the latter can make the difference of having OF for a very small (and closed) academic community or as a careful competitor to commercial packages. Best Regards, Gerrit |
|
November 5, 2012, 16:57 |
|
#48 | |||||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Gerrit,
Sorry, but I didn't manage to take a look at the latest Cygwin this past weekend I'll try to look at it in the coming days... Quote:
It all really depends on what your resources and limitations are. If you need your simulations to run fast, then you should seriously think about having a good machine running Linux. It should pay for itself after some time, assuming it's worth the effort. As for using/building OpenFOAM directly on Windows, you have several options already, as listed here: http://openfoamwiki.net/index.php/Ti...mportant_Links (mental note: I've gotta update some of those links...) (edit: I've updated that section of the wiki.) As for virtualization, you can also use VMPlayer: http://openfoamwiki.net/index.php/Ho..._VMware_Player Quote:
The current endeavor from my side (and from the company where I work) is to focus on building directly in MSys (it's sort-of a minimal version of cygwin) and possibly directly in Windows Command Line. For more:
Quote:
[RANT] There are so many reasons that Linux is "better" for science, that it's hard to figure out where to start! Let's see a couple:
As for OpenFOAM itself, if you did a little research, you would find this: Quote:
[/RANT] Best regards, Bruno
__________________
Last edited by wyldckat; November 5, 2012 at 17:19. Reason: see "edit:" after "mental note:" |
||||||
November 6, 2012, 06:13 |
|
#49 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
Thank you Bruno,
No worries about the update. After all, it's a free favor. I nevertheless hope that, if you happen to have some time, that more people will take advantage of the same update. About Linux... ...yeah, it's the everlasting discussion. I tried many versions in vain, I am simply not willing to read a 300 pages book to get my USB stick working, as a matter of speeking (I'd rather spend that time reading something on aerodynamics for example, or a good novel haha). Linux users seem to see there OS as some sort of religion rather than an OS only (sorry guys). I'm also a huge advocate of free software, free OS-es and so on, but I'm even a bigger advocate of user friendlynesss and accepting reality. It's getting slowly off topic, but take OpenOffice for example, it's for free, but reads and writes native word docs as well. That philosophy is, in my opinion, the only way to reach the "hordes" (of which I don't exclude myself) and to seriously compete. And lastly about the mouse... ...Fluent works in a prompt as well, so it shouldn't be too hard to beat that, at least when it comes to functionality (I don't know about validation cases on the solver itself). I'll have a look at Bluecape! Gerrit |
|
November 9, 2012, 20:07 |
|
#50 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Gerrit,
OK, I've done some testing and I think I figured out the problems:
Best regards, Bruno
__________________
|
|
November 14, 2012, 11:02 |
|
#51 |
Member
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17 |
Thanks a lot Bruno,
The gcc compiler seems to build without any error (unless I missed something, but I didn't see anything strange). In spite of having used Code:
./build-mingw44 Code:
gcc versión 4.5.3 Code:
gcc -v So, believing "gcc -v" gives me the real answer, just in case I give the command Code:
cd $WM_DIR/rules sed -i -e 's=-O2 -DNDEBUG=-O2 -DNDEBUG -fno-strict-aliasing=' "$WM_ARCH$WM_COMPILER/c++Opt" Code:
./Allwmake Code:
Makefile:119: recipe for target `common_file_compress.o' failed make[2]: *** [common_file_compress.o] Error 1 make[2]: *** Se espera a que terminen otras tareas.... rm -f common2.c make[2]: se sale del directorio `/home/root/OpenFOAM/ThirdParty-1.7.0/scotch_5.1/src/libscotch' Makefile:58: recipe for target `scotch' failed make[1]: *** [scotch] Error 2 make[1]: se sale del directorio `/home/root/OpenFOAM/ThirdParty-1.7.0/scotch_5.1/src/libscotch' Makefile:91: recipe for target `scotch' failed make: *** [scotch] Error 2 Don't worry about answering, or if you do, you may answer for someone else reading these messages. As far as I am concerned, I am out of patience with Linux for about the 4th time in my life ...and, no I am not willing to read a 300 pages book on the Linux OS and all its possible flavours. Things that don't work out of the box, don't work at all. Nevertheless, thank you sincerely for all your answers, and goodbye Linux church! |
|
Tags |
mingw-w32, mingw-w64, mingw32 |
|
|