<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>PHP-4.3.9-3 Recompile Fails</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">I need to add Sybase support to PHP.  Following a couple different pages I found using Google, the process I used to modify the PHP rpm is as follows:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I created a user called "rpmbuild", with it's own home directory "/home/rpmbuild".</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Everything has been done while logged in as the "rpmbuild" user.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I installed php-4.3.9-3.src.rpm using the command:</FONT>
<BR><FONT SIZE=2 FACE="Arial">rpm -ivh --define '_topdir /home/rpmbuild/rpm' php-4.3.9-3.src.rpm</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">...which is successful.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I created the necessary directories with the command:</FONT>
<BR><FONT SIZE=2 FACE="Arial">mkdir -p BUILD RPMS/i386 SRPMS</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I then modified "rpm/SPECS/php.spec", adding the line "--with-sybase=/opt/sybase", inserting it between a couple other --with statements:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">--with-kerberos \</FONT>
<BR><FONT SIZE=2 FACE="Arial">--with-sybase=/opt/sybase</FONT>
<BR><FONT SIZE=2 FACE="Arial">--with-ldap=shared \</FONT>
<BR><FONT SIZE=2 FACE="Arial">--with-mysql=shared,%{_prefix} \</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">...basically, I just picked a spot.  :)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I then attempt to rebuild the rpm using the command:</FONT>
<BR><FONT SIZE=2 FACE="Arial">rpmbuild --define '_topdir /home/rpmbuild/rpm' -ba /home/rpmbuild/rpm/SPECS/php.spec</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Eventually, it errors.  The screen output is:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">-----</FONT>
<BR><FONT SIZE=2 FACE="Arial">checking whether to enable ctype functions... yes</FONT>
<BR><FONT SIZE=2 FACE="Arial">checking for CURL support... yes</FONT>
<BR><FONT SIZE=2 FACE="Arial">checking for CURL in default path... found in /usr</FONT>
<BR><FONT SIZE=2 FACE="Arial">checking for cURL 7.9.8 or greater... libcurl 7.12.1</FONT>
<BR><FONT SIZE=2 FACE="Arial">checking for curl_easy_perform in -lcurl... no</FONT>
<BR><FONT SIZE=2 FACE="Arial">configure: error: There is something wrong. Please check config.log for more information.</FONT>
<BR><FONT SIZE=2 FACE="Arial">error: Bad exit status from /home/rpmbuild/rpm/tmp/rpm-tmp.16415 (%build)</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">RPM build errors:</FONT>
<BR><FONT SIZE=2 FACE="Arial">    Bad exit status from /home/rpmbuild/rpm/tmp/rpm-tmp.16415 (%build)</FONT>
<BR><FONT SIZE=2 FACE="Arial">-----</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">The config.log shows:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">-----</FONT>
<BR><FONT SIZE=2 FACE="Arial">#define STDC_HEADERS 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">#define WITH_BCMATH 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">#define YYTEXT_POINTER 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">#endif</FONT>
<BR><FONT SIZE=2 FACE="Arial">#ifdef __cplusplus</FONT>
<BR><FONT SIZE=2 FACE="Arial">extern "C" void std::exit (int) throw (); using std::exit;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">configure: exit 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">-----</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I found this bugzilla result:</FONT>
<BR><FONT SIZE=2 FACE="Arial"><A HREF="http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=131054" TARGET="_blank">http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=131054</A></FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">That appears to be related to my issue, if not it exactly.  No fix, though, as I guess this was to be patched?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Any assistance would be greatly appreciated.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Chris</FONT>
</P>

</BODY>
</HTML>