FFC fails to build on OS X

Issue #98 resolved
Johannes Ring created an issue

After f974be3 the following error appears when installing FFC on OS X:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Iufc -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ufc/ufc_wrap.cpp -o build/temp.macosx-10.11-intel-2.7/ufc/ufc_wrap.o -std=c++11
In file included from ufc/ufc_wrap.cpp:3168:
In file included from ufc/ufc.h:18:
ufc/ufc_geometry.h:1080:32: warning: implicit conversion loses integer precision: 'std::size_t' (aka 'unsigned long') to 'const unsigned int' [-Wshorten-64-to-32]
  const unsigned int vertex0 = facet;
                     ~~~~~~~   ^~~~~
ufc/ufc_wrap.cpp:4607:15: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
  std::string result;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
ufc/ufc_wrap.cpp:4626:49: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
  result = ((ufc::finite_element const *)arg1)->family();
                                                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
1 warning and 2 errors generated.
error: command 'cc' failed with exit status 1

The error was first reported on the fenics-support mailing list (link).

Comments (10)

  1. Anders Logg (Chalmers)

    I'm getting a similar error on OS X. Is anyone else able to build FFC on OS X? Can we revert until it gets fixed?

    The error I get is the following:

    ufc/ufc_wrap.cpp:4529:15: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>,
      std::__1::allocator<char> >'
    std::string result;
    
  2. Martin Sandve Alnæs

    Reverting is not a good idea, it's tied to changes in dolfin among other things. Easier to find a fix than reverting at this point. I don't quite understand what the problem is?

  3. Log in to comment