WIP: Make Paraview work#3298
Conversation
spack install mesa@10.2.4 %gcc@5.4.0
| homepage = "http://www.mesa3d.org" | ||
| url = "http://ftp.iij.ad.jp/pub/X11/x.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz" | ||
| #url = "http://ftp.iij.ad.jp/pub/X11/x.org/pub/mesa/12.0.3/mesa-12.0.3.tar.gz" | ||
| url = "ftp://ftp.freedesktop.org/pub/mesa/older-versions/10.x/10.2.4/MesaLib-10.2.4.tar.bz2" |
There was a problem hiding this comment.
why do you change url, is 10.2.4 not available from iij.ad.jp? If so, just add it to the version() and keep the old url.
There was a problem hiding this comment.
Yes, I wasn't sure if version() accepts a url or not, I was going to look into this later after I actually get it working.
There was a problem hiding this comment.
it does, from http://spack.readthedocs.io/en/latest/packaging_guide.html#versions-and-fetching
version('8.2.1', '4136d7b4c04df68b686570afa26988ac',
url='http://example.com/foo-8.2.1-special-version.tar.gz')
There was a problem hiding this comment.
p.s. i checked the current url and the old versions can be found in ftp://ftp.iij.ad.jp/pub/X11/x.org/pub/mesa/older-versions/10.x/10.2.4/MesaLib-10.2.4.tar.bz2. So i would stick with this site.
There was a problem hiding this comment.
@certik would you mind switching to the one i found above on the iij.ad.jp?
There was a problem hiding this comment.
Sure, fixed in 9e30909. I already submitted the patch when you commented.
|
|
||
|
|
||
| def configure_args(self): | ||
| make('autoreconf -fi') |
There was a problem hiding this comment.
i think configure_args is intended only to return flags, not to run anything in AutotoolsPackage package. Maybe @alalazo can comment on where this line should go.
There was a problem hiding this comment.
It looks like the newer version fixes this autoreconf problem (it looks like spack actually somehow calls autoreconf automatically). I fixed this issue in a61d8ce, but I hit a problem that now I need to comment out the older version otherwise the url somehow fails to download it. So the way we implemented the url in version() above I think is incorrect.
Anyway, for now I am commenting out, and continuing on the quest to build paraview.
There was a problem hiding this comment.
(it looks like spack actually somehow calls autoreconf automatically).
yes, AutotoolsPackage does it.
There was a problem hiding this comment.
It looks like the newer version fixes this autoreconf problem (it looks like spack actually somehow calls autoreconf automatically)
Since #1186 sub-classes of PackageBase can declare an arbitrary number of phases to conform to the underlying build-system (cmake, autotools, etc.). The AutotoolsPackage class has logic in it to perform the most common operations (like call autoreconf if no configure file is present) so that packagers don't need to repeat them over and over.
spack install mesa %gcc@5.4.0
Build using: spack install -j16 paraview %gcc@5.4.0
|
So now builds paraview on my Ubuntu 16.04 system. This is without GUI, but it's a progress. Now I am trying |
|
Ok, so this also built: |
|
|
||
|
|
||
| def configure_args(self): | ||
| #make('autoreconf -fi') |
There was a problem hiding this comment.
you can remove it if it's not needed. Probably same for the old version above.
| depends_on('qt@:4', when='+qt') | ||
|
|
||
| depends_on('cmake', type='build') | ||
| depends_on('mesa') |
There was a problem hiding this comment.
should this be when='~qt', in that it's an alternative to qt?
There was a problem hiding this comment.
it's not an alternative to qt, but rather to opengl.
There was a problem hiding this comment.
i was concerned if we need that dependency unconditionally?
There was a problem hiding this comment.
We might need a virtual dependency for opengl, and a set of recommendations for setting this stuff up. This was an indirect dependency already via qt; curious why @certik had to add it to paraview.
There was a problem hiding this comment.
I do not think we should not have it unconditional:
As far as I know, If your system has GPU, you should use "native" Opengl and not Mesa
Is not there already an osmesa variant in ParaView?
Also did you compile Qt in spack or use the system provided?
I have the need to install Paraview + Qt on two cluster, one with GPU and another without.
On the one with I think that OpenGL is ( and has to be ) system installed, while on the one without, I nedd to install Mesa, and installed one with Gallium, as per
https://github.com/RemoteConnectionManager/spack/tree/wip/mesa_gallium
It is not ready but maybe worthwhile a WIP PR
There was a problem hiding this comment.
This is just to get it working for me (thus the WIP in PRs name) in the most hackish way, it's another question how to best incorporate it or what the right solution actually is. I don't know.
@tgamblin I build Qt via Spack. I first build Paraview without Qt, so there was no dependency and the build failed. Let me try to build Paraview with qt and without this PR, it might actually work.
|
flake8: |
|
So paraview built and I tested it a bit, it seems to work. The mesa is more of a workaround, ideally one would build Paraview with opengl. Does anyone know what packages to install in Ubuntu to make this work? For now I can use mesa, which is slower, but at least it works. |
ideally you would not need any, everything should come from Spack (but you can make Spack use system-provided packages as well!). Maybe some dependencies are not declared as such and thus |
Isn't Mesa the OpenGL implementation used in Ubuntu? Maybe we just need a faster mesa build. |
|
Btw, bad news --- Paraview worked over ssh yesterday, but now when I do it from the computer itself, it fails with: So I still need to investigate. |
|
The previous error was fixed by Paraview seems to work, but the fonts in Qt look very crappy. |
|
@hartzell has messed around with Spack's font libraries before. He may be able to help. |
|
I noticed if I run @hartzell if you knew how to increase the font selection available for Qt in Spack, that would be awesome. |
|
Here is a summary How to get ParaView working on Ubuntu 16.04Install spack and shell support. No patches necessary. Install prerequisites using Maybe not all of them are necessary, but most of them are, otherwise Paraview and Qt will not compile properly. In case I forgot some library, here is a full list that I installed today: https://gist.github.com/certik/a02e697c38efdfba363b70bc918b2c82 Then: |


I use a stock Ubuntu 16.04. Paraview fails to build due to a missing opengl library. In Hashdist I build Paraview with os mesa, then things work. The +osmesa flag to paraview fails (missing osmesa library).
So I first concentrate on the mesa library. Below I made the modifications to build it just like in Hashdist (as the default spack version fails to build due to
configure: error: libudev-dev or sysfs required for building DRI). I build it withspack install mesa@10.2.4 %gcc@5.4.0.It fails with:
But I have to call autoreconf, otherwise (if I comment the line that calls autoreconf), i.e.:
the configure phase succeeds, but the make phase fails with:
I don't know what else to do. I tried to also debug it by doing:
So that seems like another, unrelated bug, so I reported it as #3319. But it prevents me from debugging it that way.