CopernicaMarketingSoftware / PHP-CPP

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

Build failed on php7.0 32bit #410

Open shinuexx opened 5 years ago

shinuexx commented 5 years ago

Latest commit 9930b431e5a29fafcc564cf4419c89e922444e93 fails when trying to build on 32bit systems.

zend/classimpl.cpp: In static member function ‘static int Php::ClassImpl::getClosure(zval*, zend_class_entry**, zend_function**, zend_object**)’:
zend/classimpl.cpp:307:35: error: ‘zend_empty_string’ was not declared in this scope
     function->function_name     = zend_empty_string;            // should not be null, as this is free'ed by zend when doing exception handling
                                   ^~~~~~~~~~~~~~~~~
Makefile:219: recipe for target 'shared/zend/classimpl.o' failed
make: *** [shared/zend/classimpl.o] Error 1

Tested on: Raspberry Pi 3: Linux raspberry 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

 PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies

Nano Pi Neo: Linux NanoPi-NEO 4.14.52 #114 SMP Tue Mar 5 16:05:06 CST 2019 armv7l armv7l armv7l GNU/Linux

PHP 7.0.33-0ubuntu0.16.04.3 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0ubuntu0.16.04.3, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

Orange Pi Plus 2: Linux orangepiplus 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l GNU/Linux

PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

Commit dfe4a94ee0dd1b240c6db3b324436c2138f7307c introduces zend_empty_string.

sallyx commented 5 years ago

The same problem with PHP 7.1

bossturk commented 5 years ago

I'm having the same problem

PHP 7.0.33-dev (cli) (built: Jun 7 2019 20:58:23) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

maxpaynestory commented 5 years ago

You are correct, current version has the above problem but previous release like 2.0.0 is fine.

bossturk commented 5 years ago

c ++ compiler does not cause problems with 7.x.x versions

maxpaynestory commented 5 years ago

c ++ compiler does not cause problems with 7.x.x versions

I also tried with c++ 7 but build failed with same errors.

aswger commented 4 years ago

I got that error message when compiling master branch, when i use tagged release it was compiled successfully.

z497688734 commented 4 years ago

tag v2.1.4 is ok