CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PROBLEMS WITH THE COMPILATION

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2007, 12:29
Default hi, I am trying to get the
  #1
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 17
oscar_j is on a distinguished road
hi,

I am trying to get the compilation of the laplacianFoam solver with wmake. But some errors happens.

I type within $FOAM_APP/solvers/basic/laplacianFoam directory (OpenFOAM-1.4) simply 'wmake' but I have error messages like these:

/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3916: error: variable or field '_M_initialize_moneypunct' declared void
/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3916: error: 'int std::moneypunct<wchar_t,>::_M_initialize_moneypunc t' is not a static member of 'class std::moneypunct<wchar_t,>'
/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3916: error: '__c_locale' was not declared in this scope
/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3917: error: expected primary-expression before 'const'
/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3917: error: initializer expression list treated as compound expression
/home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../. ./../../include/c++/4.1.2/bits/locale_facets.h:3921: error: variable or field '_M_initialize_moneypunct' declared void


What's my mistake?

Thanks!
Oscar
oscar_j is offline   Reply With Quote

Old   July 11, 2007, 13:26
Default Hi! This is only a guess: i
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

This is only a guess: it looks like the compiler uses headers that he is not supposed to (for instance your sytem-g++ tries to use the OpenFOAM-g++-headers (but for some reason the OpenFOAM-g++ is not used))

Take the following steps:
- Check which g++ you are using: 'which g++'
- If it is not the OpenFOAM-g++ check the version with 'g++ -v'
- Try to compile and execute a small helloWorld.C (you'll have to write one yourself) to check whether your compiler is working

Bernhard

PS: is this the first time you're trying to compile any OF-stuff on that machine?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 11, 2007, 14:59
Default Hi Bernhard, I have the fol
  #3
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 17
oscar_j is on a distinguished road
Hi Bernhard,

I have the following messages:

1. 'which g++'

-> /home/oscar/OpenFOAM/linux/gcc-4.1.2/bin/g++

2. 'g++ -v'

-> Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr/tmp/gcc-4.1.2 --exec-prefix=/usr/tmp/gcc-4.1.2 --enable-languages=c,c++ --enable-shared --enable-__cxa_atexit --disable-checking
Thread model: posix
gcc version 4.1.2

3. With the compilation of 'HelloWorld.C' appears (gcc HelloWorld.C):

helloworld.C:1:19: error with stdio.h
helloworld.C:6:2: warning: no newline at end of file
helloworld.C: In function 'int main()':
helloworld.C:4: error: 'printf' was not declared in this scope

You're right, the compiler isn't working.

What can I do to fix this problem?

Thanks!
Oscar
oscar_j is offline   Reply With Quote

Old   July 12, 2007, 10:48
Default Nope. You tried a C-HelloWorld
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Nope. You tried a C-HelloWorld. Try a C++-HelloWorld.
(although it looks like he doesn'T find standard-Headers. Check whether there are any under /home/oscar/OpenFOAM/linux/gcc-4.1.2/include (especially look for c++/4.1.2/bits/locale_facets.h)

My guess: Something went wrong while unpacking the downloaded tar (not all the files reached the disk).
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 14, 2007, 16:53
Default hi, I reviewed the archives
  #5
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 17
oscar_j is on a distinguished road
hi,

I reviewed the archives of OpenFOAM installation in linux directory (gcc-4.1.2-, j2sdkl-1.4.2_05 and paraview-2.4.4), and they're all ok.

About my compiler error messages I guess that are produce because the compiler installation in WM_PROJECT_INST_DIR/$WM_ARCH/gcc-3.4.? and enviroment variable in the $WM_PROJECT_DIR/.bashrc aren't correctly configured.

I hope to fix it, I'd appreciate any suggestion .

Thank you very much for your help.
Oscar
oscar_j is offline   Reply With Quote

Old   July 14, 2007, 16:57
Default hi, I forgot it, this is t
  #6
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 17
oscar_j is on a distinguished road
hi,

I forgot it, this is the first time trying to compile any OpenFoam solver on my machine.

Thanks!
Oscar
oscar_j is offline   Reply With Quote

Old   July 18, 2007, 22:41
Default hi, I could fix the errors.
  #7
New Member
 
Oscar G
Join Date: Mar 2009
Location: Bogotá, Bogotá, Colombia
Posts: 27
Rep Power: 17
oscar_j is on a distinguished road
hi,

I could fix the errors. Thank you very much.
The information about it in this link:
> http://www.cfd-online.com/cgi-bin/Op...cus/discus.cgi

Thanks!
Oscar
oscar_j 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
Problems in personal library compilation shrina OpenFOAM 3 February 23, 2009 12:12
UDF COMPILATION... venkatesh4386@gmail.com FLOW-3D 0 November 8, 2008 12:22
UDF compilation problems MateuszZb FLUENT 4 October 20, 2008 03:46
Compilation problems and file locations Joel Siemens 3 February 11, 2003 13:42
udf compilation jy FLUENT 0 August 10, 2000 10:39


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