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 2.0.0 installation (https://www.cfd-online.com/Forums/openfoam-installation/89657-openfoam-2-0-0-installation.html)

Anne Lincke June 28, 2011 03:16

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]

wyldckat June 28, 2011 18:31

Hi Anne,

:eek: This is getting weirder and weirder...
Quote:

Originally Posted by Anne Lincke (Post 313837)
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

Anne Lincke June 29, 2011 08:07

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.

wyldckat June 29, 2011 16:53

Hi Anne,

Quote:

Originally Posted by Anne Lincke (Post 314045)
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 (Post 314045)
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

Linse June 30, 2011 04:55

Installation on SLC 5.6 ( = Scientific Linux 5.6)
 
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.

wyldckat June 30, 2011 05:10

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 :D. On an i7 920, it takes me about 30min to build OpenFAM + OpenMPI :cool:

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

Best regards,
Bruno

Anne Lincke July 5, 2011 06:18

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?

JNSN July 6, 2011 08:04

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

wyldckat July 6, 2011 19:18

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

Anne Lincke July 7, 2011 03:00

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.

JNSN July 7, 2011 03:28

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

gfilip July 7, 2011 11:38

1 Attachment(s)
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

Anne Lincke July 8, 2011 04:34

1 Attachment(s)
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!

FelixL July 8, 2011 05:01

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

Anne Lincke July 8, 2011 06:12

1 Attachment(s)
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.....

l_r_mcglashan July 8, 2011 06:36

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.

Anne Lincke July 8, 2011 07:25

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.

FelixL July 8, 2011 10:11

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

wyldckat July 9, 2011 05:19

Greetings to all!

@Grzegorz:
Quote:

Originally Posted by gfilip (Post 315198)
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

l_r_mcglashan July 9, 2011 09:58

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.




All times are GMT -4. The time now is 00:23.