OpenFOAM-2.2.2 installation failed on Mavericks
1 Attachment(s)
Hi,
I tried following the steps listed on this page but got errors. I have a feeling I am missing either some needed modules or my path is wrong. I am attaching the first few occurences of the error as it keeps repeating and the size of the complete log file is 275mb. Hope some one ran into a similar issue. Any help is appreciated. - VDR |
Hi,
It seems that you have got a problem with gcc installation according to log file. Can you compile something simple with it? Something like: Code:
#include <iostream> |
Thanks a lot! I have tested the gcc installation is fine.
I would rather use clang if possible. One thing I see in your clang instructions - what is the equivalent of the gcc-mp to be used? Should I still use gcc-mp? Shouldn't there be a clang equivalent of it? I still the same errors if I use gcc-mp. -VDR |
Even when I use clang as the default compiler for all I get the same error. I just noticed that I get an additional error that it cannot find mpicc. Unfortunately mpicc is not available through macports. Is mpicc the same as clang?
Also the errors start happening when the compilation for PStream starts. Until then it goes through fine. Here is the error again - + wmakePrintBuild -check no git description found + /bin/rm -f OpenFOAM/Make/darwinIntel64ClangDPOpt/global.C + wmakeLnInclude OpenFOAM + wmakeLnInclude OSspecific/POSIX + Pstream/Allwmake + wmake libso dummy SOURCE=UPstream.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -IMYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -IMYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64ClangDPOpt/UPstream.o In file included from UPstream.C:26: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/UPstream.H:43: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/labelList.H:47: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/label.H:61: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/int.H:39: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/word.H:42: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/string.H:51: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/string:430: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:90: In file included from MYHOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/wchar.h:42: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:118:9: error: no member named 'mbstate_t' in the global namespace using ::mbstate_t; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:120:9: error: no member named 'tm' in the global namespace using ::tm; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1 |
Well,
- It should be not just clang but clang++ as you're compiling C++ code. - Why do you need gcc-mp for clang build? - To get mpicc you need MPI libraries, so you can a) use 'export WM_MPLIB=OPENMPI' in etc/bashrc and OpenMPI from ThirdParty folder will be built, b) install OpenMPI yourself and use 'export WM_MPLIB=SYSTEMOPENMPI' to use installed version. - When you install OpenMPI using Macports the name of compiler wrapper is openmpicc. IIRC in patches by Bernhard Gschaider he uses that name. About your last error: is it clean build? Or maybe you are trying to mix gcc and clang builds and it messes up include paths. |
Thanks Alexey
I am already all the things you mentioned, except one. > - It should be not just clang but clang++ as you're compiling C++ code. I meant to say the clang eco system of tools in Mavericks not clang the tool specifically. I am using clang++. > - Why do you need gcc-mp for clang build? I asked that question because I had to configure that (set an env variable) in addition to gcc with the previous instructions. > - To get mpicc you need MPI libraries, so you can a) use 'export WM_MPLIB=OPENMPI' in etc/bashrc and OpenMPI from ThirdParty folder will be built, b) install OpenMPI yourself and use 'export WM_MPLIB=SYSTEMOPENMPI' to use installed version. I already installed openmpi and have set the WM_MPLIB variable to SYSTEMOPENMPI. I see that the build is picking it up. > - When you install OpenMPI using Macports the name of compiler wrapper is openmpicc. IIRC in patches by Bernhard Gschaider he uses that name. I did not know (guess) mpicc is openmpicc. After making a symbolic link to it in the bin directory in OpenFoam it picks it up. So went past that. > About your last error: is it clean build? Or maybe you are trying to mix gcc and clang builds and it messes up include paths. I suspect this too. Can you send me the options to clang++ when you compile UPstream.C file in your environment? I can compare with the ones I am seeing and then fix the build myself. Here is what I am seeing -- SOURCE=UPstream.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison -O3 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/HOME/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude -I/HOME/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64ClangDPOpt/UPstream.o Now can you send me the command you see being run in your successful build? Thanks a lot for your help. |
Hello,
I've tried to reproduce your error so I've decided to go from the very beginning - from creation of disk image. And I was able to reproduce your compilation error Code:
In file included from /Users/alexey/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/string.H:51: And answering your question, here is the line from build log file for compilation of UPStream.C: Code:
SOURCE=UPstream.C ; clang++ -m64 -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -W |
That was it. The image I created was not case sensitive.
Sadly, I learned that I cannot follow simple instructions in English! Thanks for your help. It compiles without any issues. One thing (I think you mentioned it in your instructions) if you use homebrew you don't even need to change the etc/bashrc file. |
Quote:
|
All times are GMT -4. The time now is 17:59. |