LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with compiling PHP in RH 3.4.6-3 (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-compiling-php-in-rh-3-4-6-3-a-508306/)

buckeyesi 12-07-2006 02:30 PM

Help with compiling PHP in RH 3.4.6-3
 
I am a newbie both to system admin and Linux but have been asked to help take care of a Linux server. I am a little over my head with this so any help would be great.

Basically, I'm trying to compile PHP 4.3.9 on Red Hat 3.4.6-3 and am getting the following error when I execute rpmbuild -bb php.spec

#define PHP_FCGI_STATIC 0
#define PHP_SAFE_MODE 0
#define PHP_SAFE_MODE_EXEC_DIR "/usr/bin"
#define PHP_SIGCHILD 0
#define PHP_WRITE_STDOUT 1
#define SIZEOF_INT 4
#define SIZEOF_LONG 8
#define STDC_HEADERS 1
#define WITH_BCMATH 1
#define YYTEXT_POINTER 1
#endif
#ifdef __cplusplus
extern "C" void std::exit (int) throw (); using std::exit;

configure: exit 1
+ make -j4
make: *** No targets specified and no makefile found. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.27226 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.27226 (%build)

The code in the spec file is not something I'm familiar with at all since I only have very limited linux knowledge. I know the error wants a makefile and target for the make command but from what I can tell there's something else that may be affecting it. Any ideas where I should start looking?

I can post my spec file later when I have more time but any ideas would be helpful since I'm really out of my league here :confused: :scratch:

Lenard 12-07-2006 02:52 PM

Start again, which version of the php src.rpm file did you download and from where????

What is Red Hat 3.4.6-3 really, perhaps your thinking about the gcc version 3.4.6-3 which is part of RHEL 4?? cat /etc/*release

And why bother compiling???? If you have a valid license then simply use up2date to upgrade. Or consider switching to CentOS or Scientific Linux both of which are 100% binary compatible clones of RHEL.

buckeyesi 12-07-2006 04:50 PM

Ok....I guess it is Red Hat 4. Like I said, I am really new to Linux so most of the terminology is lost on me right now. Please reply keeping this in mind. That is why I posted in the NEWBIE section. I am a student who was hired as a part time sysadmin to help lessen the burden on the regular guy. I was just thrown into the fire, so to speak.

Anyways...the task given to me was to re-compile PHP b/c there were some new modules that were needed. I have no idea about other means of getting it to work, all I know is that is what they want me to do. Actually, if I can't figure someething out I've been told to call Red Hat. But, if I can get this to work asap then that would be great.

I did a search but I couldn't really find anything that helped. Any other suggestions? I need to get this task done.

Thanks,

Dave

vargadanis 12-07-2006 06:59 PM

I suggest you to use packagesinstead of compiling the package first. There are tons of PHP, Apache, MySQL packages out there in RPM format that you can use.
Visit rpmfind.net and try to use rpm -i instead. (^_^)

Lenard 12-08-2006 05:56 AM

You should have all the php rpm's needed on the Installation media, which packages do you need?? For example from the RHEL5 Beta2 client DVD;

$ ls -al php*
-rw-r--r-- 1 lenard lenard 1298340 Oct 5 19:38 php-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 31022 Oct 5 19:38 php-bcmath-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 2427572 Oct 5 19:38 php-cli-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 141332 Oct 5 19:38 php-common-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 37670 Oct 5 19:38 php-dba-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 520825 Oct 5 19:38 php-devel-5.1.6-3.i386.rpm
-rw-r--r-- 1 lenard lenard 519888 Oct 5 19:38 php-devel-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 112303 Oct 5 19:38 php-gd-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 51070 Oct 5 19:38 php-imap-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 33271 Oct 5 19:38 php-ldap-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 996929 Oct 5 19:38 php-mbstring-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 86726 Oct 5 19:38 php-mysql-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 39039 Oct 5 19:38 php-ncurses-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 50787 Oct 5 19:39 php-odbc-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 62738 Oct 5 19:39 php-pdo-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 363578 Sep 11 20:24 php-pear-1.4.9-4.noarch.rpm
-rw-r--r-- 1 lenard lenard 67304 Oct 5 19:39 php-pgsql-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 26487 Oct 5 19:39 php-snmp-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 136935 Oct 5 19:39 php-soap-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 99369 Oct 5 19:39 php-xml-5.1.6-3.x86_64.rpm
-rw-r--r-- 1 lenard lenard 53970 Oct 5 19:39 php-xmlrpc-5.1.6-3.x86_64.rpm


All times are GMT -5. The time now is 07:54 AM.