Summary: | sci-visualization/mayavi-4.2.0 - /var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/environment: line 5211: 25358 Segmentation fault $(PYTHON) setup.py gen_docs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
/var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/build.log
patch to mayavi-4.2.0 ebuild better doc patch /var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/build.log with patches the new /var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/build.log |
Description
Juergen Rose
2012-12-07 12:24:43 UTC
which numpy are you using? Since wednesday dev-python/numpy-1.7.0_beta2::sage-on-gentoo is installed. Could you please try with 1.6.2? If I mask numpy-1.7:
root@leopard:/root(13)# grep numpy /etc/portage/package.mask
>=dev-python/numpy-1.7.0_beta2
and then reemerge numpy-1.6.2:
root@leopard:/root(14)# qlist -Iv numpy
dev-python/numpy-1.6.2
'emerge mayavi' still fails with segmentation fault:
root@leopard:/root(15)# emerge -vuND --resume world
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U ] sci-visualization/mayavi-4.2.0:2 [4.1.0-r1:2] USE="doc examples {-test}" 0 kB
...
copying tvtk/plugins/scene/ui/__init__.py -> build/lib.linux-x86_64-2.7/tvtk/plugins/scene/ui
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'tvtk.array_ext' extension
compiling C sources
C compiler: x86_64-pc-linux-gnu-gcc -pthread -march=native -O2 -pipe -fPIC
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/tvtk
creating build/temp.linux-x86_64-2.7/tvtk/src
compile options: '-I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
x86_64-pc-linux-gnu-gcc: tvtk/src/array_ext.c
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe build/temp.linux-x86_64-2.7/tvtk/src/array_ext.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/tvtk/array_ext.so
running scons
running gen_docs
/var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/environment: line 5211: 11802 Segmentation fault $(PYTHON) setup.py gen_docs
* ERROR: sci-visualization/mayavi-4.2.0 failed (compile phase):
That looks very similar to stuff I was getting will working on the doc patch for 4.1.0. In any case it is related to building documentation. So it should be disabled and we should then check if it still fails with the doc useflag. Where did you get the patch you used in mayavi 4.2.0 instead of the one I posted in bug #445782 never mind the fact you left 4.1.0-r1 broken in the tree. I get things to work with a slight variation of my patch above - I adopted the zip_safe flag setting. --- setup.py.orig 2012-12-08 22:56:32.268449054 +1300 +++ setup.py 2012-12-08 22:58:42.099588659 +1300 @@ -465,10 +465,8 @@ # Work around a numpy distutils bug by forcing the use of the # setuptools' sdist command. 'sdist': setuptools.command.sdist.sdist, - 'build': MyBuild, 'develop': MyDevelop, 'install_scripts': MyInstallScripts, - 'install_data': MyInstallData, 'gen_docs': GenDocs, 'build_docs': BuildDocs, }, @@ -494,6 +492,6 @@ license = "BSD", long_description = '\n'.join(DOCLINES[3:]), platforms = ["Windows", "Linux", "Mac OS-X", "Unix", "Solaris"], - zip_safe = False, + zip_safe = True, **config ) In your patch you have: def run(self): - build_tvtk_classes_zip() +# build_tvtk_classes_zip() build.build.run(self) - self.run_command('gen_docs') - try: - self.run_command('build_docs') - except: - log.warn("Couldn't build documentation:\n%s" % - traceback.format_exception(*sys.exc_info())) +# self.run_command('gen_docs') +# try: +# self.run_command('build_docs') +# except: +# log.warn("Couldn't build documentation:\n%s" % +# traceback.format_exception(*sys.exc_info())) Wich basically means that MyBuild execute only "build.build.run(self)" the build function call from numpy distutils. I achieve the same result more economically with: - 'build': MyBuild, As it suppress the override with MyBuild. The stuff you put in mayavi-4.2.0 for building the doc will reliably fail with the same message than in bug #445782 because your call to build_docs is not done in virtualx. Actually I tried to have ${PYTHON} be the virtualmake command but that didn't, work anyone knows how to achieve that? Anyway I am attaching a small diff for the ebuild to restore 4.1.0-r1 behavior and a modified doc patch nearly identical to the one i already posted in bug #445782 Created attachment 331794 [details, diff]
patch to mayavi-4.2.0 ebuild
Created attachment 331796 [details, diff]
better doc patch
Now I must say I haven't been able to reproduce your particular error Juerden but I am expecting that the problem will go away because that stuff probably bypass the point where you have trouble. For me it was the previous bug for 4.1.0-r1 all over again. After using the patches I could once emerge on one system mayavi-4.2.0, but now it fails again on this and all other systems with: ... Making output directory... Running Sphinx v1.1.3 loading pickled environment... not yet created building [html]: targets for 112 source files that are out of date updating environment: 112 added, 0 changed, 0 removed Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" QWidget: Must construct a QApplication before a QPaintDevice make[1]: *** [html] Aborted Doing several times 'revdep-rebuild', 'python-updater' and 'perl-cleaner --reallyall' did not help. root@leopard:/usr/local/portage/sci-visualization(68)# grep -U2 virtualmake mayavi/mayavi-4.2.0.ebuild distutils_src_compile if use doc; then virtualmake -C docs html fi } root@leopard:/usr/local/portage/sci-visualization(69)# cat mayavi/files/mayavi-4.2.0-doc.patch --- setup.py.orig 2012-12-08 22:56:32.268449054 +1300 +++ setup.py 2012-12-08 22:58:42.099588659 +1300 @@ -465,10 +465,8 @@ # Work around a numpy distutils bug by forcing the use of the # setuptools' sdist command. 'sdist': setuptools.command.sdist.sdist, - 'build': MyBuild, 'develop': MyDevelop, 'install_scripts': MyInstallScripts, - 'install_data': MyInstallData, 'gen_docs': GenDocs, 'build_docs': BuildDocs, }, @@ -494,6 +492,6 @@ license = "BSD", long_description = '\n'.join(DOCLINES[3:]), platforms = ["Windows", "Linux", "Mac OS-X", "Unix", "Solaris"], - zip_safe = False, + zip_safe = True, **config ) Created attachment 332970 [details]
/var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/build.log with patches
Maybe it is due to a dependence of some library on libicui18n.so.49: root@leopard:/usr/local/portage/sci-visualization(71)# strace -f emerge -v mayavi 2>&1 | grep icui18n [pid 1237] lstat("/usr/lib/libicui18n.so.50/libX11.so", 0x7fff130233f0) = -1 ENOTDIR (Not a directory) [pid 1237] lstat("/usr/lib/libicui18n.so/libX11.so", 0x7fff130233f0) = -1 ENOTDIR (Not a directory) [pid 1237] lstat("/usr/lib/libicui18n.so.50.1/libX11.so", 0x7fff130233f0) = -1 ENOTDIR (Not a directory) (null)*(null) ../../sandbox-2.6/libsandbox/trace.c:_do_ptrace():69: failure (Operation not permitted): (null)*(null) ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x0000000000000000, 0x0000000000000000): Operation not permitted (null)*(null) ../../sandbox-2.6/libsandbox/trace.c:_do_ptrace():69: failure (Operation not permitted): (null)*(null) ISE:_do_ptrace: ptrace(PTRACE_TRACEME, ..., 0x0000000000000000, 0x0000000000000000): Operation not permitted [pid 1268] open("/usr/lib64/libicui18n.so.50", O_RDONLY|O_CLOEXEC) = 11 [pid 1268] open("/lib64/tls/x86_64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/tls/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/x86_64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/tls/x86_64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/tls/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/x86_64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/libicui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/libicui18n", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/libicui18n", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/icui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/icui18n.so.49", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/lib64/icui18n", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] open("/usr/lib64/icui18n", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) [pid 1268] write(2, "Unable to load library icui18n \""..., 132) = 132 [pid 909] <... read resumed> "Unable to load library icui18n \""..., 4096) = 193 [pid 909] write(11, "Unable to load library icui18n \""..., 193Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" [pid 909] write(12, "Unable to load library icui18n \""..., 193) = 193 I cannot reproduce this so far. You have several bizzare things in that log: Making output directory... [01mRunning Sphinx v1.1.3[39;49;00m [01mloading pickled environment... [39;49;00mnot yet created [01mbuilding [html]: [39;49;00mtargets for 112 source files that are out of date [01mupdating environment: [39;49;00m112 added, 0 changed, 0 removed [01mreading sources... [39;49;00m[ 0%] [35madvanced_scripting[39;49;00m [01mreading sources... [39;49;00m[ 1%] [35madvanced_use[39;49;00m [01mreading sources... [39;49;00m[ 2%] [35mapi/core_view_objects[39;49;00m ******************************************************************************** WARNING: Imported VTK version (5.1) does not match the one used to build the TVTK classes (5.8). This may cause problems. Please rebuild TVTK. ******************************************************************************** Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" QWidget: Must construct a QApplication before a QPaintDevice make[1]: *** [html] Aborted make[1]: Leaving directory `/var/tmp/portage/sci-visualization/mayavi-4.2.0/work/mayavi-4.2.0/docs' make: *** [html] Error 2 make: Leaving directory `/var/tmp/portage/sci-visualization/mayavi-4.2.0/work/mayavi-4.2.0/docs' So it is clearly in building the doc. There is the bit about the imported vtk version not matching which we should dig first. It looks like mayavi imports itself and because we haven't put PYTHONPATH="." anywhere I am guessing it is trying to import an older installed version of mayavi compiled against vtk-5.8. The other errors may follow from that one. I would like you to try: USE="-doc -examples" emerge -uv mayavi and then if it is successfull try: emerge -1v mayavi thanks for your patience Juergen. Thanks Francois,
>> USE="-doc -examples" emerge -uv mayavi
>> and then if it is successfull try:
>> emerge -1v mayavi
In the second step I got several "ImportError: TVTK not built properly. Unable to find either a directory: /usr/lib64/python2.7/site-packages/tvtk/tvtk_classes or a file: /usr/lib64/python2.7/site-packages/tvtk/tvtk_classes.zip with the TVTK classes.
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/usr/lib64/python2.7/site-packages/mayavi/core/api.py", line 5, in <module>
from .pipeline_base import PipelineBase
File "/usr/lib64/python2.7/site-packages/mayavi/core/pipeline_base.py", line 13, in <module>
from mayavi.core.base import Base
File "/usr/lib64/python2.7/site-packages/mayavi/core/base.py", line 19, in <module>
from tvtk.pyface.tvtk_scene import TVTKScene
File "/usr/lib64/python2.7/site-packages/tvtk/pyface/tvtk_scene.py", line 17, in <module>
from tvtk.api import tvtk
File "/usr/lib64/python2.7/site-packages/tvtk/api.py", line 11, in <module>
from tvtk.tvtk_access import tvtk
File "/usr/lib64/python2.7/site-packages/tvtk/tvtk_access.py", line 30, in <module>
"with the TVTK classes." % (tvtk_class_dir, _zip) )", but nevertheless 'emerge' came to the regular end. For these TVTK errors, I will again attach the new build.log file
Created attachment 333138 [details]
the new /var/tmp/portage/sci-visualization/mayavi-4.2.0/temp/build.log
I fully expect those. They shouldn't be harmful - you can prove me wrong on that. Now that we have identified the fact that maya I imports itself in the install process we may find some other solutions that take care of this particular bit. That's fairly foobar unless you emerge the ebuild twice in a row. I cannot quite get ride of: ImportError: TVTK not built properly. Unable to find either a directory: /usr/lib64/python2.7/site-packages/tvtk/tvtk_classes or a file: /usr/lib64/python2.7/site-packages/tvtk/tvtk_classes.zip with the TVTK classes. Note that it is saying it looks for the zip file in a system location. I can get the file to install so it would be ok in two passes but that's not satisfactory. I am guessing we get the system location call because it failed to find it in the build location beforehand. Which is normal since it is not copied to the buid location. The whole point of the MyInstallData function in setup.py is to get it installed separately of the rest. I may have one or two more ideas to make it behave in my bag. I am starting to wonder if the building of the docs without any of these warnings has ever been possible. The more I dig the more it look like the html doc (and all the other docs format that can be produced) would benefit from being in its own separate ebuild that "DEPEND"s on the mayavi ebuild. I managed to get it to build the doc using the source rather than an install but I get this instead: Running Sphinx v1.1.3 loading pickled environment... not yet created building [html]: targets for 112 source files that are out of date updating environment: 112 added, 0 changed, 0 removed reading sources... [ 0%] advanced_scripting reading sources... [ 1%] advanced_use reading sources... [ 2%] api/core_view_objects Xlib: extension "RANDR" missing on display ":1". Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/sphinx/ext/autodoc.py", line 321, in import_object __import__(self.modname) File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/mayavi/core/ui/api.py", line 1, in <module> from mayavi.tools.mlab_scene_model import MlabSceneModel File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/mayavi/tools/mlab_scene_model.py", line 8, in <module> from tvtk.pyface.scene_model import SceneModel File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/tvtk/pyface/scene_model.py", line 20, in <module> from tvtk.pyface.tvtk_scene import TVTKScene File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/tvtk/pyface/tvtk_scene.py", line 24, in <module> from tvtk.pyface import light_manager File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/tvtk/pyface/light_manager.py", line 130, in <module> class CameraLight(HasTraits): File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/tvtk/pyface/light_manager.py", line 146, in CameraLight source = Instance(tvtk.Light, ()) File "tvtk_classes/tvtk_helper.py", line 223, in <lambda> Light = property(lambda self: get_class('Light')) File "tvtk_classes/tvtk_helper.py", line 36, in get_class mod = get_module(fname) File "tvtk_classes/tvtk_helper.py", line 28, in get_module mod = __import__('tvtk.tvtk_classes.%s'%fname, globals(), locals(), [fname]) File "tvtk_classes/light.py", line 10, in <module> File "/scratch/portage/sci-visualization/mayavi-4.2.0-r1/work/mayavi-4.2.0/tvtk/array_handler.py", line 29, in <module> from tvtk.array_ext import set_id_type_array ImportError: No module named array_ext The ImportError being repeated multiple times. This is because tvtk.array_ext is an extension (i.e. a shared object rather than python script) so you need PYTHONPATH to point to the build directory rather than the source directory. Once you do that and copy 4 other data files that are not moved from the source directory you get to the dreaded: Running Sphinx v1.1.3 loading pickled environment... not yet created building [html]: targets for 112 source files that are out of date updating environment: 112 added, 0 changed, 0 removed Xlib: extension "RANDR" missing on display ":1". QWidget: Must construct a QApplication before a QPaintDevice make[1]: *** [html] Aborted From that I am not even sure you could build the documentation without some warnings indicating potential problems in two passes (emerge twice) - it may actually break at the second pass. The attached patch has been included in tree, and at least mayavi-4.4.2 from science overlay works. I think we can close this bug. mayavi-4.5.0 is now in tree. |