ID:               17996
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         Compile Failure
 Operating System: AIX 4.3.3
 PHP Version:      4.3.0-dev
 New Comment:

Our PHP 4.3.0 build failed to compile sapi/cli/php on our AIX machine,
with over one hundred error messages like:

cc: 1501-218 file ext/ctype/ctype.lo contains an incorrect file suffix

The causes of this are rather subtle:

1. GNU libtool will usually not create static objects under AIX.

2. But the PHP developers want libtool to create static objects.

3. So the PHP developers provide their own ./libtool in the source
   tree which will create them, which they run with "/bin/sh libtool".

4. Unfortunately, while "/bin/sh <file>" usually looks for <file> in
   the current directory before searching through $PATH, on AIX it
   looks through $PATH first; thus the PHP Makefile winds up running
   /usr/local/bin/libtool (or wherever you have it installed) instead.

Thus the solution is to modify the PHP Makefile so that the line

   LIBTOOL = $(SHELL) libtool --silent

instead reads

   LIBTOOL = $(SHELL) ./libtool --silent

Technical notes: When you compile and install libtool, it runs a
script called libtool.m4 which, around line 2363 in the libtool-1.4.3
source, disables AIX static linking with the explanation that:

   "On AIX, shared libraries and static libraries use the same
   namespace, and are all built from PIC."

It disables static linking by setting enable_static=no when it writes
your libtool script; the ./libtool script in the PHP build directory
works precisely because this variable is set to "yes" instead.


Previous Comments:
------------------------------------------------------------------------

[2002-12-12 06:39:33] [EMAIL PROTECTED]

Ignore that last post, being a bit of a muppet, using the wrong
version.

------------------------------------------------------------------------

[2002-12-12 04:25:10] [EMAIL PROTECTED]

I've exactly the same problem, same version of AIX etc.  I have apache
2.0.43 installed and am using php 4.2.3.  Is this a compiler issue? Or
is it worth while trying 4.3.0RC3

I need to get this working fairly desperately.  So any help is
welcome.

Thanks

Julian

------------------------------------------------------------------------

[2002-08-08 13:07:58] [EMAIL PROTECTED]

This is not a problem in PHP, but a problem with your (configuration of
your) system. Please ask support questions on the appropriate
mailinglist.

------------------------------------------------------------------------

[2002-08-08 12:54:33] [EMAIL PROTECTED]

I would like to believe you but although it says "Target all is up to
date" the file it is looking for (libs/libphp4.so) hasn't been created.

------------------------------------------------------------------------

[2002-08-08 11:58:16] [EMAIL PROTECTED]

Glad to hear the bug is fixed, but your new problem is an end user
problem, not a PHP bug.  Please figure out your installation, and where
you want things to go.  If you still have trouble with that, ask on the
php-general list for help.  

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/17996

-- 
Edit this bug report at http://bugs.php.net/?id=17996&edit=1

Reply via email to