Topic: Compiler problem - MacOSX
I am trying to compile oofem on my MacBook using from git repository, but I am running into trouble because the standar compiler on mac OS is Clang. I used the following options:
cmake -DCMAKE_CXX_FLAGS="-g -Wall -DDEBUG" ~/oofem.git/ [which works like a charm in Linux]
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" ~/oofem.git/ [workaround to enable c++ compiling features - as per a quick google search]
I also tried to modify the compiler flags in the original cmake.txt file, but it did not work either. In any case, I get the following output:
Wilsons-MacBook-Pro-2:default wilsondasilva$ cmake -DCMAKE_CXX_FLAGS="-g -Wall -DDEBUG" ~/oofem.git/
-- The CXX compiler identification is Clang 6.0.0
-- The C compiler identification is Clang 6.0.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found PythonInterp: /usr/local/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - found
-- Looking for access
-- Looking for access - found
-- Looking for cbrt
-- Looking for cbrt - found
-- Looking for isnan
-- Looking for isnan - not found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/wilsondasilva/oofem.git/default
Next, when I try to run "make", I get the following message:
Wilsons-MacBook-Pro-2:debug wilsondasilva$ make
Scanning dependencies of target fm
[ 0%] Building CXX object src/fm/CMakeFiles/fm.dir/fluidmodel.C.o
In file included from /Users/wilsondasilva/oofem.git/src/fm/fluidmodel.C:36:
/Users/wilsondasilva/oofem.git/src/oofemlib/element.h:1042:31: error: cannot
use incomplete type 'oofem::IntegrationRule' as a range
for ( GaussPoint *gp: *ir ) {
^
/Users/wilsondasilva/oofem.git/src/oofemlib/element.h:74:7: note: forward
declaration of 'oofem::IntegrationRule'
class IntegrationRule;
^
/Users/wilsondasilva/oofem.git/src/oofemlib/element.h:1052:31: error: cannot
use incomplete type 'oofem::IntegrationRule' as a range
for ( GaussPoint *gp: *ir ) {
^
/Users/wilsondasilva/oofem.git/src/oofemlib/element.h:74:7: note: forward
declaration of 'oofem::IntegrationRule'
class IntegrationRule;
^
2 errors generated.
make[2]: *** [src/fm/CMakeFiles/fm.dir/fluidmodel.C.o] Error 1
make[1]: *** [src/fm/CMakeFiles/fm.dir/all] Error 2
make: *** [all] Error 2
Is there anybody who managed to compile oofem from git using mac os. The version available in the website (oofem2.3.zip) works pretty well on my mac, but the git version (which is updated) does not. Please advise.