From: wolf on
Hi all,

I recently installed Fedora 4 and want to start matlab, but it
doesn't work anymore. I get the following error message:

/usr/local/matlab/bin/glnx86/matlab: error while loading shared
libraries: /usr/local/matlab/bin/glnx86/libmwumfpack.so: cannot
restore segment prot after reloc: Permission denied

I tried to find a solution and came accros a possible problem caused
selinux, which does not permit rext relocations (textrel) anymore. I
tested this with:

readelf -d /usr/local/matlab/bin/glnx86/libmwumfpack.so | grep
TEXTREL

which gave:

0x00000016 (TEXTREL) 0x0

indicating, that ther may be indeed such a problem.

Does anyone know how to cope with this problem?

Thanks for any suggestions,

wolf
From: wolf on
Hi,

If anyone else gets similar problems, I found an adhoc soulution,
which basically is disabling SELinux.

open /etc/selinux/config

comment out all lines and add

SELINUX=disabled

after rebooting matlab will work again.

I know that this is not an ideal solution, and I am still happy about
any other suggestions.

Thanks,

wolf
From: Mike Schmidt on
Hi,

After looking into /var/log/audit, and googling, I found a more
specific work around:
in
matlab/bin/glnx86/
and
matlab/sys/os/glnx86/

run the command:
chcon -t texrel_shlib_t *.so
to change the context of the library files to allow them to work.

Hope this helps!
From: Mike Schmidt on
After using matlab some more I found out I missed a few library
directories. The following shell command should do the trick:
First cd into the matlab directory, then type :
for MYLIB in `find ./ -name "*so"`; do chcon -t texrel_shlib_t
$MYLIB;done;

All on one line, minding that the ` marks to the left of the 1 key,
not the normal ' mark.

Thanks!