Skip to content
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

Merged
merged 37 commits into from
Jul 10, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = repeat #1343

[Click here for the format server]


@archibate archibate requested review from zhai-xiao and k-ye July 4, 2020 18:24
Copy link
Collaborator

@rexwangcc rexwangcc left a 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!

@@ -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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 Show resolved Hide resolved
docs/dev_install.rst Outdated Show resolved Hide resolved
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``.
Copy link
Collaborator

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?

Copy link
Collaborator Author

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])
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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)

@archibate archibate self-assigned this Jul 5, 2020
docs/dev_install.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@Eydcao Eydcao left a 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.

archibate and others added 4 commits July 5, 2020 13:10
Co-authored-by: Chengchen(Rex) Wang <14366016+rexwangcc@users.noreply.github.com>
Co-authored-by: Yadi Cao <elliott.yd.cao@outlook.com>
@archibate
Copy link
Collaborator Author

@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?

@archibate archibate requested a review from rexwangcc July 5, 2020 06:10
Copy link
Contributor

@zhai-xiao zhai-xiao left a 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])
Copy link
Collaborator

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)

python/taichi/core/util.py Outdated Show resolved Hide resolved
Co-authored-by: Chengchen(Rex) Wang <14366016+rexwangcc@users.noreply.github.com>
@archibate
Copy link
Collaborator Author

@yuanming-hu Hello? Could you take a look? I deleted part of LLVM 8 installation doc, hope this work.

Copy link
Member

@yuanming-hu yuanming-hu left a 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.

docs/dev_install.rst Outdated Show resolved Hide resolved
docs/dev_install.rst Outdated Show resolved Hide resolved
python/taichi/core/util.py Outdated Show resolved Hide resolved
docs/dev_install.rst Outdated Show resolved Hide resolved
archibate and others added 3 commits July 10, 2020 11:33
Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
@archibate archibate merged commit 02d89dc into master Jul 10, 2020
@FantasyVR FantasyVR mentioned this pull request Jul 11, 2020
@k-ye k-ye deleted the dev-install-doc-improvements branch March 17, 2021 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation related issues & PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants