Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: zend_std_call_user_call in Unknown on line 0 #1148

Closed
fanybook opened this issue Dec 18, 2015 · 6 comments
Closed

undefined symbol: zend_std_call_user_call in Unknown on line 0 #1148

fanybook opened this issue Dec 18, 2015 · 6 comments

Comments

@fanybook
Copy link

namespace Test;

class demo
{
    protected static instance;
    protected config = [];

    public function __construct()
    {
        array ini_config = [
            "aaa" : 111,
            "bbb" : 222,
            "ccc" : 333
        ];

        let this->config = ini_config;
    }

    public function dumpConfig()
    {
        var_dump(this->config);
    }

    public static function __callStatic(var method, array args)
    {
        if is_null(self::instance) {
            let self::instance = new self();
        }

        var instance = self::instance;

        switch count(args) {
            case 0:
                return instance->{method}();

            case 1:
                return instance->{method}(args[0]);

            case 2:
                return instance->{method}(args[0], args[1]);

            case 3:
                return instance->{method}(args[0], args[1], args[2]);

            case 4:
                return instance->{method}(args[0], args[1], args[2], args[3]);

            default:
                array func = [instance, method];
                return call_user_func_array(func, args);
        }
    }
}

this problem is because the "call_user_func_array"?

@fanybook
Copy link
Author

my php's version is 7.0
when build

Compiling the parser...
/zephir/parser/parser/parser.c: In function 'yy_reduce':
/zephir/parser/parser/parser.c:8763:2: warning: passing argument 2 of 'xx_ret_scall' from incompatible pointer type [enabled by default]
  yygotominor.yy132 = xx_ret_scall(0, yymsp[-6].minor.yy0, 1, yymsp[-3].minor.yy0, NULL, status->scanner_state);
  ^
/zephir/parser/parser/parser.c:1189:14: note: expected 'char *' but argument is of type 'struct xx_parser_token *'
 static zval *xx_ret_scall(int dynamic_class, char *class_name, int dynamic_method, xx_parser_token *M, zval *parameters, xx_scanner_state *state)
              ^
/zephir/parser/parser/parser.c:8775:2: warning: passing argument 2 of 'xx_ret_scall' from incompatible pointer type [enabled by default]
  yygotominor.yy132 = xx_ret_scall(0, yymsp[-7].minor.yy0, 1, yymsp[-4].minor.yy0, yymsp[-1].minor.yy132, status->scanner_state);
  ^
/zephir/parser/parser/parser.c:1189:14: note: expected 'char *' but argument is of type 'struct xx_parser_token *'
 static zval *xx_ret_scall(int dynamic_class, char *class_name, int dynamic_method, xx_parser_token *M, zval *parameters, xx_scanner_state *state)
              ^
/zephir/parser/parser/parser.c: In function 'xx_parse_program':
/zephir/parser/parser/parser.c:9352:3: warning: return makes pointer from integer without a cast [enabled by default]
   return SUCCESS;
   ^
/zephir/parser/parser/scanner.c: In function 'xx_get_token':
/zephir/parser/parser/scanner.c:1274:4: warning: incompatible implicit declaration of built-in function 'free' [enabled by default]
    free(token->value);
    ^

@fanybook
Copy link
Author

#1140

i build #1140 's code, has a same PHP Warning

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/ice.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/ice.so: undefined symbol: zend_std_call_user_call in Unknown on line 0

@steffengy
Copy link
Contributor

Cannot reproduce.
Probably you just compiled using a PHP5 without a specified backend?

@mruz
Copy link
Contributor

mruz commented Dec 21, 2015

The #1148 (comment) is related to #1142. What is your environment?
Also there is a some troubles with array fetching on PHP7 #1140.

@Izopi4a
Copy link
Contributor

Izopi4a commented Jan 21, 2016

i think i got it.

go to zephir/parser ( directory )

make clean
phpize --clean
phpize // this shouild php7 phpize, or user /opt/php7/bin/phpize
./configure # or ./configure --with-php-config=_PATH_TO_php-config 

after that it will compile normally.

@steffengy
Copy link
Contributor

Since there really aren't any other people with this issue and travis passes
without problems, this has to be some local issue of any sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants