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

OpenFOAM-1.5-dev compilation: OSspecific trouble

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2009, 10:58
Default OpenFOAM-1.5-dev compilation: OSspecific trouble
  #1
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Dear all,

I have compiled a snap shot of OpenFOAM-1.5-dev on my laptop (Fedora 10 x86_64) and it works beautifully. Now I am compiling it also on my desktop (Fedora 11 x86_64) and want to use the svn version. When I compile the svn version of dev on my desktop I get stuck at compiling OSspecific in src. Anyhting from sifFpe.o and beyond is not created. I could not find out how and why, so I copied the missing .o files from the same dir in my laptop. Not very pretty, I know, but it seems to work . I ran into the same problem in meshTools and had to copy surfaceFeatures.o there as well. After rerunning Allwmake all seems to work.

Does anyone have an idea how to fix this in a more elegant way?

Thanks in advance!

Regards,

Gijs


PS Some more info: I used my system compiler (gcc-4.4.1) and when I switch to OpenFOAM's compilers things like blockMesh stop working (problem with libstdc++.so.6)

The first error message (for OSspecific) was:

Code:
[gijsbert@mintek src]$ wmake libo OSspecific/$WM_OS
SOURCE=signals/sigFpe.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1435 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/sigFpe.o
SOURCE=signals/sigInt.C ;  g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1435 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/sigInt.o
In file included from /usr/include/stdio.h:909,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/cstdio:50,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/bits/char_traits.h:48,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/string:47,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/string.H:51,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/messageStream.H:50,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/error.H:52,
                 from signals/sigFpe.C:27:
/usr/include/bits/stdio.h: In function ‘__ssize_t getline(char**, size_t*, FILE*)’:
/usr/include/bits/stdio.h:118: error: ‘__getdelim’ was not declared in this scope
In file included from /usr/include/stdio.h:909,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/cstdio:50,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/bits/char_traits.h:48,
                 from /home/gijsbert/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.1/../../../../include/c++/4.3.1/string:47,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/string.H:51,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/messageStream.H:50,
                 from /home/gijsbert/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/error.H:52,
                 from signals/sigInt.C:27:
/usr/include/bits/stdio.h: In function ‘__ssize_t getline(char**, size_t*, FILE*)’:
/usr/include/bits/stdio.h:118: error: ‘__getdelim’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/sigFpe.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Make/linux64GccDPOpt/sigInt.o] Error 1
and the second one (with surfaceFeatures.o) was:

Code:
[gijsbert@mintek src]$ wmake libso meshTools
triSurface/surfaceFeatures/surfaceFeatures.C:770: error: conflicting declaration ‘Foam::octreeDataPoint samples’
triSurface/surfaceFeatures/surfaceFeatures.C:769: error: ‘samples’ has a previous declaration as ‘Foam::treeBoundBox samples’
triSurface/surfaceFeatures/surfaceFeatures.C: In member function ‘Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam::pointField&, const Foam::scalarField&, const Foam::scalarField&, Foam::scalar) const’:
triSurface/surfaceFeatures/surfaceFeatures.C:871: error: conflicting declaration ‘Foam::octreeDataPoint samples’
triSurface/surfaceFeatures/surfaceFeatures.C:870: error: ‘samples’ has a previous declaration as ‘Foam::treeBoundBox samples’
make: *** [Make/linux64GccDPOpt/surfaceFeatures.o] Error 1
make: *** Waiting for unfinished jobs....
gwierink is offline   Reply With Quote

Old   September 24, 2009, 09:35
Default Solved
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
Dear all,

There was some problem with gcc, because when I actually compiled gcc into ThirdParty the problem was solved. But for that I needed some flags and to install mpfr. So here is the recipe for the record.

  1. Install flex, binutils, binutils-dev, zlibs, and gmp-devel (libgmp2-dev apparently for Debian)
  2. Download gcc-4.3.1.tar.gz from here
  3. Rename the original gcc-4.3.1 in ThirdParty (you never know, perhaps you need it later) to e.g. gcc-4.3.1_old
  4. Make a new directory gcc-4.3.1 in ThirdParty
  5. Make in that new gcc-4.3.1 the directory structure platforms > linux64 (in my case, as I have a 64 bit computer)
  6. Check in line 121 of $HOME/OpenFOAM/OpenFOAM-1.5-dev/etc/settings.sh whether the path and version number for gcc are the same as you are installing now (also make sure that the compiler is the system compiler at this moment (lines 113-115))
  7. Download mpfr-2.3.0.tar.gz from here
  8. Untar mpfr-2.3.0 into ThirdParty/gcc-4.3.1/platforms/linux64/
  9. Code:
    cd $HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/mpfr-2.3.0
  10. Configure mpfr-2.3.0:
    Code:
    ./configure
  11. Make mpfr-2.3.0:
    Code:
    make
  12. Check the make:
    Code:
    make check
  13. Install mpfr (I needed to be root for this step):
    Code:
    make install
  14. Go one level up to the ThirdParty/gcc-4.3.1/platforms/linux64/ directory and configure gcc by
    Code:
    ./configure --prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --exec-prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --enable-languages=c,c++ --enable-shared --disable-multilib --with-mpfr=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/mpfr-2.3.0/
    This will solve compiling problems gmp.H and mpfr.H not being found and/or of wrong version
  15. Code:
    make bootstrap
  16. Code:
    make install
  17. Change the compiler in lines 113-115 of $HOME/OpenFOAM/OpenFOAM-1.5-dev/etc/settings.sh (back) to the OpenFOAM compiler
  18. Start compiling OpenFOAM-1.5(-dev)
gwierink 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
k Omega SST SAS for OpenFOAM 1.5??? barath.ezhilan OpenFOAM Running, Solving & CFD 3 June 2, 2010 07:41
OpenFOAM 1.5 installation on OpenSUSE 11.0 bigphil OpenFOAM Installation 16 April 29, 2009 06:28
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 04:48
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
OpenFOAM Version 1.5 Released OpenFOAM discussion board administrator OpenFOAM Announcements from ESI-OpenCFD 0 July 14, 2008 18:22


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