FFIMe: Uncaught PHPCParser\Error: Syntax error, unexpected IDENTIFIER(int_least8_t)
Hi @bwoebi
Attempting to use Redis’s https://github.com/redis/hiredis library, I’m getting the following error.
PHP Fatal error: Uncaught PHPCParser\Error: Syntax error, unexpected IDENTIFIER(int_least8_t), expecting ',' or ';' on line 395 in ~/hiredis/vendor/ircmaxell/php-c-parser/lib/ParserAbstract.php:236
Stack trace:
#0 ~/hiredis/vendor/ircmaxell/php-c-parser/lib/ParserAbstract.php(105): PHPCParser\ParserAbstract->doParse()
#1 ~/hiredis/vendor/ircmaxell/php-c-parser/lib/CParser.php(24): PHPCParser\ParserAbstract->parse()
#2 ~/hiredis/vendor/ircmaxell/ffime/lib/FFIMe.php(113): PHPCParser\CParser->parse()
#3 ~/hiredis/hiredis-rev1.php(12): FFIMe\FFIMe->include()
#4 {main}
thrown in ~/hiredis/vendor/ircmaxell/php-c-parser/lib/ParserAbstract.php on line 236
The hiredis.h
file itself doesn’t include any int_least8_t
yet one of its dependencies stdint.h
which is a glibc-headers
package included header.
I guess the part of interest in the stdint.h
file is the following.
/* Small types. */
/* Signed. */
typedef __int_least8_t int_least8_t;
typedef __int_least16_t int_least16_t;
typedef __int_least32_t int_least32_t;
typedef __int_least64_t int_least64_t;
/* Unsigned. */
typedef __uint_least8_t uint_least8_t;
typedef __uint_least16_t uint_least16_t;
typedef __uint_least32_t uint_least32_t;
typedef __uint_least64_t uint_least64_t;
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26
@cayolblake I’m working on it - it needs recursively resolving all referenced shared libraries for all supported targets (ELF and MachO), which is a tiny bit bigger feature, please be a bit patient 😃