2

corss_compiler D-bus をアームしたい。

ツールチェーン: arm-linux-gcc-3.4.1

構成オプション: CC=arm-linux-gcc ./configure --prefix=/opt/dbus/ --host=arm-linux --enable-abstract-sockets -with-xml=expat

ソースコード: d-bus-1.2.24 d-bus-1.3.1 d-bus-1.4.0

make[2]: Entering directory `/home/mandy/Desktop/apps/d-bus/remotec/dbus-1.4.0/bus'
  CCLD   dbus-daemon
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: Warning: gc-sections option ignored
dbus_daemon-bus.o(.text.process_config_postinit+0x120): In function `bus_context_check_security_policy':
/home/mandy/Desktop/apps/d-bus/remotec/dbus-1.4.0/bus/bus.c:1638: undefined reference to `bus_set_watched_dirs'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x44): In function `__libc_csu_init':
: undefined reference to `__init_array_end'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x48): In function `__libc_csu_init':
: undefined reference to `__init_array_start'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x8c): In function `__libc_csu_fini':
: undefined reference to `__fini_array_end'
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x90): In function `__libc_csu_fini':
: undefined reference to `__fini_array_start'
collect2: ld returned 1 exit status
make[2]: *** [dbus-daemon] Error 1
make[2]: Leaving directory `/home/mandy/Desktop/apps/d-bus/remotec/dbus-1.4.0/bus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mandy/Desktop/apps/d-bus/remotec/dbus-1.4.0'
make: *** [all] Error 2

dbus-1.2.24 および dbus-1.3.1 でも同じエラーが発生します。

私は何をすることができますか?

どうもありがとう。

4

1 に答える 1

3

これらは、avr32アーキテクチャ用のdbusをクロスコンパイルするための一般的な手順です。腕に関するこのリファレンス(3番目の投稿)に基づいて、この小さなチュートリアルを作成します。他の人やあなたがコマンドを比較するのに役立つかもしれないので、私は私のチュートリアルを投稿しています。


エクスパットライブラリ

クロスコンパイルするには、最初にExpatライブラリをクロスコンパイルするためにdbusが必要です。オプションプレフィックスを使用すると、インストールする必要がある場所を指定できます。

expat srcコードをダウンロードします:ftp: //ftp.free.fr/.mirrors1/ftp.netbsd.org/packages/distfiles/expat-2.0.1.tar.gz

それを解きます:

tar zxvf expat-2.0.1.tar.gz 

適切なホストとcコンパイラを使用して構成します。avr32 linuxツールチェーンがインストールされている必要があります(Buildrootがツールチェーンをコンパイルします。バイナリパスを環境変数$ PATHに追加する必要があります)

cd expat-2.0.1/ 
./configure --host=avr32-linux --prefix=/home/juan/builds/build_expat/ CC=avr32-linux-gcc
make; make install 

DBUS

dbus srcコードをダウンロードします:http: //dbus.freedesktop.org/releases/dbus/dbus-1.5.0.tar.gz

それを解きます:

tar zxvf dbus-1.5.0.tar.gz
cd dbus-1.5.0.tar.gz 

インストールフォルダー(--prefix)、cコンパイラー、includeフォルダー、およびexpatライブラリーのlibフォルダーを指定して構成します。

./configure --prefix=/home/juan/builds/build_dbus/ --host=avr32-linux --with-x=no ac_cv_have_abstract_sockets=yes "CC=avr32-linux-gcc -I/home/juan/builds/build_expat/include -L/home/juan/builds/build_expat/lib"

make;make install; 
于 2011-05-11T02:39:56.730 に答える