-
Notifications
You must be signed in to change notification settings - Fork 704
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
{lang}[GCCcore/6.4.0] Python v2.7.13 #4962
{lang}[GCCcore/6.4.0] Python v2.7.13 #4962
Conversation
was #PR 4914 |
PR #4914 |
Travis liked this one... #4914 closed |
Test report by @verdurin |
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.
Looks good
Merging, thanks @JackPerdue |
preconfigopts = """ | ||
sed -e\ | ||
's:$(LINKCC) $(LDFLAGS) $(LINKFORSHARED):$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -Wl,-rpath=%(installdir)s/lib:'\ | ||
-i.eb Makefile.pre.in |
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.
Bleh, not too happy with this part...
At the very list, this should be done properly via an rpath
toolchain option, and it should be clearly explained why the RPATH is really needed.
This is just another sign that using a bare Python as a build dep later to be replaced by a 'full' Python installation higher up the hierarchy is a bad idea imho...
Thoughts @damianam?
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.
To be honest, I am not sure why is this even needed. Why can't this be used without rpathing?
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.
@boegel well, AFAIK, there is no way to tell Travis to use --expirmental. Why should I be FORCED to make three different versions (iomkl/intel/foss) for a module when the GCCcore one will suffice as a builddep that can be used with any of those later?
@damianam because pythonpackage.py doesn't set LD_LIBRARY_PATH that includes builddeps when it does a "python -c 'import 'foo'" check.. So the check fails because python can't find libpythonX.Y.so. The alternative is disable that check in everything that uses Python-bare, which seems much worse than any concern expressed thus far.
Y'all could fix this by updating pythonpackage.py to set the LD_LIBRARY_PATH for the Python-bare that was used as a builddep. Not sure if that's the best solution. I just know this one works).
Like I said, I have some 50+ modules using Python bare. I"ve spent a lot of time working through the issues. Multiply that by 2 versions of Python. Y'all are basically saying I should have to multiply that by 3 (iomkl/intel/foss). So I end up with 300 modules when 100 would have sufficed. That's just a waste of time and space.
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.
In our setup, we have Python in GCCcore
and a bunch of packages on top. On that sense, it is similar to what you say. Some, like numpy
, scipy
, etc are in the appropriate toolchain (top level with math libraries), which needed to rebuild the interpreter to get fast exponential and trigonometric functions. Others like mpi4py
, were simply built on top of the python in GCCcore
. In the latter case, I haven't run into the issues you described. The only difference I see is that I've listed Python in dependencies
, and not builddependencies
. In cases were python is just used for building, without any particular package, we simply rely on the system python. I guess that explains why that hasn't been a problem for us. In our case the setup you are proposing (python-bare for builddependencies
of some packages) is not really necessary.
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.
Certainly you have to step up to a MPI toolchain if you need MPI or a toolchain with math for numpy/scipy. eg we have these
Boost-1.61.0-gompi-2017A-Python-2.7.12-bare.eb
Boost-1.61.0-iimpi-2017A-Python-2.7.12-bare.eb
Boost-1.61.0-iimpi-2017A-Python-3.5.2-bare.eb
Boost-1.61.0-iompi-2017A-Python-2.7.12-bare.eb
Boost-1.61.0-iompi-2017A-Python-3.5.2-bare.eb
because Boost needs MPI for some parts.
How does a system Python (e.g. 2.6.6 on RHEL6) provide you with usuable packages for 2.7.13 and 3.6.2? Somebody tried that trick with X11 and it doesn't work in the long run (causes all kinds of weird problems later on).
.
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.
How does a system Python (e.g. 2.6.6 on RHEL6) provide you with usuable packages for 2.7.13 and 3.6.2? Somebody tried that trick with X11 and it doesn't work in the long run (causes all kinds of weird problems later on).
Well, it doesn't. What I meant is that if python (as in the python interpreter to be used to run a simple python script) is needed for building, we use the system python. Anything more convoluted than that will use our Python-2.7.13-GCCcore-5.4.0.eb
or Python-3.6.1-GCCcore-5.4.0.eb
, which are listed as dependencies
, not builddependencies
. I haven't found any case where python should be in builddependencies
, but the system python isn't enough for it. X11 needs python just for xcb-proto
, as stated in the easyconfig file:
# Python is required for xcb-proto
allow_system_deps = [('Python', SYS_PYTHON_VERSION)]
so we simply use that and don't introduce any Python dependency.
Note: Here's a quick list of things I have working with Python-bare and GCCcore.... NTLR ASE asyncoro ATK cairo cairocffi cffi colorama Cycler Cython dbus-glib dispy Docutils FFmpeg FIAT FLTK FOX freeglut FTGL GConf Gdk-Pixbuf GEOS gettext Ghostscript GLEW GLib GObject-Introspection GST-plugins-base GStreamer GTK+ HarfBuzz ImageMagick jemalloc json2html libdap libdrm libepoxy libglade libGLU libICE libspatialite libxml2 libxslt LLVM Mako MarkupSafe matplotlib Mesa mpmath myriad Pango ply PostgreSQL psycopg2 PyCairo pycparser PyGObject PyGTK PyOpenGL PyQt PyQt5 PySlurm Python PyYAML PyZMQ QCA QJson QScintilla QScintilla5 Qt Qt5 Qwt QwtPolar rebuild.FLTK rebuild.PyGObject requests setuptools simplejson SIP six SWIG sympy Tk VTK wxPython X11 xprop I see no reason to have to build three versions for each of those when one will do. |
@JackPerdue I'm not entirely convinced that your approach is 'safe' in a general sense... What you are doing is installing Python packages with one particular Python installation (built with How sure are you that's actually (always) OK to do? I would expect it's possible to run into ABI compatibility issues? Are the Next to the concerns above, the module names being produced are misleading. The I understand your motivations for avoiding duplicate installations, I'm just concerned whether we are confident that this is a proper solution... |
Why would there be ABI issues? They are all using the same GCCcore and binutils. |
re: ABI questions..... currently trying to find some answers using a tool called abi-compliance-checker.. rather tedious getting all the builds/modules right.... so far no problems re: API/ABI |
Maybe I should just change the name of this module from Python-bare to just pybuilddep and then have all modules have a "-pybuilddep-2.7.13" (or whatever) versionsuffix to make it clear Python isn't included. I think that would solve some issues, especially since Python would be loaded later and thus take precedent in PATHs. |
Y'all will have to update pythonpackage.py to set LD_LIBRARY_PATH w/builddeps OR implement rpath OR take my rpath hack that works.... or I'm taking my ball home..... :) |
Support for hard enabling use of RPATH is being worked on in easybuilders/easybuild-framework#2283... After giving this some thought, I'm wondering why we don't create a This apprach has a couple of advantages over the current approach:
I think this also eliminates the need for RPATH linking, but I'm not entirely sure about that. Also, I think this approach is fairly close to what @damianam & co are doing at JSC. Thoughts @JackPerdue, @damianam? |
W.r.t. using one Python build (e.g. with Here's what I get when doing an
|
I'm quite sure mixing toolchains (foss/intel) won't work due to different MPI and maths. And numpy needs maths so it always has to be built with a full toolchain. So numpy can never be a -core package. -core works for me. Will the Python in the -core package be a builddep? If not, what happens when I want to use a Python-GCCcore-core module with, say, other modules (e.g. numpy) that use the full toolchain? |
As mentioned on Slack/IRC, but not here, I did some ABI testing to try to find issues with my approach. I'm welcome to ideas on nomenclature but I'm fairly sure this approach works pretty well. ABI test results at: http://www.siliconslick.com/easybuild/ABIPython/ I recommend starting with 00_README I couldn't find any problems (I tried). |
I fleshed out my |
(created using
eb --new-pr
)