[PHP-users 1138] Re: libphp4.so が作成できません

Noboru Sasaki php-users@php.gr.jp
Thu, 9 Aug 2001 17:29:32 +0900


佐々木と申します

At 2:13 PM +0900 01.8.9, 土屋賢治 wrote:
>PHP4のインストールをしようとしたのですが
>configureに--with-apxs=/usr/local/apache/bin/apxs
>の文を加えるとmakeの時にエラーで止まってしまいます。

PHPのFAQに下記の記述がありますが、該当しませんか?
-------------------------------------------
11.  When I try to build PHP using --with-apxs  I get strange error messages.

There are three things to check here. First, for some reason when Apache builds the apxs Perl script, it sometimes ends up getting built without the proper compiler and flags variables. Edit your apxs (sometimes found in /usr/local/apache/bin/apxs or /usr/sbin/apxs) and check for these lines:

my $CFG_CFLAGS_SHLIB  = ' ';      # substituted via Makefile.tmpl
my $CFG_LD_SHLIB      = ' ';          # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = ' ';      # substituted via Makefile.tmpl
     

If this is what you see, you have found your problem. Change these lines to say:

my $CFG_CFLAGS_SHLIB  = '-fpic -DSHARED_MODULE';      # substituted via Makefile.tmpl
my $CFG_LD_SHLIB      = 'gcc';          # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(-shared);# substituted via Makefile.tmpl
     

The second possible problem should only be an issue on RedHat-6.1/6.2. The apxs script RedHat ships is broken. Look for this line:

my $CFG_LIBEXECDIR    = 'modules';        # substituted via APACI install
     

If you see the above line, change it to this:

my $CFG_LIBEXECDIR    = '/usr/lib/apache';        # substituted via APACI install
     

Last, if you reconfigure/reinstall Apache, add a 'make clean' to the process after './configure' and before 'make'.

-------------------------------------------
-- 
---nsasaki@vegalta.net  佐々木 昇