Red Hat Bugzilla – Bug 150085
tetex shared libraries missing
Last modified: 2013-07-02 19:06:18 EDT
Description of problem:
tetex 1.0.7 includes the (static) library libkpathsea.a. This is built without PIC, and causes
an error when one attempts to create a sharable library which refers to it. This works on
other platforms, but not on x86_64.
Possible actions: either compile tetex with --enable-shared, which was not the default for
tetex releases, or adjust the CFLAGS when building it to add -fPIC (I haven't verified this
last route, but it should be sufficient).
tetex 1.* is rather old; tetex 3 is available -- perhaps there's an enhancement request
here. --enable-shared is set by default on recent tetex releases.
Steps to Reproduce:
% cat /etc/redhat-release
Red Hat Enterprise Linux WS release 3 (Taroon Update 4)
% rpm -q tetex
% cat tetex-bug.c
kpse_find_file(); /* routine present in libkpathsea */
% gcc -c tetex-bug.c
% ld -shared -o libtetex-bug.so tetex-bug.o -L. -lkpathsea
ld: ./libkpathsea.a(tex-file.o): relocation R_X86_64_32 can not be used when making a
shared object; recompile with -fPIC
./libkpathsea.a: could not read symbols: Bad value
(the above is the command-line I used on my system. This system has been fixed by
adding the libkpathsea.so; I don't have access to a stock RHEL system, so in order to
demonstrate the problem here I have to copy the libkpathsea.a. The -L. obviously won't be
necessary on a stock system. At any rate, this is the error that appears on the stock
not to fail
I didn't realize that someone wants to use kpathsea libraries from the teTeX
distribution in own programs. Adding of -fPIC doesn't look too hard to add to
have position independent code. I'll consider it and add it if there are no
further problems occurs.
It seems this issue blocks PyX builds in x86_64 on in at least FC5 and rawhide.
If this issue is addressed, building libkpathsea as a shared library instead of
static would mean that PyX in extras would not have to be rebuilt if an update
to tetex-fonts includes a patch to the kpathsea library.
Product Management has reviewed and declined this request. You may appeal this
decision by reopening this request.