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

OpenFoam 2.0.0 installation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2011, 04:16
Default
  #21
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Bruno,

thank you very much for reporting the bug and for providing help.
As you said I tried


Code:
foam
wclean all src/Pstream
./Allwmake > make.log 2>&1
The result is
HTML Code:
make: Für das Ziel »all« ist nichts zu tun.

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

    have OPENMPI shared library (openmpi-1.5.3)

========================================
Build Scotch decomposition library scotch_5.1.11
    /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64Gcc/scotch_5.1.11
    scotch header in /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64Gcc/scotch_5.1.11/include
    scotch libs   in /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64GccDPOpt/lib

========================================
Build PTScotch decomposition library scotch_5.1.11 (uses MPI)
    /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64Gcc/scotch_5.1.11

    ptscotch header in /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64Gcc/scotch_5.1.11/include/openmpi-1.5.3
    ptscotch libs   in /home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64GccDPOpt/lib/openmpi-1.5.3

========================================
Build malloc

    optional component was not found
========================================
Build Tecio
    optional component was not found

========================================
Done ThirdParty Allwmake
========================================

+ wmakePrintBuild -check
no git description found
+ /bin/rm -f OpenFOAM/Make/linux64GccDPOpt/global.C
+ wmakeLnInclude OpenFOAM
+ wmakeLnInclude OSspecific/POSIX
+ Pstream/Allwmake
+ wmake libso dummy
/home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.4/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.4.4/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
/home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.4/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.4.4/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
wmakeLnInclude: linking include files to ./lnInclude
g++: keine Eingabedateien
make: *** [libNULL.so] Fehler 1
+ case "$WM_MPLIB" in
+ set +x
Then I tried

Code:
which cpp
But as the output says

HTML Code:
/home/user/OpenFOAM/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.4/bin/cpp
The code is located at the path you mentioned.

I cannot say which binutils version I have. How can I get this information (binutils --version does not work)?


[/QUOTE]
Anne Lincke is offline   Reply With Quote

Old   June 28, 2011, 19:31
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Anne,

This is getting weirder and weirder...
Quote:
Originally Posted by Anne Lincke View Post
Code:
/home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.4/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.4.4/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
/home/lincke/OpenFOAM/ThirdParty-2.0.0/platforms/linux64/gcc-4.4.4/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.4.4/cc1: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
wmakeLnInclude: linking include files to ./lnInclude
g++: keine Eingabedateien
make: *** [libNULL.so] Fehler 1
No libgmp.so.10 and trying to build libNULL.so... Without the first one, you shouldn't have been able to build anything else of either OpenFOAM nor OpenMPI! Or at least I think not...
As for libNULL, this only should happen if some environment variable is improperly defined or something like that

There is something very strange going on here I can only think of a few possibilities:
  1. You didn't mention (or I didn't read) what special modifications you might have made to your environment settings and/or how you built gcc 4.4.4.
  2. The packages you downloaded were somehow damaged. This is known to happen one in a while. Files disappearing is also something that happens once in a while as well. I would have to search for past posts, but it's briefly reported once in a while here in the forum.
    I don't know the specific probabilities, but I'd guess something like 1 in each million file downloads and unpacks, or something like that.
  3. You might have accidentally erased some files during builds and rebuild attempts.
  4. Is your home folder on a NFS share? This might be doing some interference in the build process. If this is the case, it's best to fix the NFS mount as soon as possible, otherwise you'll have a lot of headaches when running OpenFOAM simulations

So, right now I can only think of two solutions:
  • Start from scratch once again OR unpack again on top of the existing (partial) installation.
  • Instead of starting with OpenFOAM 2.0.0, go straight to 2.0.x: http://www.openfoam.com/download/git.php
    Additionally, use the ThirdParty repository as well. This would be:
    Code:
    git clone git://github.com/OpenCFD/ThirdParty-2.0.x.git
    On top of this, you can use the getter scripts I posted at this bug report: http://www.openfoam.com/mantisbt/view.php?id=220
    These links use in part the links defined in README.org for the third party packages.
    If you use my getter scripts, be sure to use the ones with _fixed in their names, when available. To make them executable, run:
    Code:
    chmod +x get*

edit: I forgot to mention that to know the binutils version you can use this command:
Code:
ld --version
ld is the linker and is part of binutils.

Best regards,
Bruno
__________________

Last edited by wyldckat; July 9, 2011 at 07:36. Reason: see "edit:" ... I forgot to git the proper ThirdParty git repo link...
wyldckat is offline   Reply With Quote

Old   June 29, 2011, 09:07
Default
  #23
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Thank you, Bruno.
I think you are right and it has something to do with the compiler gcc-4.4.4
My system compiler is too old for OF-2.0.0 (gcc-4.1.2) so tried to reuse the compiler from OF-1.7.0. which probably produced these errors.
For the other versions I used the compiler which was supplied within ThirdParty but at ThirdParty-2.0.0. I could not find a gcc.
Does the new OF-Version have its own compiler like in the versions before?

I am not sure if ThirdParty-2.0.x can fix this problem.
Anne Lincke is offline   Reply With Quote

Old   June 29, 2011, 17:53
Default
  #24
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Anne,

Quote:
Originally Posted by Anne Lincke View Post
I could not find a gcc.
Does the new OF-Version have its own compiler like in the versions before?
Both ThirdParty 2.0.0 and 2.0.x have a script named makeGcc. In either one of the following files is described from where you can get the necessary packages for building Gcc: README.html or README.org
Keep in mind that the makeGcc script assumes that you are still using the default options.


Like I said on my previous post, you can use the getter scripts I've posted here: http://www.openfoam.com/mantisbt/view.php?id=220
More specifically for Gcc, you can get this one: getGcc_fixed
To sum up the steps using the script:
Code:
foam3rdParty
wget "http://www.openfoam.com/mantisbt/file_download.php?file_id=102&type=bug" -O getGcc
chmod +x getGcc
./getGcc
./makeGcc
This will build gcc 4.5.1 if I'm not mistaken. If you intend on using the ThirdParty 2.0.0, you'll need to fix a certain file (before running the previous lines) as shown here:
Code:
--- a/etc/tools/ThirdPartyFunctions
+++ b/etc/tools/ThirdPartyFunctions
@@ -69,7 +69,7 @@ downloadFile()
     then
         mkdir -p download
         echo "downloading $tarFile from $url"
-        ( cd download && wget --no-check-certificate $url )
+        ( cd download && wget --no-check-certificate $url -O $file )
     fi
 }
Or, if you prefer to do it by hand, download the files indicated in README.org/html:Unpack them in the ThirdParty-2.0.0/x folder and then run makeGcc.



Quote:
Originally Posted by Anne Lincke View Post
I am not sure if ThirdParty-2.0.x can fix this problem.
There are a few bug fixes that might come in handy, specially if you are going to use the getter scripts.


If push comes to shove, then you can try following these instructions from a blog post of mine: Automated scripts for building gcc 4.4.x and 4.5.x for using with OpenFOAM 1.7 series
I haven't tested them yet with OpenFOAM 2.0, but hey should still work, or so I hope.

Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 30, 2011, 05:55
Default Installation on SLC 5.6 ( = Scientific Linux 5.6)
  #25
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
As I just succeeded in compiling OF 2.0.x for Scientific Linux Cern 5.6 (which basically is the same as Scientific Linux 5.6), I thought I'd let you know about the basic recipe:

(1) First of course you do the standard things as in the main page, i.e. getting the two main packages of OpenFOAM itself and the ThirdParty package. The unpacking still is the same.
Setting the environment variables stays the same as well.

(2) Afterwards the trick starts: Go for the Thirdparty-folder and look what there is required in matters of software and not there yet.
Code:
cd ~ThirdParty-2.0.x/
(3) Get the software compiled for your system from somewhere, either as in the Bug-Report described here (THANK YOU, Wyldckat!) or from other places and put it into this very folder. I just got the latest version of everything for which there was a make* script in the ThirdParty-folder. [1]

(4) Change OpenFOAM-2.0.x/etc/bashrc with an editor of your liking to link to the compiler within the thirdparty-directory.
Just change line 63 from
Code:
foamCompiler=system
to
Code:
foamCompiler=ThirdParty
(5) Then compile everything within this folder [2] by
Code:
./Allwmake
(6) It may be necessary to change ~/OpenFOAM-2.0.x/etc/config/settings.sh with an editor for the correct C-compilers. On one machine I did it, on the other machine it worked without that.

(7) Go for the main folder
Code:
cd ~/OpenFOAM/OpenFOAM-2.0.x
and start the compilation as usual with a brave
Code:
./Allwmake
This is the point, where you probably will drink the first cup of the coffee you just started. If everything goes fine, by now it will take quite some time (depending on the computer, hours are quite normal) for the compilation to finish.

(8) If nobody else did before, post within this thread if everything went fine or if i missed something. ;-)

[1] I got the software by copying the complete folders from some place on afs (Andrew File System). Unfortunately I do not know a generally accessible space for that.
[2] Time enough for starting up a coffee machine close by.
Linse is offline   Reply With Quote

Old   June 30, 2011, 06:10
Default
  #26
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Bernhard,

Very nice tutorial!

To add to it, I keep forgetting to mention this bug report as well: http://www.openfoam.com/mantisbt/view.php?id=211

Edit the file "etc/config/aliases.sh", append this:
Code:
#wmSC - single core machine
#wmMC - multi-core machine
alias wmSC='unset WM_NCOMPPROCS && echo "Building enabled for a single core"'
alias wmMC='export WM_NCOMPPROCS=1; test -r /proc/cpuinfo &&  export WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)  && echo "Building enabled for $WM_NCOMPPROCS cores"'
Then run wmSET to re-apply OpenFOAM settings.

Then run wmMC before Allwmake and it will build at full speed . On an i7 920, it takes me about 30min to build OpenFAM + OpenMPI

wmMC only affects building OpenFOAM itself, since all others (OpenMPI and makeGcc mostly) already take advantage of using all cores.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 5, 2011, 07:18
Default
  #27
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Thank you very much for your help!
I have to say that I have a problem again.
First of all I finally tried OF-2.0.x. Loading the packages, editing bashrc and so on.
Then I checked out your getter-script for the gcc by running

HTML Code:
foam3rdParty
wget "http://www.openfoam.com/mantisbt/file_download.php?file_id=102&type=bug" -O getGcc
chmod +x getGcc
./getGcc
./makeGcc
Everything seemed to work fine so far. I edited the file OpenFOAM-2.0.x/etc/bashrc as mentioned above by setting
HTML Code:
foamCompiler=ThirdParty
and also edited the settings.sh by just replacing gcc-4.4.4 to gcc-4.5.1

When running foamInstallationTest I got the following output:

HTML Code:
Executing /home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------
Shell:              bash
Host:               master
OS:                 Linux version 2.6.16.46-0.12-smp
-------------------------------------------------------------------------------


Checking main OpenFOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid      Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/lincke/OpenFOAM                    yes       yes
$WM_PROJECT_USER_DIR /home/lincke/OpenFOAM/lincke-2.0.x       no        no
$WM_THIRD_PARTY_DIR  /home/lincke/OpenFOAM/ThirdParty-2.0.x   yes       yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR      /home/lincke/OpenFOAM/OpenFOAM-2.0.x     yes  yes  yes

$FOAM_APPBIN         ...-2.0.x/platforms/linux64GccDPOpt/bin  no        yes
$FOAM_SITE_APPBIN    .../2.0.x/platforms/linux64GccDPOpt/bin  no        no
$FOAM_USER_APPBIN    ...-2.0.x/platforms/linux64GccDPOpt/bin  no        no
$WM_DIR              ...lincke/OpenFOAM/OpenFOAM-2.0.x/wmake  yes  yes  yes
-------------------------------------------------------------------------------


Checking the OpenFOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory                Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN         ...-2.0.x/platforms/linux64GccDPOpt/lib  no        yes
$FOAM_SITE_LIBBIN    .../2.0.x/platforms/linux64GccDPOpt/lib  no        no
$FOAM_USER_LIBBIN    ...-2.0.x/platforms/linux64GccDPOpt/lib  no        no
$MPI_ARCH_PATH       ...x/platforms/linux64Gcc/openmpi-1.5.3  no        yes
-------------------------------------------------------------------------------


Third party software
-------------------------------------------------------------------------------
Software Version   Location 
-------------------------------------------------------------------------------
flex     2.5.31    /usr/bin/flex                                            
/home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest: line 267: [: -lt: unary operator expected
/home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest: line 269: [: -gt: unary operator expected
/home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest: line 274: [: -lt: unary operator expected
/home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest: line 276: [: -gt: unary operator expected
/home/lincke/OpenFOAM/OpenFOAM-2.0.x/bin/foamInstallationTest: line 281: [: !=: unary operator expected
gcc                ...M/ThirdParty-2.0.x/platforms/linux64/gcc-4.5.1/bin/gcc
gzip     1.3.5     /bin/gzip                                                
tar      1.15.1    /bin/tar                                                 
icoFoam           
WARNING:  Conflicting installations:
          OpenFOAM settings        : /home/lincke/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/icoFoam
          current path             : 
          CRITICAL ERROR

-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.
The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for troubleshooting.

Done
Running Allwmake results in the following error
HTML Code:
lincke@master:~/OpenFOAM/OpenFOAM-2.0.x> ./Allwmake
gcc -m64  -Wall -O3   -fPIC dirToString.c -o /home/lincke/OpenFOAM/OpenFOAM-2.0.x/wmake/platforms/linux64Gcc/dirToString
/home/lincke/OpenFOAM/ThirdParty-2.0.x/platforms/linux64/gcc-4.5.1/libexec/gcc/x86_64-unknown-linux-gnu/4.5.1/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
make: *** [/home/lincke/OpenFOAM/OpenFOAM-2.0.x/wmake/platforms/linux64Gcc/dirToString] Fehler 1
Something is wrong with the shared object file. I have no idea what this means exactly or how I can fix it.
Any ideas?
Anne Lincke is offline   Reply With Quote

Old   July 6, 2011, 09:04
Default
  #28
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20
JNSN is on a distinguished road
Looking at your foamInstallationTest output, you may should update your flex version. But I am not sure, if this causes your errors when executing Allwmake

Best regards,
Jan
JNSN is offline   Reply With Quote

Old   July 6, 2011, 20:18
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 Anne and Jan,

@Anne: indeed Jan might be right. I've got the faint idea that the minimum version of flex that has worked for me has been 2.5.34, but I could be wrong.

As for the error that occurred about the missing libmpc.so.2, I believe the solution is quite simple... simply run the following command:
Code:
wmSET
This command will reactivate the environment and update the paths for the new gcc 4.5.1 and respective dependencies.
Then run Allwmake again as you've done before!

If this still doesn't work, next weekend I'll try to replicate the installation you've done so far, to check what might be missing.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 7, 2011, 04:00
Default
  #30
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hello Bruno and Jan,
I ran wmSET but still I got error messages in foamInstallationTest the same as I posted before and when running Allwmake:

HTML Code:
~/OpenFOAM/OpenFOAM-2.0.x> ./Allwmake
gcc -m64  -Wall -O3   -fPIC dirToString.c -o /home/lincke/OpenFOAM/OpenFOAM-2.0.x/wmake/platforms/linux64Gcc/dirToString
/home/lincke/OpenFOAM/ThirdParty-2.0.x/platforms/linux64/gcc-4.5.1/libexec/gcc/x86_64-unknown-linux-gnu/4.5.1/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
make: *** [/home/lincke/OpenFOAM/OpenFOAM-2.0.x/wmake/platforms/linux64Gcc/dirToString] Fehler 1
So basically the same as before... thanks anyway for your help. I did not check for the latest flex-version as I probably do not have the rights to install it. But if this helps I can ask a root-user.
Anne Lincke is offline   Reply With Quote

Old   July 7, 2011, 04:28
Default
  #31
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20
JNSN is on a distinguished road
Hi Anne,

my version of flex is 2.5.33, also not the newest one, but installation work without errors. To solve the problem with the missing libmpc.so.2, try following (worked for me):
Append
Code:
MPC_VERSION=mpc-0.8.2
MPFR_VERSION=mpfr-3.0.0
GMP_VERSION=gmp-5.0.1

LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64/$MPC_VERSION/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64/$MPFR_VERSION/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/platforms/linux64/$GMP_VERSION/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH
at the end of your OpenFOAM-2.0.0/etc/bashrc. Maybe you have to adapt it to your versions of mpc, mpfr and gmp.

Hope this helps,
Jan
JNSN is offline   Reply With Quote

Old   July 7, 2011, 12:38
Default
  #32
Member
 
Join Date: May 2009
Posts: 54
Rep Power: 17
gfilip is on a distinguished road
Hello everyone,

I am trying to compile 2.0.x (from git) but seem to run into ld issues. I am using gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3, flex 2.5.35, and I have completed the steps listed at http://www.openfoam.com/download/git.php
The ld issues seem to show up when compiling applications. checkMesh works fine.

I am attaching the output of ./Allwmake > make.log 2>&1

Thank you
Attached Files
File Type: gz make.log.tar.gz (77.7 KB, 11 views)
gfilip is offline   Reply With Quote

Old   July 8, 2011, 05:34
Default
  #33
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Jan,
I appended the lines in my etc/bashrc and indeed it solved the problem with the missing libmpc.so.2. Thank you very much for your help!
Nevertheless when compiling I still face some errors, so compilation did not succeed.
I will attach my newest output result, maybe someone of you can help...
Have a nice weekend!
Attached Files
File Type: doc makeLog.doc (20.0 KB, 16 views)
Anne Lincke is offline   Reply With Quote

Old   July 8, 2011, 06:01
Default
  #34
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 18
FelixL is on a distinguished road
I think this is a FLEX issue, your system's FLEX version may be too old. Try upgrading to at least FLEX 2.5.33 or even better 2.5.34.
You might probably be able to do a local installtion of FLEX if you haven't got root privleges.


Greetings,
Felix
FelixL is offline   Reply With Quote

Old   July 8, 2011, 07:12
Default
  #35
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Felix,
finally I installed a new flex version, flex 2.5.34.
But nevertheless still no successful compilation possible.
Thank you anyway, now I have at least a better flex version

Attached the log-File again.....
Attached Files
File Type: doc logFlexNew.doc (19.9 KB, 11 views)
Anne Lincke is offline   Reply With Quote

Old   July 8, 2011, 07:36
Default
  #36
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
We used to get problems a long time ago with flex, but I'm surprised this is popping up again.

Can you:

Code:
cd ~/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/conversion/ansysToFoam
flex++ --version
g++ --version
wclean
wmake
Post the full output of that.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   July 8, 2011, 08:25
Default
  #37
Senior Member
 
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 16
Anne Lincke is on a distinguished road
Hey Laurence,

here is the output

HTML Code:
lincke@master:~/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/conversion/ansysToFoam> flex++ --version
flex 2.5.34
lincke@master:~/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/conversion/ansysToFoam> g++ --version
g++ (OpenFOAM) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

lincke@master:~/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/conversion/ansysToFoam> wclean
lincke@master:~/OpenFOAM/OpenFOAM-2.0.x/applications/utilities/mesh/conversion/ansysToFoam> wmake | tee logwmake
Making dependency list for source file ansysToFoam.L
SOURCE=ansysToFoam.L ; flex -+ -oMake/linux64GccDPOpt/ansysToFoam.C -f $SOURCE ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/home/lincke/OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/lincke/OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude   -fPIC -c Make/linux64GccDPOpt/ansysToFoam.C -o Make/linux64GccDPOpt/ansysToFoam.o
ansysToFoam.L:83:25: Fehler: keine Elementfunktion »int yyFlexLexer::yywrap()« in Klasse »yyFlexLexer« deklariert
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »virtual int yyFlexLexer::yylex()«:
Make/linux64GccDPOpt/ansysToFoam.C:3316:57: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3316:57: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3332:3: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3508:62: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3579:19: Fehler: »yywrap« wurde in diesem Gültigkeitsbereich nicht definiert
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »int yyFlexLexer::yy_get_next_buffer()«:
Make/linux64GccDPOpt/ansysToFoam.C:3763:53: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3786:39: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3799:28: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3799:58: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3820:3: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3820:3: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3845:48: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3848:95: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3848:115: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »yy_state_type yyFlexLexer::yy_get_previous_state()«:
Make/linux64GccDPOpt/ansysToFoam.C:3876:48: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3876:48: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »void yyFlexLexer::yyunput(int, char*)«:
Make/linux64GccDPOpt/ansysToFoam.C:3936:32: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3937:32: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:3945:20: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »int yyFlexLexer::yyinput()«:
Make/linux64GccDPOpt/ansysToFoam.C:3993:20: Fehler: »yywrap« wurde in diesem Gültigkeitsbereich nicht definiert
Make/linux64GccDPOpt/ansysToFoam.C:4012:36: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)«:
Make/linux64GccDPOpt/ansysToFoam.C:4092:66: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4101:54: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)«:
Make/linux64GccDPOpt/ansysToFoam.C:4123:48: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4126:22: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4128:18: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »void yyFlexLexer::yyensure_buffer_stack()«:
Make/linux64GccDPOpt/ansysToFoam.C:4255:9: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4275:9: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Elementfunktion »void yyFlexLexer::yy_push_state(int)«:
Make/linux64GccDPOpt/ansysToFoam.C:4295:49: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4298:65: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4298:77: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Funktion »void* yyalloc(yy_size_t)«:
Make/linux64GccDPOpt/ansysToFoam.C:4377:31: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Funktion »void* yyrealloc(void*, yy_size_t)«:
Make/linux64GccDPOpt/ansysToFoam.C:4389:36: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C:4389:46: Warnung: Verwendung einer Typumwandlung im alten Stil
Make/linux64GccDPOpt/ansysToFoam.C: In Funktion »void yyfree(void*)«:
Make/linux64GccDPOpt/ansysToFoam.C:4394:17: Warnung: Verwendung einer Typumwandlung im alten Stil
make: *** [Make/linux64GccDPOpt/ansysToFoam.o] Fehler 1


Hope this helps, thank you for answering to this thread.
Anne Lincke is offline   Reply With Quote

Old   July 8, 2011, 11:11
Default
  #38
Senior Member
 
Felix L.
Join Date: Feb 2010
Location: Hamburg
Posts: 165
Rep Power: 18
FelixL is on a distinguished road
Hello, Anne,


I did a quick search and found this thread:

http://www.cfd-online.com/OpenFOAM_D...es/1/7503.html

It includes the following post:

Quote:
Ok, I get it.

I found the answer here:
http://the-free-meme.blogspot.com/20...rap-it-up.html

So, I just substituted the line:
extern "C" int yywrap()
with
int yyFlexLexer::yywrap()

in 5 files:
1. $WM_PROJECT_DIR/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
2. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam .L
3. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent MeshToFoam.L
4. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMe shToFoam.L
5. $WM_PROJECT_DIR/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L

Now, OF-1.4.1 works perfectly on Ubuntu 8.04 under a 64 bit machine.

elisabet

This is a bit old, but maybe this works for you, too.

Greetings,
Felix
FelixL is offline   Reply With Quote

Old   July 9, 2011, 06:19
Default
  #39
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 to all!

@Grzegorz:
Quote:
Originally Posted by gfilip View Post
I am trying to compile 2.0.x (from git) but seem to run into ld issues. I am using gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3, flex 2.5.35, and I have completed the steps listed at http://www.openfoam.com/download/git.php
The ld issues seem to show up when compiling applications. checkMesh works fine.
Everything is fine. Those warnings were merely instructional.


@Anne: I believe this error with ansys to foam might be a whole other problem. There was a bug report about flex a few weeks ago: http://www.openfoam.com/mantisbt/view.php?id=224
To check if you already have this fixed, run:
Code:
git log e7e5f60fcaf30cdef1a8d05c640618cee34560dd -n 1
In the mean time, I'm going to do as I said before and test building OpenFOAM 2.0.x with the custom solver just like you have done, to see if there is something missing somewhere...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 9, 2011, 10:58
Default
  #40
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
Sorry for the late response.

Anne, judging by the output it appears you already have the bugfix that Bruno mentions. Your offending line is:

ansysToFoam.L:83:25: Fehler: keine Elementfunktion »int yyFlexLexer::yywrap()« in Klasse »yyFlexLexer« deklarie

I think what Felix mentions is worth trying, although you have flex version .34 so it should be declaring int yyFlexLexer::yywrap().

Sorry I can't be of more help.


__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Critical errors during OpenFoam installation in OpenSuse 11.0 amscosta OpenFOAM 5 May 1, 2009 15:06
OpenFOAM 1.5 installation on OpenSUSE 11.0 bigphil OpenFOAM Installation 16 April 29, 2009 07:28
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


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