LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-07-2006, 02:30 PM   #1
buckeyesi
LQ Newbie
 
Registered: Dec 2006
Posts: 5

Rep: Reputation: 0
Unhappy 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
 
Old 12-07-2006, 02:52 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
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.
 
Old 12-07-2006, 04:50 PM   #3
buckeyesi
LQ Newbie
 
Registered: Dec 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 12-07-2006, 06:59 PM   #4
vargadanis
Member
 
Registered: Sep 2006
Posts: 248

Rep: Reputation: 30
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. (^_^)
 
Old 12-08-2006, 05:56 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-compiling PHP lumux Linux - Software 1 01-12-2004 01:25 PM
compiling PHP 4.3.4 bmw5002 Linux - Software 2 12-27-2003 02:01 PM
Compiling PHP Risen Linux - Software 3 10-13-2003 12:28 PM
compiling PHP WiWa Linux - Software 4 10-07-2003 09:16 AM
Compiling Apache2 with PHP 4.2 mambo7 Linux - Software 6 01-06-2003 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration