Ошибка сборки agl в freetype 2.10.2 - PullRequest
0 голосов
/ 13 июля 2020

Последние несколько дней я безуспешно пытался собрать agl

вот как я получил исходники

$repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo
$repo sync

Команды, используемые для сборки:

source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-demo agl-netboot ; bitbake agl-demo-platform

У меня следующая ошибка: freetype

 /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool --mode=link x86_64-agl-linux-gcc  -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -lz -lpng16 -lz -o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/ftdump.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/common.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/output.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/mlgetopt.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//objs/libfreetype.la
/bin/bash: /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool: No such file or directory<====
Makefile:485: recipe for target '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftbench' failed
make: *** [/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftbench] Error 127
make: *** Waiting for unfinished jobs....
/bin/bash: /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool: No such file or directory
ERROR: oe_runmake failed
Makefile:503: recipe for target '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump' failed
make: *** [/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump] Error 127
make: Leaving directory '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2'
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/temp/run.do_compile.28181' failed with exit code 1:
make: Nothing to be done for 'all'.
make: Entering directory '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2'
/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool --mode=link x86_64-agl-linux-gcc  -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -lz -lpng16 -lz -o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftbench /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/ftbench.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/common.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/output.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/mlgetopt.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//objs/libfreetype.la
/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool --mode=link x86_64-agl-linux-gcc  -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -lz -lpng16 -lz -o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/ftdump.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/common.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/output.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/objs/mlgetopt.o /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//objs/libfreetype.la
/bin/bash: /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool: No such file or directory
Makefile:485: recipe for target '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftbench' failed
| make: *** [/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftbench] Error 127
| make: *** Waiting for unfinished jobs....
| /bin/bash: /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/freetype-2.10.2//builds/unix/libtool: No such file or directory
| Makefile:503: recipe for target '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump' failed
| make: *** [/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2/bin/ftdump] Error 127
| make: Leaving directory '/home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/ft2demos-2.10.2'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/work/agl/external/poky/meta/recipes-graphics/freetype/freetype_2.10.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1071 tasks of which 1069 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/work/agl/external/poky/meta/recipes-graphics/freetype/freetype_2.10.2.bb:do_compile
Summary: There was 1 WARNING message shown.

ИЗМЕНЕНИЯ, ВЫПОЛНЕННЫЕ ЛОКАЛЬНО ТАК ДАЛЕКО

Ниже приведены изменения, сделанные мной для достижения вышеуказанного этапа

  1. Проблема - сбой сборки в freetype
ERROR: freetype-2.10.2-r0 do_patch: Command Error: 'quilt --quiltrc /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/recipe-sysroot-native/etc/quiltrc push' exite
d with 0  Output:
Applying patch 0001-Makefile-dont-build-gfx-demos.patch
patching file Makefile
Hunk #1 FAILED at 163.
Hunk #2 succeeded at 293 (offset 4 lines).
1 out of 2 hunks FAILED -- rejects in file Makefile
Patch 0001-Makefile-dont-build-gfx-demos.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /home/work/agl/build/tmp/work/corei7-64-agl-linux/freetype/2.10.2-r0/temp/log.do_patch.21522
ERROR: Task (/home/work/agl/external/poky/meta/recipes-graphics/freetype/freetype_2.10.2.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 909 tasks of which 907 didn't need to be rerun and 1 failed.

Решение - удалите

meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch
meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch 

и обновите

meta-agl/meta-agl-profile-core/recipes-test/freetype/freetype_2.%.bbappend

, чтобы удалить эти две записи

Проблема - сбой сборки в systemd
ERROR: systemd-1_245.6-r0 do_patch: Command Error: 'quilt --quiltrc /home/work/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-fix-udevd-seclabel-parsing.patch
patching file src/udev/udev-rules.c
Hunk #1 FAILED at 918.
Hunk #2 succeeded at 1947 (offset 20 lines).
1 out of 2 hunks FAILED -- rejects in file src/udev/udev-rules.c
Patch 0001-fix-udevd-seclabel-parsing.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /home/work/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/temp/log.do_patch.28579
ERROR: Task (/home/work/agl/external/poky/meta/recipes-core/systemd/systemd_245.6.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 955 tasks of which 906 didn't need to be rerun and 1 failed.

решение - удалить

meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/0001-fix-udevd-seclabel-parsing.patch

и обновить

/home/work/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/git/src/udev/udev-rules.c

вручную

1946         case TK_A_SECLABEL: {
1947                 _cleanup_free_ char *name = NULL, *label = NULL;
1948                 char label_str[UTIL_LINE_SIZE] = {};
1949
1950                 +if (!token->data)
1951                 +        break;
Проблема - очередной сбой сборки в systemd
ERROR: systemd-1_245.6-r0 do_patch: Command Error: 'quilt --quiltrc /home/work/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/recipe-sysroot-native/etc/quiltrc push' exite
d with 0  Output:
Applying patch 0002-network-add-CAN-Termination-tristate-option.patch
patching file src/libsystemd/sd-netlink/netlink-types.c
patching file src/network/networkd-can.c
patching file src/network/networkd-network-gperf.gperf
Hunk #1 FAILED at 245.
1 out of 1 hunk FAILED -- rejects in file src/network/networkd-network-gperf.gperf
patching file src/network/networkd-network.c
Hunk #1 succeeded at 455 (offset 7 lines).
patching file src/network/networkd-network.h
Hunk #1 succeeded at 199 (offset 6 lines).
patching file test/fuzz/fuzz-network-parser/directives.network
Hunk #1 succeeded at 198 (offset 4 lines).
Patch 0002-network-add-CAN-Termination-tristate-option.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /home/work/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/temp/log.do_patch.15708
ERROR: Task (/home/work/agl/external/poky/meta/recipes-core/systemd/systemd_245.6.bb:do_patch) failed with exit code '1'

решение - обновить

./meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/0002-network-add-CAN-Termination-tristate-option.patch

и удалить исправление для файла src/network/networkd-network-gperf.gperf

И сделайте следующее изменение внутри build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/git/src/network/networkd-network-gperf.gperf

$ grep -n Termi ~/agl/build/tmp/work/corei7-64-agl-linux/systemd/1_245.6-r0/git/src/network/networkd-network-gperf.gperf
254:CAN.Termination,                             config_parse_tristate,                                    0,                             offsetof(Network, can_termination)

Кажется, все патчи freetype были сгенерированы для freetype 2.9. * Должен ли я использовать другую версию freetype или отсутствует какая-то другая зависимость от моего system?

Я также попытался отключить freetype, сделав следующее изменение в build/conf/local.conf

IMAGE_INSTALL_remove = " freetype "

Это все еще построено freetype, также пробовал

IMAGE_INSTALL_remove = "freetype_2.10.2.bb"

, но не повезло, он все равно построил freetype и выдал ошибку

...