2016-04-17 8 views
-1

私はCrossTool NGとBuildrootを使ってrootfsを作成しています。私はそのrootfsにSDL2_ttfを追加しようとしています。SDL2_ttfをarm-linuxにクロスコンパイルできません

は、私は以下の環境変数をエクスポート CC =腕のlinux-gccの

CPPFLAGS = -I /ホーム/ピーター/ igep2015/94SDLttf/pmtstagingは/ usr /含ま-I /ホーム/ピーター/ igep2015/09Buildroot SYSROOT = /ホーム/ピーター/ igep2015/09Buildroot - /buildroot-2016.02-TRY5/output/staging/usr/include -I /ホーム/ピーター/ igep2015/94SDLttf/pmtstagingは/ usr// freetype2の

CFLAGSを=含めます/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/

LDFLAGS = -L /ホーム/ピーター/ igep2015/94SDLttf/pmtstagingは/ usr/libに/

***************************出力****************** ************** ld.bfd:-lpthreadを検索するときに互換性のない/usr/lib/i386-linux-gnu/libpthread.soをスキップ

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/5.1.0 /../../../../ arm-unknown-linux-gnueabi/bin/ld。 bfd:-lpthreadを検索すると互換性のない/usr/lib/i386-linux-gnu/libpthread.aをスキップする

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown- linux-gnueabi/5.1.0 /../../../../ arm-unknown-linux-gnueabi/bin/ld.bfd:/lib/libpthread.so.0を見つけることができません

/usr/local/xtools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/5.1.0/../../../../arm-unknown-linux -gnueabi/binに/ ld.bfd:エラー:私は-L/Buildrootライブラリを追加したり、-L /腕 - ときldは

1つの終了ステータスを返した/usr/lib/libpthread_nonshared.a

collect2はを見つけることができませんlibpthreadを見つけるためにlinuxライブラリを使用すると、./configureは失敗します。 libpthreadのコピー... pmtstaging/usr/libは効果がありません。私はすでにpmtstagingにlibfreetypeとlibpng12を追加しました。さらに、libSDL2とlibzをBuildrootからpmtstagingにコピーしました。

コンパイルしたSDL2_ttfをarm-linuxに正しくクロスコンパイルした人はいますか?それはできますか?

答えて

-1

SDL_ttfをクロスコンパイルするには、Buildroot sysrootの2つのリンカースクリプトを変更する必要があります。
-
libc.so -
libpthread.soはなぜため
Can't access Buildroot staging libraries via ./configure when cross compiling. It fails on test compile.
を参照してください。

変更 /home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib/libc.so
FROM:

/* GNU ld script 
    Use the shared library, but some functions are only in 
    the static library, so try that secondarily. */ 
OUTPUT_FORMAT(elf32-littlearm) 
GROUP (/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED (/lib/ld-linux.so.3)) 

TO:

/* GNU ld script 
    Use the shared library, but some functions are only in 
    the static library, so try that secondarily. */ 
OUTPUT_FORMAT(elf32-littlearm) 
GROUP (../../lib/libc.so.6 libc_nonshared.a AS_NEEDED (../../lib/ld-linux.so.3)) 

変更
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/ lib/libpthread。そう
FROM:

/* GNU ld script 
    Use the shared library, but some functions are only in 
    the static library, so try that secondarily. */ 
OUTPUT_FORMAT(elf32-littlearm) 
GROUP (/lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a) 

TO:

/* GNU ld script 
    Use the shared library, but some functions are only in 
    the static library, so try that secondarily. */ 
OUTPUT_FORMAT(elf32-littlearm) 
GROUP (../../lib/libpthread.so.0 libpthread_nonshared.a) 

今では通常の
は./configureである

にこの例をインストール=
メイクDESTDIRを作成すると、そののlibpngを想定し、 freetypeは、Buildrootステージングディレクトリの外側のpmtstagingにインストールされています。おそらく、Buildrootステージングのsysrootを使用してpmtstagingへの参照を削除するだけでうまくいくでしょう。

export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/ 
export CC=arm-linux-gcc 
export CFLAGS="-v -Wl,--verbose"  ###optional for debugging 
export CPPFLAGS="-I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include -I/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/include -I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include/freetype2" 
export LDFLAGS="-L/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/lib -L/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib -L/home/peter/igep2015/94SDLttf/pmtstaging/usr/lib" 
./configure --host=arm-linux --prefix=/usr --with-freetype-prefix=/home/peter/igep2015/94SDLttf/pmtstaging/usr 
make 
make DESTDIR=/home/peter/igep2015/94SDLttf/pmtstaging/ install 
1

他の人があなたを助けることができるようにあなたは本当に、彼らは完全に動作しない場合でも、Buildrootメーリングリストにパッチを提出してください。どこでも利用できないコードに関する質問をすることは、あなたに多くの答えを与えるつもりはありません。

関連する問題