Zephir method compilation error

Hey guys,

I seem to be getting this error message, when trying to compile the framework by using the zephir installation method described on github. However, the install-test method described in your alpha 1 anouncement DOES work.

This is the raw output i am getting while trying to run zephir generate and zephir build on a CentOS 6.5-64bit, with all the deps installed:

[06:26 PM]-[[email protected]]-[/tmp/cphalcon]-[git 2.0.0] 
# zephir generate
Warning: Variable 'targetBasePath' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/assets/manager.zep on 370 [conditional-initialization]

                                        let completeTargetPath = targetBasePath . collectionTargetPath;
        ----------------------------------------------------------------------------------------------^


Warning: Variable 'targetBasePath' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/assets/manager.zep on 372 [conditional-initialization]

                                        let completeTargetPath = targetBasePath;
        -----------------------------------------------------------------------^


Warning: Class "APCIterator" does not exist at compile time  in /tmp/cphalcon/phalcon/cache/backend/apc.zep on 163 [nonexistent-class]

           apc = new \APCIterator("user", prefixPattern);
        ------------------------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/cache/backend/apc.zep on 165 [nonexistent-function]

          for key, item in iterator(apc) {
        ---------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/cache/backend/file.zep on 254 [nonexistent-function]

          for item in iterator(new \DirectoryIterator(cacheDir)) {
        ---------------------------------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 207 [conditional-initialization]

          if !isset data[lastKey] {
        ------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 211 [conditional-initialization]

          let cachedContent = data[lastKey];
        -----------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in unknown on 0 [conditional-initialization]


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 245 [conditional-initialization]

          if !isset data[lastKey] {
        ------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 249 [conditional-initialization]

          let cachedContent = data[lastKey];
        -----------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in unknown on 0 [conditional-initialization]


Warning: Unreachable code in /tmp/cphalcon/phalcon/db/adapter/pdo/mysql.zep on 228 [unreachable-code]

            let definition["first"] = true;
        ----------------------------------^


Warning: Variable 'wasFresh' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/dispatcher.zep on 587 [conditional-initialization]

           if (wasFresh === true) {
        ------------------^


Warning: Function "phalcon_is_basic_charset" does not exist at compile time in /tmp/cphalcon/phalcon/escaper.zep on 97 [nonexistent-function]

          let charset = phalcon_is_basic_charset(str);
        ---------------------------------------------^


Warning: Function "phalcon_filter_alphanum" does not exist at compile time in /tmp/cphalcon/phalcon/filter.zep on 155 [nonexistent-function]

            return phalcon_filter_alphanum(value);
        -----------------------------------------^


Warning: Possible attempt to access array-index on a non-array dynamic variable in /tmp/cphalcon/phalcon/image/adapter/gd.zep on 425 [non-array-access]

             let alpha = 127 - (alpha["red"] / 2);
        -----------------------------^


Warning: Possible attempt to use non-object in "new" operator in /tmp/cphalcon/phalcon/mvc/model.zep on 579 [non-valid-new]

           let hydrate = new \stdclass();
        --------------------------------^


Warning: Unreachable code in /tmp/cphalcon/phalcon/mvc/model.zep on 917 [unreachable-code]

             let uniqueParams[] = null,
        ------------------------------^


Warning: Function "unique_key" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/manager.zep on 1397 [nonexistent-function]

           let uniqueKey = unique_key(referencedModel, arguments),
        ---------------------------------------------------------^


Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 501 [nonexistent-function]

               let escapedValue = phalcon_orm_singlequotes(value);
        ---------------------------------------------------------^


Warning: Variable 'sqlJoinConditions' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/mvc/model/query.zep on 925 [conditional-initialization]

          ];
        --^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 2789 [nonexistent-function]

          for record in iterator(records) {
        ----------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 2866 [nonexistent-function]

          for record in iterator(records) {
        ----------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 435 [nonexistent-function]

          for record in iterator(this) {
        -------------------------------^


Warning: Variable 'connection' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 483 [conditional-initialization]

           connection->commit();
        -----------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 510 [nonexistent-function]

          for record in iterator(this) {
        -------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset/complex.zep on 280 [nonexistent-function]

          for current in iterator(this) {
        --------------------------------^


Warning: Variable "connection" declared but not used in Phalcon\Mvc\Model\Transaction::commit in /tmp/cphalcon/phalcon/mvc/model/transaction.zep on 126 [unused-variable]

          var manager, connection;
        -------------------------^


Warning: Function "phalcon_get_uri" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/url.zep on 118 [nonexistent-function]

            let uri = phalcon_get_uri(phpSelf);
        --------------------------------------^


Warning: Function "phalcon_replace_paths" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/url.zep on 228 [nonexistent-function]

           return baseUri . phalcon_replace_paths(route->getPattern(), route->getReversedPaths(), uri);
        ----------------------------------------------------------------------------------------------^


Warning: Cannot mark complex expression as reference in /tmp/cphalcon/phalcon/queue/beanstalk.zep on 74 [invalid-reference]

          let connection = fsockopen(parameters["host"], parameters["port"], null, null);
        --------------------------------------------------------------------------------^


Warning: Cannot mark complex expression as reference in /tmp/cphalcon/phalcon/queue/beanstalk.zep on 74 [invalid-reference]

          let connection = fsockopen(parameters["host"], parameters["port"], null, null);
        --------------------------------------------------------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/validation/message/group.zep on 165 [nonexistent-function]

           for message in iterator(messages) {
        -------------------------------------^


Copying new kernel files...

[06:27 PM]-[[email protected]]-[/tmp/cphalcon]-[git 2.0.0] 
# zephir compile
Warning: Variable 'targetBasePath' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/assets/manager.zep on 370 [conditional-initialization]

                                        let completeTargetPath = targetBasePath . collectionTargetPath;
        ----------------------------------------------------------------------------------------------^


Warning: Variable 'targetBasePath' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/assets/manager.zep on 372 [conditional-initialization]

                                        let completeTargetPath = targetBasePath;
        -----------------------------------------------------------------------^


Warning: Class "APCIterator" does not exist at compile time  in /tmp/cphalcon/phalcon/cache/backend/apc.zep on 163 [nonexistent-class]

           apc = new \APCIterator("user", prefixPattern);
        ------------------------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/cache/backend/apc.zep on 165 [nonexistent-function]

          for key, item in iterator(apc) {
        ---------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/cache/backend/file.zep on 254 [nonexistent-function]

          for item in iterator(new \DirectoryIterator(cacheDir)) {
        ---------------------------------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 207 [conditional-initialization]

          if !isset data[lastKey] {
        ------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 211 [conditional-initialization]

          let cachedContent = data[lastKey];
        -----------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in unknown on 0 [conditional-initialization]


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 245 [conditional-initialization]

          if !isset data[lastKey] {
        ------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/cache/backend/memory.zep on 249 [conditional-initialization]

          let cachedContent = data[lastKey];
        -----------------------------------^


Warning: Variable 'lastKey' was assigned for the first time in conditional branch, consider initialize it at its declaration in unknown on 0 [conditional-initialization]


Warning: Unreachable code in /tmp/cphalcon/phalcon/db/adapter/pdo/mysql.zep on 228 [unreachable-code]

            let definition["first"] = true;
        ----------------------------------^


Warning: Variable 'wasFresh' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/dispatcher.zep on 587 [conditional-initialization]

           if (wasFresh === true) {
        ------------------^


Warning: Function "phalcon_is_basic_charset" does not exist at compile time in /tmp/cphalcon/phalcon/escaper.zep on 97 [nonexistent-function]

          let charset = phalcon_is_basic_charset(str);
        ---------------------------------------------^


Warning: Function "phalcon_filter_alphanum" does not exist at compile time in /tmp/cphalcon/phalcon/filter.zep on 155 [nonexistent-function]

            return phalcon_filter_alphanum(value);
        -----------------------------------------^


Warning: Possible attempt to access array-index on a non-array dynamic variable in /tmp/cphalcon/phalcon/image/adapter/gd.zep on 425 [non-array-access]

             let alpha = 127 - (alpha["red"] / 2);
        -----------------------------^


Warning: Possible attempt to use non-object in "new" operator in /tmp/cphalcon/phalcon/mvc/model.zep on 579 [non-valid-new]

           let hydrate = new \stdclass();
        --------------------------------^


Warning: Unreachable code in /tmp/cphalcon/phalcon/mvc/model.zep on 917 [unreachable-code]

             let uniqueParams[] = null,
        ------------------------------^


Warning: Function "unique_key" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/manager.zep on 1397 [nonexistent-function]

           let uniqueKey = unique_key(referencedModel, arguments),
        ---------------------------------------------------------^


Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 501 [nonexistent-function]

               let escapedValue = phalcon_orm_singlequotes(value);
        ---------------------------------------------------------^


Warning: Variable 'sqlJoinConditions' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/mvc/model/query.zep on 925 [conditional-initialization]

          ];
        --^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 2789 [nonexistent-function]

          for record in iterator(records) {
        ----------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/query.zep on 2866 [nonexistent-function]

          for record in iterator(records) {
        ----------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 435 [nonexistent-function]

          for record in iterator(this) {
        -------------------------------^


Warning: Variable 'connection' was assigned for the first time in conditional branch, consider initialize it at its declaration in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 483 [conditional-initialization]

           connection->commit();
        -----------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset.zep on 510 [nonexistent-function]

          for record in iterator(this) {
        -------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/model/resultset/complex.zep on 280 [nonexistent-function]

          for current in iterator(this) {
        --------------------------------^


Warning: Variable "connection" declared but not used in Phalcon\Mvc\Model\Transaction::commit in /tmp/cphalcon/phalcon/mvc/model/transaction.zep on 126 [unused-variable]

          var manager, connection;
        -------------------------^


Warning: Function "phalcon_get_uri" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/url.zep on 118 [nonexistent-function]

            let uri = phalcon_get_uri(phpSelf);
        --------------------------------------^


Warning: Function "phalcon_replace_paths" does not exist at compile time in /tmp/cphalcon/phalcon/mvc/url.zep on 228 [nonexistent-function]

           return baseUri . phalcon_replace_paths(route->getPattern(), route->getReversedPaths(), uri);
        ----------------------------------------------------------------------------------------------^


Warning: Cannot mark complex expression as reference in /tmp/cphalcon/phalcon/queue/beanstalk.zep on 74 [invalid-reference]

          let connection = fsockopen(parameters["host"], parameters["port"], null, null);
        --------------------------------------------------------------------------------^


Warning: Cannot mark complex expression as reference in /tmp/cphalcon/phalcon/queue/beanstalk.zep on 74 [invalid-reference]

          let connection = fsockopen(parameters["host"], parameters["port"], null, null);
        --------------------------------------------------------------------------------^


Warning: Function "iterator" does not exist at compile time in /tmp/cphalcon/phalcon/validation/message/group.zep on 165 [nonexistent-function]

           for message in iterator(messages) {
        -------------------------------------^


Preparing for PHP compilation...
Preparing configuration file...
Compiling...
/tmp/cphalcon/ext/kernel/object.c: In function ‘zephir_read_property’:
/tmp/cphalcon/ext/kernel/object.c:469: warning: passing argument 2 of ‘zephir_lookup_class_ce’ discards qualifiers from pointer target type
/tmp/cphalcon/ext/kernel/object.c:444: note: expected ‘char *’ but argument is of type ‘const char *’
/tmp/cphalcon/ext/kernel/object.c: In function ‘zephir_update_property_array’:
/tmp/cphalcon/ext/kernel/object.c:1078: warning: passing argument 2 of ‘zephir_update_property_zval’ discards qualifiers from pointer target type
/tmp/cphalcon/ext/kernel/object.c:851: note: expected ‘char *’ but argument is of type ‘const char *’


81.8k

I'll take a look at these compilation problems soon



355

Same problem using Linux 3.13.0-35-generic x86_64.