https://github.com/kokukuma/php-kakasi をビルドするため、make
を実行したら、
In file included from /home/pi/php-kakasi/kakasi/kakasi.c:31:0:
/usr/include/iconv.h:42:15: expected char ** restrict but argument 0 is of type const char **
のエラーになります。これはどうすれば直るでしょうか。
環境: Raspbian (Raspberry Pi)
lsb_release -a
の返り値:
No LSB modules are available
Distributor name: Raspbian
Description: Raspbian GNU/Linux 9.6 stretch
Release: 9.6
Codename: stretch
make --version
で確認したバージョン:
GNU Make 4.1
このプログラムはarm-unknown-linux-gnueabihf用にビルドされました
__restrict
keyword で修飾されていますので、kakasi.c
の方でもそれに合わせる必要があります。具体的にはkakasi.c
内にあるconvert
関数の第2, 3パラメータの const 修飾子を削除する事になります(prototype 宣言も同様)。ですが、これ以外でもコンパイルエラーが発生する様ですが… – metropolis 18年11月23日 4:17