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,871 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

808 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