Bug 447539

Summary: unresolvable R_PPC_REL24 relocation against symbol
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: readlineAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-20 13:56:10 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:
Attachments:
Description Flags
conftest.c from attempted configure run none

Description Mary Ellen Foster 2008-05-20 13:40:44 UTC
Description of problem:
I'm trying to build a package that depends on readline, and it fails on ppc only
(not ppc64, and not any other arch). Investigating the configure output, it
seems that I get errors like this:

configure:9617: gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -pthread 
-export-dynamic -O3 -pthread conftest.c -lreadline -lncursesw -lm -lrt -ldl  >&5
/usr/bin/ld: /tmp/ccysHPco.o(.text+0xc): unresolvable R_PPC_REL24 relocation
against symbol `rl_done'
/tmp/ccysHPco.o: In function `main':
/builddir/build/BUILD/pl-5.6.55/src/conftest.c:87: relocation truncated to fit:
R_PPC_REL24 against symbol `rl_done' defined in .sbss section in
/usr/lib/gcc/ppc64-redhat-linux/4.3.0/../../../../lib/libreadline.so
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

I'll attach the test program that "configure" is trying to run. This error
doesn't happen on Fedora 8, and doesn't happen on any other arch for Fedora 9.

Version-Release number of selected component (if applicable):
readline-0:5.2-13.fc9

How reproducible:
Every time

Steps to Reproduce:
1. Compile attached program

Actual results:
Successful compilation

Expected results:
Error results described above

Comment 1 Mary Ellen Foster 2008-05-20 13:40:44 UTC
Created attachment 306120 [details]
conftest.c from attempted configure run

Comment 2 Mary Ellen Foster 2008-05-20 13:42:34 UTC
NB: here's the command line that configure uses to compile the attached program:

gcc -o conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -pthread  -export-dynamic -O3
-pthread conftest.c -lreadline -lncursesw -lm -lrt -ldl

Comment 3 David Woodhouse 2008-05-20 13:50:53 UTC
rl_done is an 'extern int', but conftest.c is trying to call it as a function.
That's unlikely to work, in the general case. The configure test is broken.

Comment 4 Mary Ellen Foster 2008-05-20 13:56:10 UTC
Right, this is a bug in the configure script of my package, not in readline.
Sorry for the noise.