Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 102040

Summary: php rpmbuild from srpm fails
Product: [Retired] Red Hat Linux Beta Reporter: Shekhar <shekhar.tiwatne>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: beta1CC: shekhar.tiwatne
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:58:03 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: 100643    

Description Shekhar 2003-08-09 13:59:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
1. rpmbuild for php-4.3.2-6 as _normal user_ with '--with-pear' option fails as
with this option rpmbuild tries to create files into /usr/share which requires
root premissions
-> rpmbuild works when .spec modified as follows
  --with-pear=/usr/share/pear - > --with-pear
		
2. [most imp] rpmbuild for php-4.3.2-6 fails with foll. errors

In file included from /home/shekhar/rpm/BUILD/php-4.3.2/ext/snmp/snmp.c:84:
/usr/include/ucd-snmp/asn1.h:7:2: #error "Please update your headers or
configure using --enable-ucd-snmp-compatibility"
In file included from /home/shekhar/rpm/BUILD/php-4.3.2/ext/snmp/snmp.c:85:
/usr/include/ucd-snmp/snmp_api.h:7:2: #error "Please update your headers or
configure using --enable-ucd-snmp-compatibility"

3. rpmbuild for php-4.3.2-6 fails at build stage as it can not find file
build-apache/libs/libphp4.so.
-> The file actually resides at build-apache/.libs/libphp4.so
   It works with foll. changes

Here is the diif -uNr

--- /usr/src/redhat/SPECS/php.spec      2003-07-08 15:41:25.000000000 +0530
+++ php.spec    2003-08-09 20:51:52.000000000 +0530

@@ -395,8 +393,10 @@
 install -m 644    *.gif $RPM_BUILD_ROOT%{contentdir}/icons/

 # install the DSO
-install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules
-install -m 755 build-apache/libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules
+#install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules
+#install -m 755 build-apache/libs/libphp4.so
$RPM_BUILD_ROOT%{_libdir}/httpd/modules
+install -m 755 -d $RPM_BUILD_ROOT/usr/lib/apache
+install -m 755 build-apache/.libs/libphp4.so $RPM_BUILD_ROOT/usr/lib/apache



Version-Release number of selected component (if applicable):
php-4.3.2-6

How reproducible:
Always

Steps to Reproduce:
1. rpmbuild for php-4.3.2-6 as _normal user_ 
2.
3.
    

Actual Results:  In file included from
/home/shekhar/rpm/BUILD/php-4.3.2/ext/snmp/snmp.c:84:
/usr/include/ucd-snmp/asn1.h:7:2: #error "Please update your headers or
configure using --enable-ucd-snmp-compatibility"
................
In file included from /home/shekhar/rpm/BUILD/php-4.3.2/ext/snmp/snmp.c:85:
/usr/include/ucd-snmp/snmp_api.h:7:2: #error "Please update your headers or
configure using --enable-ucd-snmp-compatibility"
................


Additional info:

Comment 1 Shekhar 2003-08-25 10:10:58 UTC
#2 [snmp] can be resolved by modifying foll. in spec file
CFLAGS="$RPM_OPT_FLAGS -fPIC -DUCD_COMPATIBLE"; export CFLAGS

Comment 2 Joe Orton 2003-09-07 22:16:00 UTC
Installing net-snmp-utils is the other workaround.

*** This bug has been marked as a duplicate of 103927 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:58:03 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.