Solved

PHP 4.3.1 "make" failing with "collect2: ld returned 1 exit status" "make: *** [sapi/cli/php] Error 1"

Posted on 2003-10-30
7
7,830 Views
Last Modified: 2013-12-13
I am attempting to install PHP 4.3.1 on a RedHat Linux 9.0 server. I'm running Apache 2.0.48. I am attempting to execute the installation using the following syntax:

./configure --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib

The configure process works fine no errors. The tail end of the "make" process results in the following:

ext/mysql/libmysql/my_tempnam.lo(.text+0x4c): In function `my_tempnam':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp'
ext/mysql/libmysql/my_lib.lo(.text+0x3d1): In function `my_dir':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_lib.c:169: undefined reference to `errno'
ext/mysql/libmysql/my_lib.lo(.text+0x5ef): In function `my_stat':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_lib.c:588: undefined reference to `errno'
ext/mysql/libmysql/my_malloc.lo(.text+0xde): In function `my_malloc':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_malloc.c:24: undefined reference to `errno'
ext/mysql/libmysql/my_realloc.lo(.text+0xd5): In function `my_realloc':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_realloc.c:44: undefined reference to `errno'
ext/mysql/libmysql/my_delete.lo(.text+0x86): In function `my_delete':
/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_delete.c:16: undefined reference to `errno'
ext/mysql/libmysql/my_tempnam.lo(.text+0x89):/usr/local/src/php/php-4.3.1/ext/mysql/libmysql/my_tempnam.c:108: more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

I also tried running the "configure" without the "--with-zlib" option but it didn't make a difference.

Can you help?

Thanks!

-Samson
0
Comment
Question by:smartine
7 Comments
 
LVL 14

Accepted Solution

by:
ThG earned 105 total points
ID: 9654225

very weird. Do other programs compile correctly?
Completely wiping out the php directory and unpacking original sources again might help..
0
 
LVL 3

Expert Comment

by:red010knight
ID: 9657897
You may want to put this question to the Linux Gurus as well, because the problem may be something more inherent to Linux than PHP

Red010Knight
0
 

Author Comment

by:smartine
ID: 9670667
Thanks! Yes, all other apps (rrdtool, apache, etc.) compiled with no problem at all. I'll try starting from scratch again to see if it makes a difference.

Thanks again.

-Samson
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:smartine
ID: 9671844
I proceeded to install 4.3.3 (still not sure why I was installing 4.3.1..:) ) and the process was seamless, no problems whatsoever. Still not sure why 4.3.1 was failing but, oh well... Thanks for your assistance.

-Samson
0
 
LVL 14

Expert Comment

by:ThG
ID: 9675252
Good. Did you try again with 4.3.1? same results?
that's weird.. anyway new releases happen because bugs are found in previous releases, so if everything is working fine now you can forget about it (and close the question)
0
 

Author Comment

by:smartine
ID: 9678573
No, I didn't try again with 4.3.1 due to time constraints. I had to get this going as quickly as possible, along with a million other things. How do I go about closing the question properly, given that there are 3 comments with "accept" possibilities?

Thanks!

-Samson
0
 
LVL 6

Expert Comment

by:aolXFT
ID: 9706611
If you think one of the comments was an answer to your question, you should accept the comment with an A Grade.*

If you think one of the comments led you to investigate installing php 4.3.3, then accept it with a B-Grade.*

If you think you answered your own question(which would seem to be the case) you can ask the CS Section to close the question for you and refund the points.

* This is my personal interpretion of the EE Rules only. I don't guarntee it to the only/correct one.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Password forgotten. 3 39
<? versus <?php 5 35
highcharts wont fix inside a bootstrap modal window 6 25
Website Interactive tool that will do calculations 3 22
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now