Bug #75618 [Opn->Nab]: embed sapi can not compile
Edit report at https://bugs.php.net/bug.php?id=75618&edit=1
ID: 75618
Updated by: requinix@php.net
Reported by: jsntzhuhu at gmail dot com
Summary: embed sapi can not compile
-Status: Open
+Status: Not a bug
Type: Bug
Package: Unknown/Other Function
Operating System: Linux Mint
PHP Version: 7.2.0
Block user comment: N
Private report: N
New Comment:
.
Previous Comments:
------------------------------------------------------------------------
[2017-12-04 14:43:20] jsntzhuhu at gmail dot com
chinese version ,suggest for chinese.
è¿ä¸ªé®é¢å°æ°äºå天ï¼å 为è¿ä¸ªé®é¢å¨åé¢çbugsä¸ä¹æåºç°
å¢éæç¤ºæ¯æ´æ°è¿äºä»£ç ãæä»¥æçæ¯phpæ¬èº«çé®é¢å¨php7
ä¸å次åºç°ãä¹å°±æ²¡ç»æ³ï¼è¿ä¸ªå½ä»¤è¡æ¯php
embedæç¨ä¸ç
æä»¥ä¹æ²¡ææçå
¶ç宿§ã
æä»¥è¿ä¸ªé®é¢çæ ¸å¿å°±æ¯æ æºæä»¶å
ç´§è·gcc å
¶ä»åæ°å
åæå°±å¯ä»¥è§£å³è¿ä¸ªé®é¢ã
è¿å¥½åç°çæ©ï¼æ²¡ææµªè´¹ç¤¾åºäººåã为å ç¨ç¤¾åºèµæºè¡¨ç¤ºæ±æã
------------------------------------------------------------------------
[2017-12-04 14:37:59] jsntzhuhu at gmail dot com
sorry, this is not problem , just !!! compile method !!!
gcc ukcframe.c -o ukcframe -Iphp7/include/php -Iphp7/include/php/main -Iphp7/include/php/Zend
-Iphp7/include/php/TSRM -Wall -g -lstdc++ -lphp7 -Lphp7/lib
It's ok .
cmd line 's order is wrong .
------------------------------------------------------------------------
[2017-12-04 08:45:15] jsntzhuhu at gmail dot com
Description:
------------
simple sapi code can't link.
same as https://bugs.php.net/bug.php?id=48911
Test script:
---------------
#include "sapi/embed/php_embed.h"
int main( int argc , char ** argv){
PHP_EMBED_START_BLOCK(argc,argv);
PHP_EMBED_END_BLOCK();
return 0;
}
gcc -Iphp7/include/php -Iphp7/include/php/main -Iphp7/include/php/Zend -Iphp7/include/php/TSRM -Wall
-g -lstdc++ -lphp7 -Lphp7/lib ukcframe.c -o ukcframe
Expected result:
----------------
compile success
Actual result:
--------------
ukcframe.c:6: undefined reference to `php_embed_init'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `php_embed_shutdown'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75618&edit=1
Thread (4 messages)