CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Buiding on Fedora 12 (

terrybarnaby January 12, 2010 05:30

Buiding on Fedora 12
OpenFOAM from git does not build on Fedora 12 at the moment. The core issue appears to be a problem with using cpp to process the Make/options files. The cpp used in F12 "cpp-4.4.2-20.fc12.i686" strips out the backslashes at the end of lines but leaves the newline character intact.
I'm not sure if this is a bug or feature in cpp. However, what part of cpp's processing is actually needed when generating the build options file from Make/options, would
a simple cp do ?

philippose January 12, 2010 05:52

Hello Terry,

A Good Morning to you!

The issue you are referring to has been delat with in the following thread:

I am also not yet sure whether it is a bug or a feature of the new C Pre-Processor (cpp) which comes with GCC-4.4.2

Anyway, the command line option "-P" as specified in the link above fixes the issue....

Hope this helps...!

Have a nice day :-)!


l_r_mcglashan January 12, 2010 06:05

I had that problem too, my fudge was to use an older version of cpp, but this is much better. The manual for cpp says that -P;

"Inhibits generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers."

Thing I find curious is that this problem only appears in Fedora 12. In your other thread you say that the Red Hat forums show complaints about this problem, but remember that Fedora is a test-bed for Red Hat.

Anyway, good work! Might be a good idea to put it up on the wiki.

terrybarnaby January 12, 2010 06:44

Thanks for the info.
Yes, adding the "-P" option worked for me :)

I have mentioned the issue in the Fedora forums. Maybe that will get back to the CPP developers eventually if it is a bug.

terrybarnaby January 12, 2010 06:54

I just had this reply in the Fedora forums from Jakub Jelinek:

Yes, the tokens are separated by whitespace, so it is sufficient if they are
again separated by whitespace after preprocessing. See for details why this changed, in short
without the change the tokens have incorrect location and cause unintended
differences in debug info between direct compilation and compilation where
preprocessing happens separately from compilation.
You can use cpp -P to avoid this (then the output won't be cluttered with
# <line> <filename>

So it looks like this is now a bug in OpenFOAM...
I will add it to the OpenFOAM Bugs entry.

NickG February 19, 2010 08:04

I'm having this problem trying to compile the TurboMachinery SIG rotorStatorInterfaces:
linux64GccDPOpt/options:12: *** missing separator. Stop.

The options file is:

-I$(LIB_SRC)/OpenFOAM/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I./ \

-ldynamicMesh \
-lfiniteVolume \

so there are no hashes for it to ignore. Have tried the two suggested methods but no joy.

Any suggestions anyone?


NickG February 19, 2010 08:05

I'm using 64 bit Ubuntu

l_r_mcglashan February 19, 2010 08:08

You're missing a backslash after:


NickG February 23, 2010 08:26

Thanks, I'll try that

All times are GMT -4. The time now is 03:26.