Red Hat Bugzilla – Bug 226873
svgalib will not load unless libraries are copied to usb drive
Last modified: 2007-11-30 17:11:56 EST
Description of problem:
I installed FC6 from CD set (checksums verified), then installed svgalib
(www.svgalib.org) both versions 1.4.3 and 1.9.25. After building according to
instructions (with a few changes mainly to correct new compiler issues in 1.4.3)
I tried to run a demo. It fails to load libraries, complaining that it cannot
restore segment protection after relocation. Same result by doing ldd -r on the
libraries. The problem is resolved and the demos run after I copy the libraries
to a usb thumb-drive and change the links in /usr/local/lib to point there. I
was running as root and had full permissions on all directories in the path to
the demo program and the libraries, and on those files. I have used svgalib on
several other Linux distros, including a Fedora Core laptop installation from
Emperor Linux, without running into this issue. I can't think how to determine
whether this is a FC6 issue or svgalib issue.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Fixing component and reassigning.
You built svgalib incorrectly (or it has buggy Makefiles?).
Shared libraries need to be built as position independent code (i.e. using
-fpic or -fPIC compile time flags).
In FC6 the SELinux policy by default disallows DT_TEXTREL shared libraries
(on some arches like x86_64 DT_TEXTREL has never been supported at all), unless
the library uses a special SELinux type (e.g. textrel_shlib_t).
On the USB thumb drive guess you don't have a filesystem that supports SELinux
The best fix is just make sure the library is built with -fpic. As a fallback,
if it is not (easily) possible to fix it, you can chcon -t textrel_shlib_t the