1

I'm trying to install a PHP module, which requires phpize and I'm being met with a warning, even though it exists and is installed.

Cannot find config.m4.Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

So, I've tried running phpize from both root, with /usr/bin/phpize and just # phpize, still met with the same warning.

My PHP modules are stored in usr/lib64/php/modules/ so I've tried running phpize from there, still the same warning.

php-devel is installed:

Package php-devel-5.3.3-14.el6_3.x86_64 already installed and latest version
Nothing to do

which phpize yields this - /usr/bin/phpize

find -name 'config.m4' yields this - find: File system loop detected; ./var/named/chroot/var/named' is part of the same file system loop as ./var/named'.

So, I'm assuming config.m4 either isn't in the same directory phpize is running from, or that loop error I'm getting is causing it to be hidden/not found, etc.

Any insight would be greatly appreciated, SF.

Edit: I'm trying to build saprfc.sourceforge.net

RCNeil
  • 615
  • 3
  • 9
  • 17

2 Answers2

2

config.m4 should be in the current working directory of the extension you are trying to build.

So when you've downloaded the source PECL package, you would do it something like this

cd /usr/src
wget -O mypackage.tgz http://downloads.sourceforge.net/project/saprfc/saprfc/1.4.1/saprfc-1.4.1.tar.gz?r=http%3A%2F%2Fsaprfc.sourceforge.net%2Fhome.php&ts=1349204180&use_mirror=heanet
tar xvfz mypackage.tgz
cd saprfc*
phpize
./configure
make
make install

If you try and run phpize in another directory that isn't the source directory of a PHP extension; then of course it will complain that config.m4 is missing.

Ben Lessani
  • 5,244
  • 17
  • 37
  • Spot on. I guess what I don't get is that when I `cd /usr/lib64/php/modules/saprfc/`, aren't I in the correct source directory of a PHP extension at that point? – RCNeil Oct 02 '12 at 19:02
  • Only if you downloaded the source to that location, otherwise, no. – Ben Lessani Oct 02 '12 at 19:03
  • 1
    Hm, I thought I did. I had it placed in /usr/lib64/php/modules/saprfc/ and tried `phpize` from in there, but was met with that error. Not sure why, total noob here, but thank you for the directions! They were perfect... except that the install failed because it's dependent on another package. Fixed my problem though! Thanks! – RCNeil Oct 02 '12 at 19:10
1

Make sure that config.m4 is in the directory that contains the PHP module you are building. If not, then something is missing when you extracted it.

In regards to "file system loop detected" with your find command. Try using locate instead. For me it's a lot easier when doing simple file searches. Just make sure you do a updatedb first to update it's database.

Ken S.
  • 479
  • 5
  • 14