|
[Sponsors] |
December 28, 2009, 14:58 |
Script Bug "Bison"
|
#221 |
New Member
Juan Marcelo Gimenez
Join Date: Dec 2009
Location: Santa Fe, Argentina
Posts: 12
Rep Power: 16 |
Hi Mad:
When I tried to compile OF with your Script (in Ubuntu 9.04 32 bits recently installed), I had one "critical error": icoFoam WARNING: Conflicting installations: OpenFOAM settings : /home/aurel/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/icoFoam current path : CRITICAL ERROR In "make.log", the source of the errors seemed to be lack of "Bison"'s lexier: /bin/sh: bison: not found mv: no se puede efectuar `stat' sobre «y.tab.c»: No existe el fichero ó directorio mv: no se puede efectuar `stat' sobre «y.tab.h»: No existe el fichero ó directorio gcc: Make/linuxGccDPDebug/parser_yy.c: No existe el fichero ó directorio and after this, in almost all aplications had compilation errors, for example: /usr/bin/ld: cannot find -lfiniteVolume collect2: ld returned 1 exit status Later, I installed Bison with $ sudo apt-get install Bison And, I recompile with ./Allwmake Now, I don't have any critical errors. I propose to include in the script the package "Bison" in the apt lines. Sorry for my bad english. Regards, Juan |
|
December 29, 2009, 00:28 |
offline openfoam 1.6 installation
|
#222 |
Senior Member
JSM
Join Date: Mar 2009
Location: India
Posts: 192
Rep Power: 20 |
Hi Mads Reck,
I am new to linux (ubuntu 9.1) and openfoam. I successfully installed unbuntu 9.1 in my system. I want to install openfoam 1.6. Actually I downloaded 32bit openfoam 1.6 binary files from other system.(OpenFOAM-1.6.General.gtgz, OpenFOAM-1.6.linuxGccDPOpt.gtgz, ThirdParty-1.6.General.gtgz, ThirdParty-1.6.linuxGcc.gtgz ) I could not access internet right now from my computer. So could give me script file to use these downloaded binary files or procedure to follow manually. It will be great help to me.
__________________
With regards, JSM |
|
January 4, 2010, 00:16 |
gcc err with lex.yy.c
|
#223 |
New Member
Brian C
Join Date: Dec 2009
Posts: 9
Rep Power: 16 |
Hi,
I really don't think the compiler error with gcc is specifically a problem with gcc. The version I, and others, are using matches the version that several others (including MadsR) have recommended. lex.yy.c is generated by flex via the command: 'flex wmkdep.l'. flex is apparently a lexical analyzer. It seems odd that it takes no other argument than wmkdep.l and yet it generates compilable code on one machine and uncompilable code on another. Does anybody know what settings (logicals, variables, paths, permissions, ...) are required to get the flex to run properly? Since I am using the script generated by MadsR, I should have the same version of flex as everybody else. Can somebody that has compiled OpenFOAM for Ubuntu 9.04 (32 bit, on Intel platform) please contact me and we can check some additional details to see where I went off track? Brian |
|
January 4, 2010, 00:45 |
flex vs. flex-old
|
#224 |
New Member
Brian C
Join Date: Dec 2009
Posts: 9
Rep Power: 16 |
MadsR (et.al.),
After reviewing other threads, it seems that there are at least two versions of flex. I got flex-old just now (which removed flex) and tried a one-liner to create lex.yy.c and then compile with gcc. It complied!?! Is it possible that your script grabs the wrong version of flex to create lex.yy.c ? Should it be getting flex-old and not flex? I am re-running your install script without the 'apt-get install' lines now that I have flex-old. I'll report on what I get. Brian |
|
January 4, 2010, 01:16 |
flex vs. flex-old [same result]
|
#225 |
New Member
Brian C
Join Date: Dec 2009
Posts: 9
Rep Power: 16 |
Hi,
Same result: compiler error. gcc -m32 -Wall -O3 -fPIC dirToString.c -o /home/brian/OpenFOAM/OpenFOAM-1.6.x /wmake/bin/linuxGcc/dirToString flex wmkdep.l gcc -m32 -Wall -O3 -fPIC lex.yy.c -o /home/brian/OpenFOAM/OpenFOAM-1.6.x/wmak e/bin/linuxGcc/wmkdep lex.yy.c:1287: warning: ‘yyunput’ defined but not used lex.yy.c:1329: warning: ‘input’ defined but not used wmkdep.l: In function ‘yy_scan_bytes’: wmkdep.l:462: internal compiler error: Illegal instruction Back to square one... Brian |
|
January 4, 2010, 03:02 |
|
#226 | ||
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 |
Hi all,
That's why I had locales settings in mind first, but as you state, your machine is set to English, I think we can check that off. What I found: Quote:
Further: Quote:
Cheers Wolle P.S.: Source of the quotations: http://dinosaur.compilertools.net/flex/manpage.html |
|||
January 7, 2010, 04:24 |
|
#227 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 |
Hi all!
I finally succeeded in compiling OpenFOAM-1.6.x! This is, what I did: 1. Started with a clean environment, deleted all old stuff from former attempts. 2. Downloaded the ThirdParty stuff and performed a git clone for the OF sources as in the installation script. Unpacked the ThirdParty stuff. 3. Installed several packages: Code:
build-essential cmake firebird2-dev firebird2.0-dev flex libcupsys2-dev libdbus-1-dev libfontconfig1-dev libfreetype6-dev libglib2.0-dev libglu1-mesa-dev libiodbc2-dev libjpeg62-dev libmng-dev libmpfr1 libmpfr1ldbl libmysqlclient15-dev libpng12-dev libpq-dev libsm-dev libsqlite0-dev libssl-dev libtiff4-dev libx11-dev libxcursor-dev libxfixes-dev libxrandr-dev libxrender-dev libxt-dev mesa-common-dev x11proto-xinerama-dev libxinerama-dev libaudio-dev Code:
binutils-dev Code:
byacc bison texinfo I have to admit, that I don't know, which packages are essential in order to compile OF-1.6.x, but at least it works this way! Most of the packages (though not all) have been installed on my system by default by the way... 4. Set up ~/OpenFOAM/OpenFOAM-1.6.x/etc/settings.sh with compilerInstall=System 5. Source OF-bashrc: $ source ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc 6. export WM_NCOMPPROCS=1 (this is the number of used processor cores for compilation - as I have only a single core processor... might be obsolete) 7. Compile the ThirdParty stuff!!! This very step seems to be the solution of the "internal compiler error issue" to me!!! Do it by an ./Allwmake in the ThridParty directory. Sometimes, the compilation might have to be executed several times, as some libraries seem not to be build at the first attempt. 8. Source OF-bashrc again in order to update paths that might have been changed! (See step 5) 9. Compile OF by an ./Allwmake in the OF directory. Might also have to be executed several times (see step 7). (found all these steps here: http://openfoamwiki.net/index.php/In...git_repository (1.1.1, 1.1.2 and 1.1.3)) On my system, the compilation failed first, because a cmake process of PV3Foam(whatever) complained that "command not found: /bin/c++", but wants to use C++ compiler as a result of VTK compiled with c++. I found the c++ compiler in /usr/bin/c++ and simply created a symlink /bin/c++ which points to that /usr/bin/c++. I know, this is something like a brute force method and might not the proper way to go about things or might seem to be not very sporting.... but I simply didn't know better and the result was a compilation run without complaints or errors. If somebody with more Linux experience than me can give me some advice how to do it "correctly", I would appreciate any enlightening comment. Cheers Wolle |
|
January 7, 2010, 05:02 |
|
#228 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
Phew, a lot of stuff is going on in this thread, that's great!
I am not sure how to adapt the script to take care of the issues which has been brought up here, though. It still works for quite a few systems, but not for others. It seems that there could be an issue with flex and language settings (?). And maybe bison needs to be included. Wolle, you seem to install a bunch of packages which I have no idea of :-) are all those really needed for OpenFOAM? I mean there is stuff in there ranging from mysql clients to audio. /Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
January 7, 2010, 05:58 |
|
#229 | |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 |
Quote:
neither have I an idea of those packages. Most of them (also mysql and audio stuff!) have already been included in my standard Xubuntu 9.04-32 installation. I know this is not a gentleman-like method at all, but it works. As stated, I got these information from different threads dealing with the compilation of former versions. Looking up those old threads and learning about compilation errors seemed the only way to find a solution to me. Sadly it seems as if I did this to no avail for me, as I personally have to focus on CAD instead of CFD at the moment.... sadly.... Cheers Wolle |
||
January 7, 2010, 11:41 |
Good old package hell...
|
#230 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Mads and Wolle (and to all others as well ),
As far as my experience goes, let me breakdown the package list by relevance:
Mads, I remember reading you did a clean install in Ubuntu 9.10 64bit, and that your script worked... but you still had to do some tweaks I mentioned in an earlier post... So, your cookbook isn't totally self-sufficient by your own experience My advice - keep the cookbook in 2 separate scripts: one for administrative/sudo installation; another for making a clean OpenFOAM build. The administrative one could then just be one for each Linux distro, including those Linux library tweaks. Then the other one would only need to be changed in the next OpenFOAM master version. And I could almost bet that if you did Code:
apt-get update edit: Wolle, i've re-read or previous post: Quote:
Code:
ln -s /usr/bin/c++ /bin/c++ Best regards, Bruno Last edited by wyldckat; January 7, 2010 at 11:49. Reason: missing explaining something.... |
||
January 8, 2010, 08:53 |
|
#231 | ||
Member
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 16 |
Hi to everybody,
I have just installed openFoam on Ubuntu 9.10 32bit and I have made a little chenge to MadsR script: Original: Quote:
I have changed it in: Quote:
__________________
|
|||
January 9, 2010, 10:36 |
|
#232 |
Member
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
Thank you for making the script available MadsR... it worked flawlessly on Ubuntu 9.10 x64.
|
|
January 9, 2010, 13:02 |
|
#233 |
Member
Alessandro
Join Date: Nov 2009
Posts: 67
Rep Power: 16 |
MadsR, your script works great also on Linux Mint 8 32bit with the correction in my previous post
__________________
|
|
January 11, 2010, 04:50 |
|
#234 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
@bruno, nice review of libs. It seems that some (including me) are able to run the script without the load of libs you are suggesting. On the other hand some needs install of those libs. I guess I could add them to the script, as the surely do no harm :-)
@brendan+Alessandro, great it worked. Alessandro, you are absolutely right, the "lib64" should be "lib", I've corrected it right away. @Wolle, CAD instead of CFD?? I am sorry to hear that :-) I hope it will change sooner than later, keep up the good spirit :-) /Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
January 11, 2010, 08:20 |
|
#235 |
New Member
Join Date: Jan 2010
Posts: 28
Rep Power: 16 |
||
January 11, 2010, 08:25 |
|
#236 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello Mads and bookie56,
Try this: http://hvirvel.com/OF/ Mads server must've just upgraded to PHP Best regards, Bruno |
|
January 11, 2010, 08:26 |
|
#237 | ||
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 16 |
Hi all,
Quote:
@brendan+Alessandro, great it worked. Alessandro, you are absolutely right, the "lib64" should be "lib", I've corrected it right away. Quote:
Cheers Wolle |
|||
January 11, 2010, 09:13 |
|
#238 |
New Member
Join Date: Jan 2010
Posts: 28
Rep Power: 16 |
Hi guys
Got to say I am impressed with the service around here..... Thanks wyldckat for the heads up. Up to my eyes in trying to sort out building computers and offering finans options for my customers, so that more buy home built computers.... I will be in touch... Thanks again!! bookie56 |
|
January 11, 2010, 11:13 |
|
#239 |
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18 |
Thanks Bookie for pointing that out and Bruno for helping. Yes, I've just changed it to PHP and forgot to update the link in my signature.
/Mads
__________________
Online free airfoil-mesher for OpenFOAM here |
|
January 12, 2010, 09:28 |
|
#240 |
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 16 |
Hello Mads,
The reason why your script gives "gcc version" errors sometimes is because your script has been tested on a fresh Ubuntu 9.10 installation. However, when the installation has already been updated, it does not work due to a newer version of libstdc++.so in the /usr/bin folder. In your script, the following softlink is created: Code:
ln -s /usr/lib/libstdc++.so.6.0.10 libstdc++.so.6 Code:
ln -s /usr/lib/libstdc++.so.6.0.13 libstdc++.so.6 Last edited by CedricVH; January 12, 2010 at 13:12. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
install OpenFoam 1.6 by building source: how? | niudie | OpenFOAM Installation | 13 | April 26, 2011 01:48 |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
install openfoam 1.6 on opensuse 11.0 | andresbh | OpenFOAM Installation | 8 | September 30, 2009 01:48 |
Install openFOAM 1.6 on debian 32bit - blockMesh: command not found | fossy | OpenFOAM Installation | 1 | August 28, 2009 05:06 |
Install of OpenFOAM 1.6 Error 1 Error 2 & run tutorial | potac | OpenFOAM Installation | 3 | August 27, 2009 10:04 |