Bug 150085

Summary: tetex shared libraries missing
Product: Red Hat Enterprise Linux 3 Reporter: Norman Gray <gray>
Component: tetexAssignee: Jindrich Novy <jnovy>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: mpeters, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-16 22:20:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 190665    

Description Norman Gray 2005-03-02 11:52:59 UTC
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 
early 
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. 


How reproducible:
Always

Steps to Reproduce:

% cat /etc/redhat-release 
Red Hat Enterprise Linux WS release 3 (Taroon Update 4)
% rpm -q tetex
tetex-1.0.7-66
% cat tetex-bug.c
call_kpse () 
{
        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 
system)
  
Actual results:
as above

Expected results:
not to fail

Additional info:

Comment 1 Jindrich Novy 2005-03-03 16:02:31 UTC
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.

Jindrich


Comment 2 Jason Tibbitts 2006-04-30 04:55:37 UTC
It seems this issue blocks PyX builds in x86_64 on in at least FC5 and rawhide.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190247

Comment 3 Michael A. Peters 2006-05-04 11:31:07 UTC
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.

Comment 5 RHEL Program Management 2006-12-16 22:20:39 UTC
Product Management has reviewed and declined this request.  You may appeal this
decision by reopening this request.