-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] Improve the developer installation documentation #1388
Conversation
Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the docs! I left some comments but LGTM in general!
docs/dev_install.rst
Outdated
@@ -19,18 +19,22 @@ Installing Dependencies | |||
|
|||
.. code-block:: bash | |||
|
|||
python3 -m pip install --user setuptools astpretty astor pybind11 Pillow dill | |||
python3 -m pip install --user setuptools wheel astor pybind11 Pillow dill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for a sanity check, so we don't need astpretty
anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I uninstalled astpretty and found everything working well, but wheel
is necessary but not included here.
docs/dev_install.rst
Outdated
Make sure you add the ``bin`` folder containing ``clang.exe`` to the ``PATH`` environment variable. | ||
|
||
* On OS X: you don't need to do anything. | ||
|
||
* On Ubuntu, execute ``sudo apt install libtinfo-dev clang-8``. | ||
* On Ubuntu, execute ``sudo apt install clang-8``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought libtinfo-dev
is still needed on Ubuntu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may move it to another section, this section is for clang, also other Linux dist do need this stupid lib too. In fact, I found my dev install don't need this at all... @yuanming-hu Is our Linux buildbot running on Ubuntu-16.04 that caused this issue? ldd
shows that my dev build use libncursesw.so.6
instead of libtinfo.so.5
.
130 root@archlinux ~/taichi (git)-[ti-init-toggle-advanced-optimization] # ldd build/libtaichi_core.so :(
linux-vdso.so.1 (0x00007ffec11ec000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fea2b633000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fea2b456000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fea2b315000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007fea2b30a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fea2b1c5000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fea2b1ab000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fea2b1a3000)
libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fea2b132000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fea2af6b000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007fea2efae000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fea2af51000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fea2af27000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fea2af22000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fea2af18000)
root@archlinux ~/taichi (git)-[ti-init-toggle-advanced-optimization] # ldd /usr/lib/python3.8/site-packages/taichi/lib/libtaichi_core.so
linux-vdso.so.1 (0x00007ffea8717000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fde51926000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fde51749000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fde51608000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007fde515fd000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fde514b8000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fde5149e000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fde51496000)
libtinfo.so.5 => /usr/lib/libtinfo.so.5 (0x00007fde51432000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fde5126b000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007fde55313000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fde51251000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fde51227000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fde51222000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fde51218000)
@@ -56,10 +56,9 @@ def import_ti_core(tmp_dir=None): | |||
def locale_encode(s): | |||
try: | |||
import locale | |||
encoding = locale.getdefaultlocale()[1] | |||
return s.encode(locale.getdefaultlocale()[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI in some rare Linux setups, such as the Ubuntu docker base image, locale.getdefaultlocale()[1]
will return None
thus s.encode
will fail, which is why:
https://github.com/taichi-dev/taichi/pull/1385/files#diff-3254677a7917c6c01f55212f86c57fbfR57
is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so I changed this to make LANG=C
work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Would be even more clear to catch the specific error (TypeError)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great! I left a tiny comment.
Co-authored-by: Chengchen(Rex) Wang <14366016+rexwangcc@users.noreply.github.com> Co-authored-by: Yadi Cao <elliott.yd.cao@outlook.com>
@yuanming-hu I partially removed LLVM 8 from installation doc (at least make LLVM 10 to be the major one), which you said to be out-of-support very soon, am I doing correct? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -56,10 +56,9 @@ def import_ti_core(tmp_dir=None): | |||
def locale_encode(s): | |||
try: | |||
import locale | |||
encoding = locale.getdefaultlocale()[1] | |||
return s.encode(locale.getdefaultlocale()[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Would be even more clear to catch the specific error (TypeError)
Co-authored-by: Chengchen(Rex) Wang <14366016+rexwangcc@users.noreply.github.com>
@yuanming-hu Hello? Could you take a look? I deleted part of LLVM 8 installation doc, hope this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! Looks great. I think we should drop LLVM 8.0.1 in this PR. Feel free to merge after the comments are addressed. Sorry about my delayed reply.
Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
…chi-dev/taichi into dev-install-doc-improvements
Related issue = repeat #1343
[Click here for the format server]