c - 为 yocto 创建 goaccess 配方
问题描述
你好 stackoverflow 社区
我正在尝试从源代码创建 GoAccess 的配方。我现在的食谱看起来像这样。我已经使用提供的分发包列表添加了项目的依赖项。我认为“coreutils popt”确实需要,但它们没有任何意义。
如果有人对 cd 有更好的解决方案,那么我很乐意接受。
SUMMARY = "GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal on *nix systems or through your browser."
HOMEPAGE = "https://goaccess.io"
SECTION = "console/utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=01c937f4a0ce3daba5ca22e80b53d24b"
DEPENDS = "coreutils popt ncurses geoip tokyocabinet gettext-native"
SRC_URI = "https://tar.goaccess.io/goaccess-${PV}.tar.gz"
SRC_URI[md5sum] = "6f4b60f87755a7d1b350badfedda0aa3"
SRC_URI[sha256sum] = "e8fbb9ff852556d72dfd9f1d0134ba075ce5b4c41289902a6f4e0d97c69377be"
S = "${WORKDIR}/goaccess-${PV}"
inherit autotools pkgconfig
do_configure() {
cd ${S}
./configure --enable-utf8 --enable-geoip=legacy --host=${HOST_SYS}
}
do_compile_prepend() {
cd ${S}
}
我收到一个错误,即 so 文件 ld-linux-armhf.so.3 丢失。这个so文件属于哪个依赖?如何将其添加到构建过程中?
ERROR: goaccess-1.4-r0 do_compile: oe_runmake failed
ERROR: goaccess-1.4-r0 do_compile: Execution of '/home/path/build/tmp-glibc/work/arm1176jzfshf-vfp-oe-linux-gnueabi/goaccess/1.4-r0/temp/run.do_compile.15001' failed with exit code 1:
cat ./resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
cat ./resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/bootstrap.min.css.tmp
cat ./resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/fa.min.css.tmp
cat ./resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/app.css.tmp
cat ./resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/js/d3.v3.min.js.tmp
./bin2c ./resources/css/app.css.tmp src/appcss.h app_css
./bin2c resources/tpls.html.tmp src/tpls.h tpls
./bin2c ./resources/css/fa.min.css.tmp src/facss.h fa_css
./bin2c ./resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
/lib/ld-linux-armhf.so.3: No such file or directory
./bin2c ./resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
Makefile:1326: recipe for target 'src/appcss.h' failed
make: *** [src/appcss.h] Error 255
make: *** Waiting for unfinished jobs....
/lib/ld-linux-armhf.so.3: No such file or directory
Makefile:1321: recipe for target 'src/facss.h' failed
make: *** [src/facss.h] Error 255
/lib/ld-linux-armhf.so.3: No such file or directory
Makefile:1331: recipe for target 'src/d3js.h' failed
make: *** [src/d3js.h] Error 255
/lib/ld-linux-armhf.so.3: No such file or directory
Makefile:1311: recipe for target 'src/tpls.h' failed
make: *** [src/tpls.h] Error 255
/lib/ld-linux-armhf.so.3: No such file or directory
Makefile:1316: recipe for target 'src/bootstrapcss.h' failed
make: *** [src/bootstrapcss.h] Error 255
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/path/build/tmp-glibc/work/arm1176jzfshf-vfp-oe-linux-gnueabi/goaccess/1.4-r0/temp/log.do_compile.15001
Log data follows:
| DEBUG: Executing python function autotools_aclocals
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Python function autotools_aclocals finished
| DEBUG: Executing shell function do_compile
| NOTE: make -j 5
| cat ./resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
| cat ./resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/bootstrap.min.css.tmp
| cat ./resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/fa.min.css.tmp
| cat ./resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/app.css.tmp
| cat ./resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/js/d3.v3.min.js.tmp
| ./bin2c ./resources/css/app.css.tmp src/appcss.h app_css
| ./bin2c resources/tpls.html.tmp src/tpls.h tpls
| ./bin2c ./resources/css/fa.min.css.tmp src/facss.h fa_css
| ./bin2c ./resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
| /lib/ld-linux-armhf.so.3: No such file or directory
| ./bin2c ./resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
| Makefile:1326: recipe for target 'src/appcss.h' failed
| make: *** [src/appcss.h] Error 255
| make: *** Waiting for unfinished jobs....
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1321: recipe for target 'src/facss.h' failed
| make: *** [src/facss.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1331: recipe for target 'src/d3js.h' failed
| make: *** [src/d3js.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1311: recipe for target 'src/tpls.h' failed
| make: *** [src/tpls.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1316: recipe for target 'src/bootstrapcss.h' failed
| make: *** [src/bootstrapcss.h] Error 255
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/path/build/tmp-glibc/work/arm1176jzfshf-vfp-oe-linux-gnueabi/goaccess/1.4-r0/temp/run.do_compile.15001' failed with exit code 1:
| cat ./resources/tpls.html | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > resources/tpls.html.tmp
| cat ./resources/css/bootstrap.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/bootstrap.min.css.tmp
| cat ./resources/css/fa.min.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/fa.min.css.tmp
| cat ./resources/css/app.css | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/css/app.css.tmp
| cat ./resources/js/d3.v3.min.js | sed "s/^[[:space:]]*//" | sed "/^$/d" | tr -d "\r\n" > ./resources/js/d3.v3.min.js.tmp
| ./bin2c ./resources/css/app.css.tmp src/appcss.h app_css
| ./bin2c resources/tpls.html.tmp src/tpls.h tpls
| ./bin2c ./resources/css/fa.min.css.tmp src/facss.h fa_css
| ./bin2c ./resources/js/d3.v3.min.js.tmp src/d3js.h d3_js
| /lib/ld-linux-armhf.so.3: No such file or directory
| ./bin2c ./resources/css/bootstrap.min.css.tmp src/bootstrapcss.h bootstrap_css
| Makefile:1326: recipe for target 'src/appcss.h' failed
| make: *** [src/appcss.h] Error 255
| make: *** Waiting for unfinished jobs....
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1321: recipe for target 'src/facss.h' failed
| make: *** [src/facss.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1331: recipe for target 'src/d3js.h' failed
| make: *** [src/d3js.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1311: recipe for target 'src/tpls.h' failed
| make: *** [src/tpls.h] Error 255
| /lib/ld-linux-armhf.so.3: No such file or directory
| Makefile:1316: recipe for target 'src/bootstrapcss.h' failed
| make: *** [src/bootstrapcss.h] Error 255
| WARNING: exit code 1 from a shell command.
感谢您的帮助。
解决方案
好吧,您的配方继承了autotools.bbclass调用 ${S}/configure 以及所有这些变量和其他内容。
CONFIGUREOPTS = " --build=${BUILD_SYS} \
--host=${HOST_SYS} \
--target=${TARGET_SYS} \
--prefix=${prefix} \
--exec_prefix=${exec_prefix} \
--bindir=${bindir} \
--sbindir=${sbindir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \
--libdir=${libdir} \
--includedir=${includedir} \
--oldincludedir=${oldincludedir} \
--infodir=${infodir} \
--mandir=${mandir} \
--disable-silent-rules \
${CONFIGUREOPT_DEPTRACK} \
${@append_libtool_sysroot(d)}"
您可以通过提供自己的不完整 do_configure() 任务来覆盖此默认行为。不要这样做!如果您需要提供额外的选项,请使用EXTRA_OECONF变量。
EXTRA_OECONF += "--enable-utf8 --enable-geoip=legacy"
这应该是所需的完整配方。
SUMMARY = "GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal on *nix systems or through your browser."
HOMEPAGE = "https://goaccess.io"
SECTION = "console/utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=01c937f4a0ce3daba5ca22e80b53d24b"
DEPENDS = "coreutils popt ncurses geoip tokyocabinet gettext-native"
SRC_URI = "https://tar.goaccess.io/goaccess-${PV}.tar.gz"
SRC_URI[md5sum] = "6f4b60f87755a7d1b350badfedda0aa3"
SRC_URI[sha256sum] = "e8fbb9ff852556d72dfd9f1d0134ba075ce5b4c41289902a6f4e0d97c69377be"
S = "${WORKDIR}/goaccess-${PV}"
inherit autotools
EXTRA_OECONF += "--enable-utf8 --enable-geoip=legacy"
推荐阅读
- jquery - 如何在 Flask 中单击按钮时调用 Ajax
- c# - 创建在 C# 中检索 Auth0 管理 API v2 令牌的服务器端进程
- google-cloud-platform - GCP中的图像和快照有什么区别
- nginx - 你能让 .htaccess 传递 PHP 参数吗
- java - 登录多线程环境
- laravel - Laravel 6 有哪些调试技术?
- python - 在 Python 中使用 Google Protobuf 序列化数据
- javascript - 补丁值方法中通过http请求获取对象数组的问题
- python - 用大括号代替括号python加入二维列表
- python - 获取 django 中的所有 html 模板