component/python-2.7: use slapos's gcc libraries.
-
Owner
May I ask you why ? (and please write 'why' in commit log).
- For 32-bit architecture case, please add ${gcc:location}/lib as well.
- Now rebootstrap also builds gcc...
-
Owner
I'm also curious...
-
Owner
Also why do you want to link with slapos's gcc library but not compile with slapos's gcc ?
-
Owner
Sorry, I did not explain. It is needed for tensorflow. Tensorflow uses an unique building system named bazel. Bazel is similar to our slapos buildout approach, it aims to builds everything. But so far, bazel depends on many binaries provided by linux distribution and bazel can't allow user to use local binaries(bazel can uses /usr/lib/xxx but can't use /opt/slapgrid/xxx) and it is quite hard to change this behavior. You can find many problems like this https://github.com/bazelbuild/bazel/issues/649. I tried to tell bazel to use our local gcc libraries, but I failed. Then when I used debian 7 environment to build tensorflow by slapos, I found GLIBXXX undefined reference error, because debian 7's glib was old. I did not have this error on debian 8 but by chance my webrunner was debian 7, I found this problem. And a solution I found was this change. Recently new version of bazel was release. This problem might be solved.
-
Owner
Anyway this change is not acceptable as it is. We need to find a better way.
What I can propose is modifying slapos.recipe.build so that
script
part is invoked in another process of python with modified environment variables (like LD_LIBRARY_PATH). Please check how script is called. -
Owner
It is a good idea. I will move it to bazel/buildout.cfg.
-
Owner
With buildout2, the story is not so simple.
- if you don't use slapos.recipe.rebootstrap, the upper python is used, thus 'moving such conf to bazel/buildout.cfg' will not work
- if you use slapos.recipe.rebootstrap, gcc is built twice.
So I really ask you to find a better way.
Also please never include such an influential change directly in master without review...
-
Owner
Sorry, next time I will ask review. And about solution, I will check the latest bazel and find a way to make bazel use slapos's gcc when I have time.
-
Owner
I tried to reproduce your issue on Debian 7 webrunner without touching python-2.7 but could not. Indeed,
ldd parts/bazel/bin
complains but building bazel itself succeeded. Can you please give me the detail of the issue you had ?- building bazel itself failed ?
- building tensorflow using bazel failes ?
FYI, here is the output of
ldd bazel
in my Debian 7 webrunner.$ ldd parts/bazel/bin/bazel parts/bazel/bin/bazel: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not fo und (required by parts/bazel/bin/bazel) parts/bazel/bin/bazel: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not foun ...
-
Owner
I think that building tensorflow succeeded but when imported it raised GLIBCXX error at _pywrap_tensorflow.so.
-
Owner
Then this trick should solve the issue.
-
Owner
Oh I see. I will try it when I have time. Thanks.