Error reporting content:
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1317:5: error: implicit declaration of function 'yystpcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
yystpcpy(yyres, "end of file");
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1317:5: note: did you mean 'stpcpy'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:130:7: note: 'stpcpy' declared here
char *stpcpy(char *__dst, const char *__src);
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1324:29: error: implicit declaration of function 'yystrlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
yystr_len = (unsigned int)yystrlen(yystr);
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1324:29: note: did you mean 'strlen'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:82:9: note: 'strlen' declared here
size_t strlen(const char *__s);
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1345:4: error: implicit declaration of function 'yystpcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
yystpcpy(yyres, buffer);
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1352:10: error: implicit declaration of function 'yystrlen' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return yystrlen(yystr) - (*yystr == '"' ?2 : 0);
^
/Users/dre0m1/CTF/Study_notes/PHP_source_code/php-src/Zend/zend_language_parser.y:1365:2: error: implicit declaration of function 'yystpcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
yystpcpy(yyres, yystr);
^
5 errors generated.
make: *** [Zend/zend_language_parser.lo] Error 1
Implicit declaration of function ‘yystpcpy’ is invalid in C99. Looking up information on the Internet, we can find that this error type is related to the header file or the previous define. From the prompts in the error report, we can see that the function yystpcpy is missing.
Access the file php-src/Zend/zend_language_parser.c. You can see this code below:
Add the definitions of yystpcpy and yystrlen to it, guess that their original functions should be stpcpy and strlen functions: re-make after modification, and compile successfully.
Read More:
- Mac PHP Fatal error: Class ‘Memcache’ not found
- Mac: Where is php.ini Location
- Mac installs the php Swoole extension and appears Enable openssl support, require openssl library or fatal error:’openssl/ssl.h’ file not found
- Unserialize(): cause analysis and solution of error at offset
- How to Solve opcache error: zend_mm_heap corrupted
- PHP: How to parse MHT file into HTML
- PHP use __Sleep() and __wakeup() method serializes the object
- How to Solve phpExcel Error: ERR_INVALID_RESPONSE
- PHP Error Object of class mysqli could not be converted to string in
- Laravel5.5 Error: SQLSTATE[42000] Syntax error or access violation 1071 Specified key was too long; max k
- [PHP] __autoload function will be called when class_exists does not exist
- [Solved] laravel proc_get_status() has been disabled for security reasons
- laravel The Process class relies on proc_open, which is not available on your PHP installation.
- How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement
- [PHP] Solve Call-time pass-by-reference has been removed
- nginx.conf php-fpm.conf and php.ini Error among the three_ Differences and relations between log instructions
- [PHP]json_encode Chinese JSON_UNESCAPED_UNICODE returns null in php5.3
- [Solved] PHP post Datas json_decode Error: 4 JSON_ERROR_SYNTAX
- Laravel-admin php artisan admin:install error reporting problem solution
- [Solved] PDOException::(“SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long;