CopernicaMarketingSoftware / PHP-CPP

Library to build PHP extensions with C++
http://www.php-cpp.com/
Apache License 2.0
1.42k stars 332 forks source link

/lib/libphpcpp.so.2.2: undefined symbol: _ZN3Php9StreamBuf4syncEv)) in Unknown on line 0 #449

Open Nivratti opened 4 years ago

Nivratti commented 4 years ago

I am trying to run simple demo of phpcpp ( as given in this repository). It's working fine in ubuntu 18 but not working in cent os 7.

System version: cent os 7 PHP version:PHP 7.2

ksimka commented 4 years ago

Almost the same thing with https://github.com/lpflpf/rocketmq-client-php

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

MacOS Catalina, PHP 7.4.6

Nivratti commented 4 years ago

After reinstalling

1) php 2) php-devel 3) php-cpp

on cent-os 7 the issue is solved in my project.

The multiple php version on system or different php-devel version can cause this issue.