I tried to build from source with mac OS 10.13 and it didn't work. I got the following error:
/Users/zaccharieramzi/workspace/coremltools/coremlpython/CoreMLPythonUtils.mm:515:14: error: use of
undeclared identifier 'MLFeatureTypeSequence'
case MLFeatureTypeSequence:
^
9 warnings and 1 error generated.
make[2]: *** [CMakeFiles/coremlpython.dir/coremlpython/CoreMLPythonUtils.mm.o] Error 1
make[1]: *** [CMakeFiles/coremlpython.dir/all] Error 2
make: *** [all] Error 2
So at first I thought it was related to #262 , but I updated Xcode and nothing changed. But then, one of my colleagues managed to do it on mac OS 10.14. Turns out the identifier MLFeatureTypeSequence appeared only in version 10.14, which would mean that build is not available for versions under 10.14. It should either be in the documentation or it should be fixed.
I'm building in 10.14 and experiencing the same error. I ended up modifying CoreMLPythonUtils.mm:
In function py::object Utils::convertValueToPython(MLFeatureValue *value) add a MLFeatureTypeSequence definition of 7.
#define MLFeatureTypeSequence 7
py::object Utils::convertValueToPython(MLFeatureValue *value) {
// ... method content as is...
}
#undef MLFeatureTypeSequence
Had you tried updating xcode before modifying the file manually ?
Already on latest Xcode, Version 10.1 (10B61)
On 27 Dec 2018, at 16:15 , Zaccharie Ramzi notifications@github.com wrote:
Had you tried updating xcode before modifying the file manually ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/apple/coremltools/issues/295#issuecomment-450111109, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKv0boQMRwgjhhUR_4zFQN_oLS20SWcks5u9I_FgaJpZM4Yskbu.
Same error on 10.14 with latest XCode. @adib 's fix seems to take care of it.
Works fine on MacOs 10.14.3
commit a00ff018ed21bfb9e1aa2cb58a5c9c5ec1a8d68a (HEAD -> master, origin/master, origin/HEAD)
Merge: e9e62cf b2ebbf8
Author: Aseem Wadhwa <[email protected]>
Date: Wed Mar 27 12:31:33 2019 -0700
python3 -m virtualenv coremltools_env
source coremltools_env/bin/activate
git clone [email protected]:apple/coremltools.git
pip install tensorflow==1.12.0
cd coremltools
cmake .
make
python setup.py install
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.3)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Most helpful comment
I'm building in 10.14 and experiencing the same error. I ended up modifying
CoreMLPythonUtils.mm:In function
py::object Utils::convertValueToPython(MLFeatureValue *value)add aMLFeatureTypeSequencedefinition of7.