rocketmq-client-php icon indicating copy to clipboard operation
rocketmq-client-php copied to clipboard

Symbol not found: __ZN12PullConsumer12getGroupNameEv

Open ksimka opened this issue 5 years ago • 2 comments

Built the extension on MacOS Catalina, PHP 7.4.6 using latest PHP-CPP and rocketmq-client-cpp.

And here is an error that I get on any PHP run

PHP Warning:  PHP Startup: Unable to load dynamic library 'rocketmq' (tried: /usr/local/lib/php/pecl/20190902/rocketmq (dlopen(/usr/local/lib/php/pecl/20190902/rocketmq, 9): image not found), /usr/local/lib/php/pecl/20190902/rocketmq.so (dlopen(/usr/local/lib/php/pecl/20190902/rocketmq.so, 9): Symbol not found: __ZN12PullConsumer12getGroupNameEv
  Referenced from: /usr/local/lib/php/pecl/20190902/rocketmq.so
  Expected in: flat namespace
 in /usr/local/lib/php/pecl/20190902/rocketmq.so)) in Unknown on line 0

During the build process I had some issues

  • there was no bin/librocketmq.so after cpp client build, only bin/librocketmq.a, is it enough or am I doing something wrong?
  • there were several errors like
src/producer.cc:271:49: error: conversion from 'std::__1::__vector_base<Php::Value, std::__1::allocator<Php::Value> >::value_type' (aka 'Php::Value') to 'long'
      is ambiguous
        this->producer->setLogFileSizeAndNum(param[0], param[1]);

which I fixed this way

        this->producer->setLogFileSizeAndNum((int)param[0], (int)param[1]);

Not sure if it's related to the final issue, but still.

ksimka avatar Oct 09 '20 21:10 ksimka

I encountered the same problem as you, how did you deal with it here

php -v PHP Warning: PHP Startup: Unable to load dynamic library 'rocketmq.so' (tried: /usr/lib64/php/modules/rocketmq.so (/lib/libphpcpp.so.2.2: undefined symbol: _zval_copy_ctor_func), /usr/lib64/php/modules/rocketmq.so.so (/usr/lib64/php/modules/rocketmq.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies

mooczhou avatar Jan 05 '21 04:01 mooczhou

[root@SERVER-24 api]# php -v PHP Warning: PHP Startup: Unable to load dynamic library 'rocketmq.so' (tried: /usr/lib64/php/modules/rocketmq.so (/usr/lib64/php/modules/rocketmq.so: undefined symbol: _ZN12PullConsumer12getNameSpaceEv), /usr/lib64/php/modules/rocketmq.so.so (/usr/lib64/php/modules/rocketmq.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 7.2.34 (cli) (built: Oct 1 2020 13:37:37) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies [root@SERVER-24 api]# find / -name rocketmq.so /app/src/rocketmq-client-php-master/rocketmq.so /usr/lib64/php/modules/rocketmq.so [root@SERVER-24 api]#

tangluhu avatar Dec 10 '21 02:12 tangluhu