CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Help needed: building 1.5.x on Lucid (

sripplinger June 9, 2010 18:58

Help needed: building 1.5.x on Lucid
I have been writing a code extension for my thesis using OpenFOAM 1.5.x. With a recent OS upgrade (to Kubuntu 10.04) I am no longer able to compile my code. I have tried recompiling OF 1.5.x and have not been successful. I have been able to successfully compile 1.6.x using the great scripts provided by members of the community here, but unfortunately my solver does not appear to be compatible with the latest version of OF.

I have uploaded a make log of my attempted 1.5.x build at I would very much like to get this installed again so I can get this troublesome thesis wrapped up. Any help and insights are greatly appreciated.

wyldckat June 10, 2010 15:10

Greetings Scott,

I was stumped at first too, but I managed to isolate the problem: somewhere in time, the people responsible for the libc6 libraries seem to have made an option to add a new type of definition "__USE_XOPEN2K8" and getdelim got under that very same definition, instead of "__USE_GNU".

So, the fix, which will at least allow building OpenFOAM 1.5 and 1.5.x is this:
  1. Go to the folder "$WM_PROJECT_DIR/wmake/rules/$WM_ARCH$WM_COMPILER"
  2. Edit the files "c" and "c++" and at the end of the line that starts with "cFLAGS" or "c++FLAGS", add " -D__USE_XOPEN2K8", without the quotes and don't forget the space. In other words, it should look something like this in the file "c++":

    c++FLAGS    = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -pthread -D__USE_XOPEN2K8
    And in "c":

It should now build everything properly... although I haven't thoroughly tested it :( And even if it builds, it might not work afterwards, although I think it should!

Best regards,

sripplinger June 10, 2010 19:37

I am glad there are people in this world with eyes keen enough to catch something like that. I am currently compiling and things appear to be going well. I'll report back after it is done and I have had a chance to try compiling my code and running it.

sripplinger June 10, 2010 22:01

Well, it looks like things are working. The compile of the complete 1.5.x package had some errors, but it was only a few and hopefully with packages I don't need. It kind of looks like it doesn't like my installation of Qt (version 4.6.2). My custom code was able to compile, though. So it's back to just debugging that. Thanks for your help! Hopefully I won't be back too soon ;)

All times are GMT -4. The time now is 13:25.