https://www.freecadweb.org/wiki/CompileOnMac
(to the letter I hope) below is what failed.
This is on macOS HighSierra, below is what gcc (clang really, I guess) shows for version:
Code: Select all
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I guess this has something do with wrong Python version or something but if there is one thing
I dislike more than sorting out C toolchain it is sorting out Python toolchain so help would be greatly
appreciated.
Code: Select all
[ 11%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/PreCompiled.cpp.o
[ 11%] Linking CXX shared library ../../lib/libFreeCADApp.dylib
[ 11%] Built target FreeCADApp
Scanning dependencies of target FreeCADMainPy
[ 11%] Building CXX object src/Main/CMakeFiles/FreeCADMainPy.dir/MainPy.cpp.o
In file included from /Users/nyholku/FreeCAD/FreeCAD-git/src/Main/MainPy.cpp:48:
In file included from /Users/nyholku/FreeCAD/FreeCAD-git/src/Base/Exception.h:33:
In file included from /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:88:
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:534:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register PyObject *obj, /* Object */
^~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:553:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register PyObject *obj /* Object */
^~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:575:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register const wchar_t *w, /* wchar_t buffer */
^~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:593:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register wchar_t *w, /* wchar_t buffer */
^~~~~~~~~
In file included from /Users/nyholku/FreeCAD/FreeCAD-git/src/Main/MainPy.cpp:48:
In file included from /Users/nyholku/FreeCAD/FreeCAD-git/src/Base/Exception.h:33:
In file included from /usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:97:
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:173:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register PyObject *obj, /* string or Unicode object */
^~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:174:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register char **s, /* pointer to buffer variable */
^~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:175:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
register Py_ssize_t *len /* pointer to length variable or NULL
^~~~~~~~~
/Users/nyholku/FreeCAD/FreeCAD-git/src/Main/MainPy.cpp:158:17: error: no matching function for call to 'PyString_AsStringAndSize'
PyString_AsStringAndSize(pyPath, &basePath, &sz);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:172:17: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
PyAPI_FUNC(int) PyString_AsStringAndSize(
^
/Users/nyholku/FreeCAD/FreeCAD-git/src/Main/MainPy.cpp:163:17: error: no matching function for call to 'PyString_AsStringAndSize'
PyString_AsStringAndSize(fromUnicode, &basePath, &sz);
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7/stringobject.h:172:17: note: candidate function not viable: no known conversion from 'const char **' to 'char **' for 2nd argument
PyAPI_FUNC(int) PyString_AsStringAndSize(
^
7 warnings and 2 errors generated.
make[2]: *** [src/Main/CMakeFiles/FreeCADMainPy.dir/MainPy.cpp.o] Error 1
make[1]: *** [src/Main/CMakeFiles/FreeCADMainPy.dir/all] Error 2
make: *** [all] Error 2
MacBook-Pro:build nyholku$