Hello!
I followed the OSX compilation instructions (wget + python3 install.py), and it fails like this:
-- Build files have been written to: /Applications/_Sci/taichi/build
Scanning dependencies of target taichi_core
[ 1%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/mcmcups.cpp.o
[ 2%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/sppm.cpp.o
[ 4%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/vcm.cpp.o
[ 4%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/mlt.cpp.o
[ 5%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/pt.cpp.o
[ 6%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/lt.cpp.o
[ 8%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/bdpt.cpp.o
[ 8%] Building CXX object CMakeFiles/taichi_core.dir/src/renderer/bidirectional_renderer.cpp.o
Running cmake...
Building taichi...
Error: Build failed.
* Taichi Installer
('64bit', '')
Build type = default
pip3 installation detected
importing numpy test:
ret: CompletedProcess(args=['/Users/roberto/anaconda3/bin/python3', '-c', 'import numpy as np'], returncode=0)
Executing command: cmake --version
Current directory: /Applications/_Sci
Cloning taichi from github...
Executing command: git clone https://github.com/yuanming-hu/taichi.git
Fetching taichi runtimes...
Executing command: git clone https://github.com/yuanming-hu/taichi_runtime external/lib -b osx --depth 1
Executing command: git submodule update --init --recursive
Executing command: echo "export TAICHI_NUM_THREADS=8" >> ~/.bashrc
Executing command: echo "export TAICHI_REPO_DIR=/Applications/_Sci/taichi" >> ~/.bashrc
Executing command: echo "export PYTHONPATH=$TAICHI_REPO_DIR/python/:$PYTHONPATH" >> ~/.bashrc
Executing command: echo "export PATH=$TAICHI_REPO_DIR/bin/:$PATH" >> ~/.bashrc
PYTHONPATH=/Applications/_Sci/taichi/python/:
Executing command: echo $PYTHONPATH
Error: installation failed.
Any idea? Thanks in advance!
(a more complete error log is attached)
I tried again in a clean mac. I freshly installed the xcode CLI tools, anaconda with python 3.7, brew, wget and cmake. Now the compilation goes up to 100%, but fails nevertheless. This is the end of the log:
[100%] Built target taichi_core
[T 02/25/19 16:29:04.932] [logging.cpp:Logger@67] Taichi core started. Thread ID = 13257
[E 02/25/19 16:29:04.932] Received signal 11 (Segmentation fault: 11)
* Taichi Core - Stack Traceback *
==========================================================================================
| Module | Offset | Function |
|----------------------------------------------------------------------------------------|
* python3 | 418 | (null) |
... many lines removed ...
* taichi_core.so | 297 | taichi::signal_handler(int) |
==========================================================================================
Error: installation failed.
Here's the complete error log: taichi.log
I was checking the Mac configuration in Travis CI, but I can't figure out what to change.
But maybe Travis CI could be used to produce a binary distribution? This url shows how to do it: https://docs.travis-ci.com/user/deployment/releases/
I join the MacOS crowd, I have the same issue as @r03ert0, macos 10.14.4, anaconda, python3.7, builds fine, but then crashes with the Segmentation fault.
It seems that there is some problem with Anaconda python, which is weird. I tried building with python 3.7 from Homebrew and now I am able to import taichi without the segfault. However, another exception occurs when I try to run any example (for instance simulation/3d/mgpcg_smoke_3d.py).
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
For complete log see the attached file taichi_crash.txt. Any help is much appreciated!
P.S. I tried also on Windows, and everything seems to be working there (there was just hardcoded version 3.6 of python library in CMake files, which I needed to change).
I encount similar problem as @brejchajan on OSX.
Could someone successfully run examples give the available versions of c++ compiler and python?
I kind of get lucky on the same problem described above.
In the first place, I am also trapped by the Anaconda python, then I change to brew-installed python. i.e. brew install python@3. On my mac, the path is something like /usr/local/Cellar/python/3.7.3/bin/python3.7.
And also, I use the gcc-9 and it works fine (I haven't tried clang though)
Warning: The issue has been out-of-update for 50 days, marking stale.
Most helpful comment
It seems that there is some problem with Anaconda python, which is weird. I tried building with python 3.7 from Homebrew and now I am able to import taichi without the segfault. However, another exception occurs when I try to run any example (for instance simulation/3d/mgpcg_smoke_3d.py).
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'For complete log see the attached file taichi_crash.txt. Any help is much appreciated!
P.S. I tried also on Windows, and everything seems to be working there (there was just hardcoded version 3.6 of python library in CMake files, which I needed to change).