Yocto Projectを使用して最小限のラズベリーパイ0イメージを構築しようとしています。私はCに精通していませんが、なぜ私はコンパイル時にこのエラーが発生するのだろうかと疑問に思っています。 'ws2811.c'は、エラーなしでraspbian OSを使用しているもう1つのraspberry pi 2上に(ライブラリ全体)すべてのヒントと助けをありがとう!インストール中のYocto Raspberry Pi - エラーrpi_ws281xライブラリ
リポジトリ:
https://github.com/jgarff/rpi_ws281x
マイレシピ(リポジトリ)場所 'sconsの' ルートに構築しようとして貼り付けた。
Bitbakeは、レシピタスク出力をコンパイル:
| DEBUG: Executing python function externalsrc_compile_prefunc
| NOTE: python-ws2812: compiling from external source tree /home/astor/Documents/poky/rpi-build/workspace/sources/python-ws2812
| DEBUG: Python function externalsrc_compile_prefunc finished
| DEBUG: Executing shell function do_compile
| scons: Reading SConscript files ...
| scons: done reading SConscript files.
| scons: Building targets ...
| CC ws2811.o
| ws2811.c: In function 'setup_pwm':
| ws2811.c:289:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
| dma_cb->dest_ad = (uint32_t)&((pwm_t *)PWM_PERIPH_PHYS)->fif1;
| ^
| cc1: all warnings being treated as errors
| scons: *** [ws2811.o] Error 1
| scons: building terminated because of errors.
| WARNING: /home/astor/Documents/poky/rpi-build/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/python-ws2812/1.0+git999-r0/temp/run.do_compile.11838:1 exit 2 from 'scons'
| ERROR: Function failed: do_compile (log file is located at /home/astor/Documents/poky/rpi-build/tmp/work/arm1176jzfshf-vfp-poky-linux-gnueabi/python-ws2812/1.0+git999-r0/temp/log.do_compile.11838)
そして、これは私のレシピのように見えます:
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9dcf340793a1d73c5211edc8238767dc"
SRC_URI = "git://github.com/richardghirst/rpi_ws281x.git;protocol=https"
PV = "1.0+git${SRCPV}"
SRCREV = "39afaac5f2b8b307d7d7b5f2f790fbb6759bda5e"
S = "${WORKDIR}/git"
DEPENDS = "swig-native"
inherit scons setuptools
do_compile_prepend() {
cd ${S}/
scons
${PYTHON} ${S}/python/setup.py install
}
ありがとうございましたあなたの返信@jku!残念ながら、これらの回避策(** uint32_t **から** uintptr_t **への変更)は、これらのポインタを32ビットから64ビットに変更することを目的としていました。レシピは正常にビルドされましたが、** test **ファイルが生成されました(これはこのライブラリを使用して修正する必要があります)。私はそれがこのscons設定ファイルで何か問題があると仮定しますが、他の手で** EXTRA_OESCONS **を使ってこのパラメータを追加できませんでした** - Wno-pointer-to-int-cast ** sconsビルドツール - ちょうどここのように:[http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/mongodb/mongodb_git.bb?h=master]。 – astor555
実際に何をしているのか分からない限り、int-castキャストキャストはしないでください。警告は、通常の場合に問題を起こすような実際の問題についてあなたに伝えています。 – jku
完全に同意しました! YoctoやSconsが適切なクロスコンパイラを使ってそれらのライブラリを構築していないという私の前提が真実でしたか? – astor555