[SciPy-dev] SciPy SELinux and import bugs?

John Ollinger ollinger at wisc.edu
Wed Sep 26 14:11:20 EDT 2007


Hi,

I ran into the same problem.  You will have to change the context on every
shared library in the distribution.  You can either disable this secure
linux feature or use the chcon command.  I realize that the syntax of the
command is obvious, but here is the alias I use anyway.

function selinux_chcon() { find $* -name "*.so*" -exec chcon -t
texrel_shlib_t \{\} \;  ;}

John

On 9/26/07, Tom Loredo <loredo at astro.cornell.edu> wrote:
>
>
> Hi folks-
>
> I've just "upgraded" to RHEL 5 and am going through the chore of
> installing a ton of software that I previously used under Fedora,
> including Python/NumPy/SciPy.
>
> I've gotten numpy-1.0.3.1 installed (with atlas & fftw) and it passes
> all tests.  But with scipy-0.6.0, scipy.test(1,1) gives me an
> "Illegal instruction" error, and crashes out of Python.  The first
> such error was an SELinux violation due to a text relocation
> requirement in _fftpack.so (whatever that means!).  I executed
> the "chcon" context change command SELinux suggested as a workaround.
> But scipy.test(1,1) still crashes with "Illegal instruction" at
> apparently the same place, though now without raising an SELinux
> violation (at least, not one that appears in the SELinux troubleshooter).
>
> At this point I thought I'd give the current SVN SciPy (r3369) a try.
> It installs fine, but I get an error on import:
>
> >>> import scipy
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python2.5/site-packages/scipy/__init__.py", line
> 63, in <module>
>     pkgload(verbose=SCIPY_IMPORT_VERBOSE,postpone=True)
>   File "/usr/local/lib/python2.5/site-packages/numpy/_import_tools.py",
> line 177, in __call__
>     self._init_info_modules(packages or None)
>   File "/usr/local/lib/python2.5/site-packages/numpy/_import_tools.py",
> line 100, in _init_info_modules
>     self._init_info_modules(getattr(info_module,'depends',[]))
>   File "/usr/local/lib/python2.5/site-packages/numpy/_import_tools.py",
> line 72, in _init_info_modules
>     exec 'import %s.info as info' % (package_name)
>   File "<string>", line 1, in <module>
>   File "/home/inference/loredo/python/scripts/special.py", line 97, in
> <module>
>     def factrl(n, ntop=0, prev=N.ones((33),N.Float)):
> AttributeError: 'module' object has no attribute 'Float'
>
> It is finding an old script of mine that happens to be named "special"
> that I haven't used and thus haven't upgraded from Numeric to NumPy.
> But that's beside the point---I think it must be a bug that SciPy's
> import mechanism is finding it.
>
> Any suggestions for dealing with either issue (Illegal instruction
> with 0.6.0, or the import issue for r3369) would be appreciated!
>
> -Tom Loredo
>
> PS:  Regarding the text relocation issue in _fftpack.so, SELinux
> points to this web page for hints on how to fix it:
>
> http://people.redhat.com/drepper/selinux-mem.html
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>



-- 
John Ollinger
University of Wisconsin
Waisman Center, T233
1500 Highland Ave
Madison, WI 53711
http://brainimaging.waisman.wisc.edu/~jjo/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20070926/f4b2b112/attachment.html>


More information about the SciPy-Dev mailing list