Bug 199938

Summary: PHP doesn't rebuild with libc-client support
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: libc-clientAssignee: Joe Orton <jorton>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
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-08-02 06:07:13 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 199947    
Attachments:
Description Flags
log
none
config.log none

Description Bastien Nocera 2006-07-24 10:44:29 EDT
On x86-64

php-4.3.9-3.15
libc-client-2002e-14

When trying to rebuild PHP on x86-64, I get:
/usr/bin/ld:
/usr/lib/gcc/x86_64-redhat-linux/3.4.5/../../../../lib64/libc-client.a(osdep.o):
relocation R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/3.4.5/../../../../lib64/libc-client.a: could
not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [ext/imap/imap.la] Error 1
make: *** Waiting for unfinished jobs....
error: Bad exit status from /home/bnocera/packages/tmp/rpm-tmp.75268 (%build)
Comment 1 Joe Orton 2006-07-24 10:50:49 EDT
Please attach the complete output of rpmbuild and the one of the config.log
files produced in the builddir.
Comment 2 Bastien Nocera 2006-07-24 10:56:16 EDT
Fixed using this patch to the spec file:

--- libc-client.spec    2005-11-23 20:57:56.000000000 +0000
+++ libc-client.spec.new        2006-07-24 15:55:37.000000000 +0100
@@ -77,6 +77,7 @@
 EXTRACFLAGS="$EXTRACFLAGS -fPIC"

 make lnp \
+CFLAGS="$EXTRACFLAGS $RPM_OPT_FLAGS" \
 EXTRACFLAGS="$EXTRACFLAGS" \
 EXTRALDFLAGS="$EXTRALDFLAGS" \
 EXTRAAUTHENTICATORS=gss \
Comment 3 Bastien Nocera 2006-07-24 11:03:07 EDT
That's a "fix" as PHP shouldn't be linking to the .a either.
I'll post the config logs later on.
Comment 4 Bastien Nocera 2006-07-24 11:29:53 EDT
Created attachment 132923 [details]
log

rpmbuild logfile for php
Comment 5 Bastien Nocera 2006-07-24 11:31:12 EDT
Created attachment 132924 [details]
config.log

config.log grabbed from the build-cgi/ subdir
Comment 6 Joe Orton 2006-08-02 03:54:53 EDT
The only failure in these logs:

/home/bnocera/packages/BUILD/php-4.3.9/main/spprintf.c: In function
`xbuf_format_converter':
/home/bnocera/packages/BUILD/php-4.3.9/main/spprintf.c:272: error: void value
not ignored as it ought to be
make: *** [main/spprintf.lo] Error 1
make: *** Waiting for unfinished jobs....

... presumably from the patch for the varargs issue.
Comment 7 Bastien Nocera 2006-08-02 04:43:45 EDT
Urgh. Indeed.
It was an old patch, and I had the work-around from above applied, let me update
the logs then...
Comment 8 Bastien Nocera 2006-08-02 06:07:13 EDT
Can't seem to reproduce the problem, I guess you'll see it building php if it
was indeed a real bug.