gpt4 book ai didi

perl - agl 构建在 "recipe perl-native-5.24.4-r0: task do_configure:"中失败

转载 作者:行者123 更新时间:2023-12-05 07:05:36 26 4
gpt4 key购买 nike

我正在按照 https://wiki.automotivelinux.org/agl-distro/source-code 中的说明尝试构建 AGL(使用 poky icefish)基于 crops/poky 的容器(https://github.com/crops/poky-container/blob/master/Dockerfile)

在运行 bitbake agl-demo-platform 时,我在 perl-native-5.24.4-r0 配方的 do_configure 中收到以下错误> 来自 Configure 脚本的阶段(我正在使用 https://downloads.yoctoproject.org/releases/yocto/yocto-3.1/buildtools/x86_64-buildtools-extended-nativesdk-standalone-3.1 .sh 安装 buildtools-extended)

以下是SDK中的gcc和ld版本

admin@2a517c6c3748:/home/work/agl$ which gcc
/opt/poky/3.1/sysroots/x86_64-pokysdk-linux/usr/bin/gcc
admin@2a517c6c3748:/home/work/agl$ gcc --version
gcc (GCC) 9.3.0
admin@2a517c6c3748://opt/poky/3.1/sysroots/x86_64-pokysdk-linux/usr/bin$ ./x86_64-pokysdk-linux-ld -v
GNU ld (GNU Binutils) 2.34.0.20200220
ERROR: perl-native-5.24.4-r0 do_configure: Function failed: do_configure (log file is located at /home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/temp/log.do_configure.1100)
ERROR: Logfile of failure stored in: /home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/temp/log.do_configure.1100
Log data follows:
| DEBUG: Executing shell function do_configure
| First let's make sure your kit is complete. Checking...
| Would you like to see the instructions? [n]
| Locating common programs...
| Checking compatibility between /home/work/agl/build/tmp/hosttools/echo and builtin echo (if any)...
| Symbolic links are supported.
| Checking how to test for symbolic links...
| You can test for symbolic links with 'test -h'.
| Checking for cross-compile
| No targethost for running compiler tests against defined, running locally
...
| Operating system name? [linux]
| Operating system version? [5.3.0-1019-aws]
| Installation prefix to use? (~name ok)
| [/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr]
| AFS does not seem to be running...
| What installation prefix should I use for installing files? (~name ok)
| [/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr]
| Getting the current patchlevel...
| Build a threading Perl? [y]
| Use which C compiler? [gcc ]
| Checking for GNU cc in disguise and/or its version number...
| Now, how can we feed standard input to your C preprocessor...
| Directories to use for library searches?
| [/usr/local/lib /opt/poky/3.1/sysroots/x86_64-pokysdk-linux/usr/lib /opt/poky/3.1/sysroots/x86_64-pokysdk-linux/usr/lib/gcc/x86_64-pokysdk-linux/9.3.0/include-fixed /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib /lib64]
| What is the file extension used for shared libraries? [so]
| Make shared library basenames unique? [n]
| Build Perl for SOCKS? [n]
| Try to use long doubles if available? [n]
| Checking for optional libraries...
| What libraries to use? [-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc]
| What optimizer/debugger flag should be used? [-O2]
| Any additional cc flags?
| [-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include]
| Let me guess what the preprocessor flags are...
| Any additional ld flags (NOT including libraries)?
| [-L/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -L/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/work/agl/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -L/usr/local/lib]
| Checking your choice of C compiler and flags for coherency...
| I've tried to compile and run the following simple program:
|
| #include <stdio.h>
| int main() { printf("Ok\n"); return(0); }
|
| I used the command:
|
| gcc -o try -O2 -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -L/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -L/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/work/agl/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -L/usr/local/lib try.c -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
| ./try
|
| and I got the following output:
|
| /opt/poky/3.1/sysroots/x86_64-pokysdk-linux/usr/lib/gcc/x86_64-pokysdk-linux/9.3.0/../../../../x86_64-pokysdk-linux/bin/ld: cannot find -lnsl<=======
| collect2: error: ld returned 1 exit status
| I can't compile the test program.
| You have a BIG problem. Shall I abort Configure [y]
| Ok. Stopping Configure.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/work/agl/build/tmp/work/x86_64-linux/perl-native/5.24.4-r0/temp/log.do_configure.1100)
NOTE: recipe perl-native-5.24.4-r0: task do_configure: Failed
ERROR: Task (/home/work/agl/external/poky/meta/recipes-devtools/perl/perl-native_5.24.4.bb:do_configure) failed with exit code '1'
...
NOTE: Tasks Summary: Attempted 647 tasks of which 606 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/work/agl/external/poky/meta/recipes-devtools/perl/perl-native_5.24.4.bb:do_configure
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code

我尝试切换到不同的 SDK 3.1.1 (https://downloads.yoctoproject.org/releases/yocto/yocto-3.1.1/buildtools/x86_64-buildtools-nativesdk-standalone-3.1.1 .sh) 但这会导致 bitbake 中的 do_fetch 挂起(https://stackoverflow.com/questions/62629159/aglbitbake-agl-demo-platform-hangs-in -任务 16)

最佳答案

由于 libnsl 不再包含在 buildtools-tarball 提供的 gcc 9.3 中,您可以改用 libnsl2(在 poky thud 上测试):

diff --git a/meta/recipes-devtools/perl/perl-native_5.24.4.bb b/meta/recipes-devtools/perl/perl-native_5.24.4.bb
index 81d3fd4898..ee4d4e3928 100644
--- a/meta/recipes-devtools/perl/perl-native_5.24.4.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.24.4.bb
@@ -1,7 +1,7 @@
require perl.inc

# We need gnugrep (for -I)
-DEPENDS = "db-native grep-native gdbm-native zlib-native"
+DEPENDS = "db-native grep-native gdbm-native zlib-native libnsl2-native"

EXTRA_OEMAKE = "-e MAKEFLAGS="

diff --git a/meta/recipes-devtools/perl/perl_5.24.4.bb b/meta/recipes-devtools/perl/perl_5.24.4.bb
index 2f27749c53..70a60d8699 100644
--- a/meta/recipes-devtools/perl/perl_5.24.4.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.4.bb
@@ -1,7 +1,7 @@
require perl.inc

# We need gnugrep (for -I)
-DEPENDS = "db grep-native gdbm zlib virtual/crypt"
+DEPENDS = "db grep-native gdbm zlib virtual/crypt libnsl2"

# Pick up patches from debian
# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz

另见 Adding gcc 9.3.0 to ubuntu-16.04 image breaks builds for rocko and thud

关于perl - agl 构建在 "recipe perl-native-5.24.4-r0: task do_configure:"中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62681243/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com