Greetings one and all.
I downloaded Scott's .spec and source RPM files, and have been attempting to build them.
I'm attempting to build PHP 4.4.4, and I've been able to successfully build a very base installation, I've attempted to add mhash, mcrypt, and xslt support in by forcefully including them in the .spec file.
This is a RHEL4 box, building for RHEL4 so no fancy cross compiles or similar.
From the .spec:
%define with_mhash 1
%define with_xslt 1
%define with_mcrypt 1
Everything goes fine and dandy for a good long while, but suddenly
RPM build errors:
Could not open %files file /usr/src/redhat/BUILD/php-4.4.4/files.mhash: No such file or directory
Could not open %files file /usr/src/redhat/BUILD/php-4.4.4/files.mcrypt: No such file or directory
Could not open %files file /usr/src/redhat/BUILD/php-4.4.4/files.xslt: No such file or directory
No problem, the "trouble" section is:
%if %{with_mhash}
%files mhash -f files.mhash
%endif
%if %{with_mcrypt}
%files mcrypt -f files.mcrypt
%endif
%if %{with_xslt}
%files xslt -f files.xslt
%endif
I have no idea where these files.[php extension] are built from. Taking a look it appears the other files.[php extension] are the configuration files that go in conf.d. I'm not experienced enough with RPM building (or compiling PHP) to know what, exactly, is creating these files, or failing to do so.
building PHP 4.4.4 - mhash/mcrypt/xslt failing
-
- Atomicorp Staff - Site Admin
- Posts: 8355
- Joined: Wed Dec 31, 1969 8:00 pm
- Location: earth
- Contact:
Theres no easy way to go about debugging this kind of thing, start with looking at the compiler and rpm building output, look for errors (file not found, etc). If that doesnt help, the configure script will create a config.log in a wierd location, cgi-bin, or cgi as I recall. If that doesnt help, do some manual builds, using the .spec file as a template.
Followup
Mostly because I hate unanswered threads in the off chance somebody else runs into the same issue.
The issue here was actually very simple once I actually read the .spec.
The main problem here was with the following:
%define with_mhash %{?_with_mhash:1}%{!?_with_mhash:0}
%define with_mcrypt %{?_with_mcrypt:1}%{!?_with_mcrypt:0}
"%define with_xslt %{?_with_xslt:1}%{!?_with_xslt:0}"
For a reason I have yet to determine, my %defines weren't coming through, and thus these were expanding to false. As a stopgap to get them to build I replaced these definitions (in the configure and in the "for" loop that generates the file lists and stub .ini files) with the extension names and it built without a problem.
If I remember after figuring out why my %defines didn't work out I'll post again.
And now back to your regularly scheduled programming.
Jeremy
The issue here was actually very simple once I actually read the .spec.
The main problem here was with the following:
%define with_mhash %{?_with_mhash:1}%{!?_with_mhash:0}
%define with_mcrypt %{?_with_mcrypt:1}%{!?_with_mcrypt:0}
"%define with_xslt %{?_with_xslt:1}%{!?_with_xslt:0}"
For a reason I have yet to determine, my %defines weren't coming through, and thus these were expanding to false. As a stopgap to get them to build I replaced these definitions (in the configure and in the "for" loop that generates the file lists and stub .ini files) with the extension names and it built without a problem.
If I remember after figuring out why my %defines didn't work out I'll post again.
And now back to your regularly scheduled programming.
Jeremy