CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Compiling an application with OpenFOAM-1.6-ext ubuntu binaries (https://www.cfd-online.com/Forums/openfoam-solving/89105-compiling-application-openfoam-1-6-ext-ubuntu-binaries.html)

ZKM June 4, 2011 13:50

Compiling an application with OpenFOAM-1.6-ext ubuntu binaries
 
I use openFoam-1.6-ext on ubuntu. I installed it using binaries and development packages from the repository. I am trying to compile a new application and I get this error:
Code:

/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/label.H:39:19: error: climits: No such file or directory
/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/label.H:40:19: error: cstdlib: No such file or directory
In file included from /usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/label.H:130,
                from /usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/labelList.H:36,
                from /usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/Pstream.H:44,
                from /usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/OPstream.H:36,
                from /usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/parRun.H:36,
                from /usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/fvCFD.H:4,

I think I have all required packages installed and my /usr/include/c++/4.4 contains both climits and cstdlib. What is missing here?

Thanks in advance

ZKM June 5, 2011 22:28

Hello,

OK. I solved this problem by explicitly pointing gcc to /usr/include/c++/4.4 using -I. It seems that my system cannot locate this default path.

Now I receive this error:
Code:

cc1: error: unrecognised debug output level "nu"
make: *** [Make/linux64GccDPOpt/xFoam.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: error: unrecognised debug output level "nu"
make: *** [Make/linux64GccDPOpt/tractionDisplacementFvPatchVectorField.o] Error 1

Any Ideas?

ZKM June 6, 2011 12:33

The error is solved by a soft link trick to the required include. Now I pass that part but I get this typical error:

Code:

/usr/include/c++/4.4/cstddef:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstddef:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
.
.
.
/usr/include/c++/4.4/cstdlib:102: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstdlib:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstdlib:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstdlib:106: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstdlib:107: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
/usr/include/c++/4.4/cstdlib:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
...

Thoughts?

ZKM June 6, 2011 13:08

Solved
 
Caused by a stupid mistake. I used .c instead of .C as the extension of my main file.
I leave this note here for future reference of others and myself :)

Good luck
ZKM

sita March 24, 2014 06:05

Hi ZKM,

Sorry, you posted this already some years ago, but what did you mean by "a soft link trick to the required include"?
I have a similar problem when trying to compile an application with wmake: gcc can't find stuff, because for some reason, on my system it's not located in the default search path. I tried to point gcc to the correct path by adding "-I <correct-path>" to Make/options. This seems to work, but it gives me (nearly) exactly the same error you got:

cc1plus: error: unrecognised debug output level "nu"

So I'm really curious to know how you solved this, can you explain?

Thanks in advance,
Sita


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