Armadilloフォーラム

convertのエラーについて

o-m

2019年6月19日 10時30分

現在Armadillo-440液晶タイプを使用して開発を行っています。
imagemagickでテキストを画像に変換後、付属のLCDに表示したいと思い、
こちらのサイト(https://users.atmark-techno.com/forum/armadillo/1933)とこちらのサイト(https://armadillo.atmark-techno.com/forum/armadillo/1692)を参考に環境構築を行いました。
その後convertを実行するとフォーラムに投稿されているエラー文と似たようなエラー文が出力されるため、
straceで足りないファイルを探して追加し、「make romfs」と「make image」の実行後、Armadilloに書き込みました。
しかし追加後も変わらず、以下のようなエラー文が出力されてconvertが実行されません。

[root@armadillo440-0 (ttymxc1) ~]#convert label:aaaa aaaa.png
convert: unable to open image `aaaa': No such file or directory @ error/blob.c/OpenBlob/2638.
convert: no decode delegate for this image format `aaaa' @ error/constitute.c/ReadImage/544.
convert: no images defined `text1.png' @ error/convert.c/ConvertImageCommand/3044.

convert実行するための解決策を教えて頂けないでしょうか。
またテキストをLCDに表示したい場合、imagemagickを使用する以外の方法はあるでしょうか。

straceの実行結果は添付ファイルの通りです。ログはopenのみ出力しています。
straceの結果からpolicy.xmlやlocale.xmlが不足していると思い、atmark-dist/romfs/usr/shareにImageMagick-6.7.7を作成し、
その中にpolicy.xmlやlocal.xmlなどを配置しております。
また追加したパッケージもwhezzyに合わせて以下のようなバージョンを使用しました。ATDEはATDE5を使用しています。

・libmagickcore5_6.7.7.10-5+deb7u4_armel
・liblcms1_1.19.dfsg2-1.2+deb7u1_armel
・libbz2-1.0_1.0.6-4_armel
・libpng12-0_1.2.49-1+deb7u2_armel

ご回答よろしくお願いいたします。

ファイル ファイルの説明
strace実行結果.txt
コメント

at_makoto.sato

2019年6月21日 13時45分

佐藤です。

参照いただいてるページにも記載ありますが、label.la と label.so は Armadillo上に存在していますでしょうか。

[armadillo]# ls /usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label*                                                    
/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label.la        
/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label.so 

o-m

2019年6月25日 11時39分

ご回答ありがとうございます。

> 参照いただいてるページにも記載ありますが、label.la と label.so は Armadillo上に存在していますでしょうか。

label.laとlabel.soの配置場所が「/usr/lib/ImageMagick-6.7.7/modules-Q16/coders/」となっていたため、
「/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/」に変更して実行しましたが、以下のようなエラーが発生いたします。

[root@armadillo440-0 (ttymxc1) ~]# ls /usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label*
/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label.la
/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label.so
[root@armadillo440-0 (ttymxc1) ~]# convert label:aaaa aaaa.png
convert: unable to open image `aaaa': No such file or directory @ error/blob.c/OpenBlob/2638.
convert: unable to load module `/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/modules-Q16/coders/label.la': file not found @ error/module.c/OpenModule/1278.
convert: no decode delegate for this image format `aaaa' @ error/constitute.c/ReadImage/544.
convert: no images defined `aaaa.png' @ error/convert.c/ConvertImageCommand/3044.
 

liblcms.so.1やlibbz2.so.1.0などは「/usr/lib」に配置しています。
またopen出来なかった以下のファイルを「/usr/lib/arm-linux-gnueabi/ImageMagick-6.7.7/config」に追加しています。
・policy.xml
・locale.xml
・english.xml
・coder.xml
・delegates.xml

ご回答をよろしくお願いいたします。

o-m

2019年6月25日 13時42分

佐藤様

ご回答ありがとうございます。

> インストールされた imagemagick は
> http://archive.debian.org/debian/pool/main/i/imagemagick/imagemagick_6…
> でしょうか。

上記リンクのバージョンを使用しております。
実行ファイル名はconvert.im6ですが、名前をconvertに変更したものをatmark-dist内に配置して実行していました。
また上記のリンクからダウンロードしたもので名前を変更せず再度実行しましたが、同じエラー文が発生します。

よろしくお願いいたします。

at_makoto.sato

2019年6月25日 14時05分

佐藤です。

こちらでは、Armadillo-440 上で convert.im6 が実行できました。

こちらで行ったことは、imagemagick 本体と必要となる各種ライブラリの .deb パッケージをすべて集め
それらを、romfs 内に展開して image を作成しました。
以下は例です。

[ATDE5: ~]$ dpkg -x [必要なパッケージ].deb atmark-dist/romfs

上記を必要なすべてのパッケージについて行った後

[ATDE5: ~/atamrk-dist]$ make image

で image 作成後、Armadillo-440 に書き込みます。

Armadillo 上では

[root@armadillo440-0 (ttymxc1) ~]# convert.im6 label:aaa aaa.png                
[root@armadillo440-0 (ttymxc1) ~]# ls                                           
aaa.png  

と実行できました。

o-m

2019年6月25日 18時39分

佐藤様

ご回答ありがとうございます。

> こちらで行ったことは、imagemagick 本体と必要となる各種ライブラリの .deb パッケージをすべて集め
> それらを、romfs 内に展開して image を作成しました。

> 以下は例です。

 [ATDE5: ~]$ dpkg -x [必要なパッケージ].deb atmark-dist/romfs

教えて頂いた通り、今まで使用していたライブラリを「atmark-dist/romfs」に展開してconvertの実行を行ったところ、
以下のようなエラー文が発生しました。

[root@armadillo440-0 (ttymxc1) ~]# convert.im6 label:aaaa aaaa.png
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
convert.im6: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1123.
convert.im6: unable to access configure file `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
convert.im6: Postscript delegate failed `/tmp/magick-l4CbOVQT': No such file or directory @ error/ps.c/ReadPSImage/832.
convert.im6: no images defined `aaaa.png' @ error/convert.c/ConvertImageCommand/3044.

romfsで展開するライブラリは以下のライブラリで十分でしょうか。
・libmagickcore5_6.7.7.10-5+deb7u4_armel
・liblcms1_1.19.dfsg2-1.2+deb7u1_armel
・libbz2-1.0_1.0.6-4_armel
・libpng12-0_1.2.49-1+deb7u2_armel
・fontconfig_2.9.0-7.1_armel.deb

何か不足しているライブラリがあれば、教えて頂きたいです。

またimagemagickの文字描写(https://armadillo.atmark-techno.com/forum/armadillo/1692)で記述されている、手動でAtmark Distへ追加する方法は全く行わなくてもよいのでしょうか。

ご回答よろしくお願いいたします。

at_makoto.sato

2019年6月26日 10時43分

佐藤です。

> 何か不足しているライブラリがあれば、教えて頂きたいです。
こちらで動作確認した際に入れたものと簡単な手順を添付ファイルに記載しました。

ファイル ファイルの説明
imagemagick_packages.txt A440でimagemagickを動かすために入れたパッケージ

o-m

2019年6月27日 15時07分

佐藤様
ご回答ありがとうございます。

> こちらで動作確認した際に入れたものと簡単な手順を添付ファイルに記載しました。
添付して頂いたファイル通りに実行したところ、以下のエラーが発生しました。

convert.im6: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory

libxext6_1.3.3-1_armel.debを追加したところ、フォントのエラーが発生しますが、無事に実行できました。

[root@armadillo440-0 (ttymxc1) ~]# convert.im6 label:aaaa aaaa.png
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file
[root@armadillo440-0 (ttymxc1) ~]# ls
aaaa.png

御回答に貴重なお時間を割いていただき、誠にありがとうございました。

at_makoto.sato

2019年6月27日 15時14分

佐藤です。

> libxext6_1.3.3-1_armel.debを追加したところ、フォントのエラーが発生しますが、無事に実行できました。

フォントのエラーは fontconfig_2.9.0-7.1_armel.deb を入れていただき、下記の投稿のフォントに関する設定の手順を実施するとよいかと思います。
https://users.atmark-techno.com/comment/2589#comment-2589