Home Help Center

Couldn't compile IcePHP properly after i have ICE setup via yum(centos 5)

rolypolyrolypoly Member Joseph TanOrganization: MumblevoiceProject: Voice Auth. application using ICE & ICEPHP
Hi guys,

I am having some problem compiling icephp.

I have install ICE using yum as describe over at http://www.zeroc.com/download.html on my centos 5 server.

I went to run

in my icePHP directory, i run the following command and follow by "make"
[[email protected] IcePHP-3.2.0]# export ICE_HOME=/usr

"make" generate the following error:

[[email protected] IcePHP-3.2.0]# make
making all in src
make[1]: Entering directory `/root/IcePHP-3.2.0/src'
making all in IcePHP
make[2]: Entering directory `/root/IcePHP-3.2.0/src/IcePHP'
c++ -c -I.  -I/usr/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM  -ftemplate-depth-128 -Wall -D_REENTRANT -fPIC -g  Communicator.cpp
Communicator.cpp:10:37: error: IceUtil/DisableWarnings.h: No such file or directory
In file included from ./Communicator.h:13,
                 from Communicator.cpp:11:
./Config.h:19:21: error: Ice/Ice.h: No such file or directory
./Config.h:20:26: error: Slice/Parser.h: No such file or directory
./Config.h:32:17: error: php.h: No such file or directory
./Config.h:33:21: error: php_ini.h: No such file or directory
./Config.h:34:31: error: ext/standard/info.h: No such file or directory
./Config.h:35:29: error: zend_interfaces.h: No such file or directory
./Config.h:36:29: error: zend_exceptions.h: No such file or directory
./Config.h:42: error: 'zend_module_entry' does not name a type
./Config.h:55: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:56: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:57: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:58: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:59: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:61: error: expected constructor, destructor, or type conversion before '(' token
./Config.h:67: error: expected constructor, destructor, or type conversion before '(' token
./Communicator.h:47: error: 'TSRMLS_D' was not declared in this scope
./Communicator.h:49: error: 'TSRMLS_D' was not declared in this scope
./Communicator.h:50: error: 'Ice' has not been declared
./Communicator.h:50: error: expected constructor, destructor, or type conversion before 'getCommunicator'
./Communicator.h:51: error: expected constructor, destructor, or type conversion before '*' token
./Proxy.h:20: error: expected constructor, destructor, or type conversion before '(' token

Doing a "locate" show that ice is install at:

/usr/share/Ice-3.3.1



Any idea what is wrong?

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You're not using the correct IcePHP version to compile with Ice 3.3.1. You should instead use the IcePHP source from the Ice-3.3.1 source distribution (since Ice 3.3.0, we no longer provide a separate package for IcePHP, it's now included in the main Ice source distribution).

    You can download the Ice source distribution from our download page.

    To build IcePHP using the Ice binary distribution installed in /usr, you can do the following:
    $ tar zxvf Ice-3.3.1.tar.gz
    $ cd Ice-3.3.1/php
    $ export ICE_HOME=/usr
    $ make
    

    Before starting the build, you should also review the settings from the Ice-3.3.1/php/config/Make.rules file, see php/INSTALL for more information.

    Cheers,
    Benoit.
  • rolypolyrolypoly Member Joseph TanOrganization: MumblevoiceProject: Voice Auth. application using ICE & ICEPHP
    Hello,

    I got this message when try to run "make"
    [[email protected] Ice-3.3.1]# cd php
    [[email protected] php]# export ICE_HOME=/usr
    [[email protected] php]#
    [[email protected] php]# make
    ../config/Make.common.rules:109: *** Unable to find slice2cpp in /usr/bin, please verify ICE_HOME is properly configured and Ice is correctly installed..  Stop.
    

    i know i have install ICE via yum on the server. why it couldn't find slice2cpp?
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Is slice2cpp in /usr/bin?
  • rolypolyrolypoly Member Joseph TanOrganization: MumblevoiceProject: Voice Auth. application using ICE & ICEPHP
    matthew wrote: »
    Is slice2cpp in /usr/bin?

    Hello,

    nope. there isn't any slice2cpp in /usr/bin

    :(

    so strange.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Then you haven't installed the C++ development environment. Install the ice-c++-devel-3.3.1 RPM.

    BTW, why do you want to compile from source anyway? There is an php RPM available pre-compiled for this platform (ice-php-3.3.1).
  • rolypolyrolypoly Member Joseph TanOrganization: MumblevoiceProject: Voice Auth. application using ICE & ICEPHP
    Hi Matt,

    Thanks for your reply.

    I have slice2cpp in my /usr/bin now.

    When i run "make", it give me the following error:
    [[email protected] php]# make
    ../config/Make.common.rules:112: Found slice2cpp in both ICE_HOME/bin and ./../cpp/bin, ICE_HOME/bin/slice2cpp will be used!
    making all in src
    make[1]: Entering directory `/root/Ice-3.3.1/php/src'
    ../../config/Make.common.rules:112: Found slice2cpp in both ICE_HOME/bin and ../../cpp/bin, ICE_HOME/bin/slice2cpp will be used!
    making all in IcePHP
    make[2]: Entering directory `/root/Ice-3.3.1/php/src/IcePHP'
    ../../../config/Make.common.rules:112: Found slice2cpp in both ICE_HOME/bin and ../../../cpp/bin, ICE_HOME/bin/slice2cpp will be used!
    c++ -c -I.  -I/usr/include -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM  -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g  Communicator.cpp
    In file included from ./Communicator.h:13,
                     from Communicator.cpp:11:
    ./Config.h:40:17: error: php.h: No such file or directory
    ./Config.h:41:21: error: php_ini.h: No such file or directory
    ./Config.h:42:31: error: ext/standard/info.h: No such file or directory
    ./Config.h:43:29: error: zend_interfaces.h: No such file or directory
    ./Config.h:44:29: error: zend_exceptions.h: No such file or directory
    ./Config.h:50: error: 'zend_module_entry' does not name a type
    ./Config.h:63: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:64: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:65: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:66: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:67: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:69: error: expected constructor, destructor, or type conversion before '(' token
    ./Config.h:75: error: expected constructor, destructor, or type conversion before '(' token
    ./Communicator.h:51: error: expected constructor, destructor, or type conversion before '(' token
    ./Communicator.h:52: error: expected constructor, destructor, or type conversion before '(' token
    ./Communicator.h:62: error: 'TSRMLS_D' was not declared in this scope
    ./Communicator.h:64: error: 'TSRMLS_D' was not declared in this scope
    ./Communicator.h:65: error: 'TSRMLS_D' was not declared in this scope
    ./Communicator.h:66: error: expected constructor, destructor, or type conversion before '*' token
    ./Proxy.h:20: error: expected constructor, destructor, or type conversion before '(' token
    ./Proxy.h:21: error: expected constructor, destructor, or type conversion before '(' token.
    .
    .
    
    ./Proxy.h:153: error: 'TSRMLS_D' was not declared in this scope
    ./Proxy.h:155: error: 'zval' was not declared in this scope
    ./Proxy.h:155: error: expected primary-expression before ',' token
    ./Proxy.h:155: error: expected primary-expression before 'const'
    ./Proxy.h:155: error: initializer expression list treated as compound expression
    ./Proxy.h:156: error: redefinition of 'bool IcePHP::createProxy'
    ./Proxy.h:155: error: 'bool IcePHP::createProxy' previously defined here
    ./Proxy.h:156: error: 'zval' was not declared in this scope
    ./Proxy.h:156: error: expected primary-expression before ',' token
    ./Proxy.h:156: error: expected primary-expression before 'const'
    ./Proxy.h:156: error: expected primary-expression before 'const'
    
    

    I know i have php on my server:
    [[email protected] php]# php -v
    PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:04)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Your work is not complete yet though :) You need to install the php-devel RPM to build PHP extensions.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Also, why not use the ice-php RPM on this system?
     # yum install ice-php
    

    Best regards,
    Bernard
  • rolypolyrolypoly Member Joseph TanOrganization: MumblevoiceProject: Voice Auth. application using ICE & ICEPHP
    matthew wrote: »
    Your work is not complete yet though :) You need to install the php-devel RPM to build PHP extensions.

    ah, i see.
    finally got passed the "make install".

    I went to restart apache and run "php -m" .
    ice isn't listed.

    Am i using the correct method to check? :o

    bernard wrote: »
    Also, why not use the ice-php RPM on this system?
     # yum install ice-php
    

    Best regards,
    Bernard

    *fainted* that could have save a day of my hardwork. :D
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    From the INSTALL file
    You can verify that the Ice extension is installed properly by
    examining the output of the "php -m" command, or by calling the
    phpInfo() function from a script. For example, you can create a file
    in the Web server's document directory containing the following PHP
    script:

    <?php
    phpInfo();
    ?>

    If you don't see the ice section among the configuration information, the plugin is not installed correctly. In that case, you should check your Apache log file, and see what the issue is. Most likely the problem is that the Ice shared libraries are not accessible for some reason (permissions, wrong location, etc).
Sign In or Register to comment.