已开启
Support clang build (modify 2 meson.build) #619
AtomGit-Bot创建于 2024年9月19日
Support clang build (modify 2 meson.build) #619
已开启
AtomGit-Bot创建于 2024年9月19日
从refs/pull/619/head合入到master
AtomGit-Bot
2024年9月19日
  • 本PR基于这个oEEP,旨在使得该软件包可以同时支持GCC和LLVM构建。

  • 所做修改如下:

    1. 将drivers/meson.build中的'-Wl,-z,relro,-z,now,-z,noexecstack'作为链接参数而非编译参数传入;clang不支持的-pie和-Wtrampolines参数则改为当编译器支持时才添加。
    2. 向kernel/linux/igb_uio/meson.build中执行的make命令添加指定CC参数,当kernel使用clang时添加CC=clang,以避免make默认使用GNU GCC导致构建igb_uio时的编译器链接器和内核构建时使用的不同致使构建失败。
    3. 向spec添加%[ "%{toolchain}" == "clang" ? "-fgcc-compatible" : "" ]使得在用clang工具链编译时添加-fgcc-compatible至CFLAGS。
  • 在修改前使用clang构建多次出现如下错误,软件包构建失败:

    FAILED: drivers/libtmp_rte_common_mlx5.a.p/common_mlx5_linux_mlx5_glue.c.o
    clang -Idrivers/libtmp_rte_common_mlx5.a.p -Idrivers -I../drivers -Idrivers/common/mlx5 -I../drivers/common/mlx5 -Idrivers/common/mlx5/linux -I../drivers/common/mlx5/linux -Ilib/hash -I../lib/hash -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Ilib/pci -I../lib/pci -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Idrivers/bus/auxiliary -I../drivers/bus/auxiliary -I/usr/include/libnl3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -include rte_config.h -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-address-of-packed-member -Wno-missing-field-initializers -D_GNU_SOURCE -O2 -g -grecord-gcc-switches -pipe -fstack-protector-strong -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/generic-hardened-clang.cfg -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcommon -fPIC -march=corei7 -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -fPIE -pie -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wall -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -std=c11 -Wno-strict-prototypes -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -UPEDANTIC -DRTE_LOG_DEFAULT_LOGTYPE=pmd.common.mlx5 -MD -MQ drivers/libtmp_rte_common_mlx5.a.p/common_mlx5_linux_mlx5_glue.c.o -MF drivers/libtmp_rte_common_mlx5.a.p/common_mlx5_linux_mlx5_glue.c.o.d -o drivers/libtmp_rte_common_mlx5.a.p/common_mlx5_linux_mlx5_glue.c.o -c ../drivers/common/mlx5/linux/mlx5_glue.c
    clang: warning: -Wl,-z,relro,-z,now,-z,noexecstack: 'linker' input unused [-Wunused-command-line-argument]
    clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
    warning: unknown warning option '-Wtrampolines' [-Wunknown-warning-option]
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:58:6: error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'
       58 | enum mlx5dv_flow_action_packet_reformat_type { packet_reformat_type = 0, };
          |      ^
    /usr/include/infiniband/mlx5_api.h:46:50: note: expanded from macro 'mlx5dv_flow_action_packet_reformat_type'
       46 | #define mlx5dv_flow_action_packet_reformat_type         mlx5_ib_uapi_flow_action_packet_reformat_type
          |                                                         ^
    /usr/include/infiniband/mlx5_user_ioctl_verbs.h:50:6: note: previous definition is here
       50 | enum mlx5_ib_uapi_flow_action_packet_reformat_type {
          |      ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:59:6: error: redefinition of 'mlx5_ib_uapi_flow_table_type'
       59 | enum mlx5dv_flow_table_type { flow_table_type = 0, };
          |      ^
    /usr/include/infiniband/mlx5_api.h:40:35: note: expanded from macro 'mlx5dv_flow_table_type'
       40 | #define mlx5dv_flow_table_type                          mlx5_ib_uapi_flow_table_type
          |                                                         ^
    /usr/include/infiniband/mlx5_user_ioctl_verbs.h:42:6: note: previous definition is here
       42 | enum mlx5_ib_uapi_flow_table_type {
          |      ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:68:8: error: redefinition of 'mlx5dv_devx_umem'
       68 | struct mlx5dv_devx_umem { uint32_t umem_id; };
          |        ^
    /usr/include/infiniband/mlx5dv.h:1746:8: note: previous definition is here
     1746 | struct mlx5dv_devx_umem {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:69:8: error: redefinition of 'mlx5dv_devx_uar'
       69 | struct mlx5dv_devx_uar { void *reg_addr; void *base_addr; uint32_t page_id; };
          |        ^
    /usr/include/infiniband/mlx5dv.h:1771:8: note: previous definition is here
     1771 | struct mlx5dv_devx_uar {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:78:7: error: redefinition of 'mlx5dv_dr_domain_type'
       78 | enum  mlx5dv_dr_domain_type { unused, };
          |       ^
    /usr/include/infiniband/mlx5dv.h:1933:6: note: previous definition is here
     1933 | enum mlx5dv_dr_domain_type {
          |      ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:109:8: error: redefinition of 'mlx5dv_dr_flow_sampler_attr'
      109 | struct mlx5dv_dr_flow_sampler_attr {
          |        ^
    /usr/include/infiniband/mlx5dv.h:1953:8: note: previous definition is here
     1953 | struct mlx5dv_dr_flow_sampler_attr {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:119:6: error: redefinition of 'mlx5dv_dr_action_dest_type'
      119 | enum mlx5dv_dr_action_dest_type {
          |      ^
    /usr/include/infiniband/mlx5dv.h:2030:6: note: previous definition is here
     2030 | enum mlx5dv_dr_action_dest_type {
          |      ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:120:2: error: redefinition of enumerator 'MLX5DV_DR_ACTION_DEST'
      120 |         MLX5DV_DR_ACTION_DEST,
          |         ^
    /usr/include/infiniband/mlx5dv.h:2031:2: note: previous definition is here
     2031 |         MLX5DV_DR_ACTION_DEST,
          |         ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:121:2: error: redefinition of enumerator 'MLX5DV_DR_ACTION_DEST_REFORMAT'
      121 |         MLX5DV_DR_ACTION_DEST_REFORMAT,
          |         ^
    /usr/include/infiniband/mlx5dv.h:2032:2: note: previous definition is here
     2032 |         MLX5DV_DR_ACTION_DEST_REFORMAT,
          |         ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:123:8: error: redefinition of 'mlx5dv_dr_action_dest_reformat'
      123 | struct mlx5dv_dr_action_dest_reformat {
          |        ^
    /usr/include/infiniband/mlx5dv.h:2035:8: note: previous definition is here
     2035 | struct mlx5dv_dr_action_dest_reformat {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:127:8: error: redefinition of 'mlx5dv_dr_action_dest_attr'
      127 | struct mlx5dv_dr_action_dest_attr {
          |        ^
    /usr/include/infiniband/mlx5dv.h:2040:8: note: previous definition is here
     2040 | struct mlx5dv_dr_action_dest_attr {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:137:8: error: redefinition of 'mlx5dv_devx_event_channel'
      137 | struct mlx5dv_devx_event_channel { int fd; };
          |        ^
    /usr/include/infiniband/mlx5dv.h:1837:8: note: previous definition is here
     1837 | struct mlx5dv_devx_event_channel {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:139:9: warning: 'MLX5DV_DEVX_CREATE_EVENT_CHANNEL_FLAGS_OMIT_EV_DATA' macro redefined [-Wmacro-redefined]
      139 | #define MLX5DV_DEVX_CREATE_EVENT_CHANNEL_FLAGS_OMIT_EV_DATA 1
          |         ^
    /usr/include/infiniband/mlx5_api.h:60:9: note: previous definition is here
       60 | #define MLX5DV_DEVX_CREATE_EVENT_CHANNEL_FLAGS_OMIT_EV_DATA MLX5_IB_UAPI_DEVX_CR_EV_CH_FLAGS_OMIT_DATA
          |         ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:143:8: error: redefinition of 'mlx5dv_var'
      143 | struct mlx5dv_var { uint32_t page_id; uint32_t length; off_t mmap_off;
          |        ^
    /usr/include/infiniband/mlx5dv.h:1784:8: note: previous definition is here
     1784 | struct mlx5dv_var {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:152:8: error: redefinition of 'mlx5dv_steering_anchor_attr'
      152 | struct mlx5dv_steering_anchor_attr {
          |        ^
    /usr/include/infiniband/mlx5dv.h:748:8: note: previous definition is here
      748 | struct mlx5dv_steering_anchor_attr {
          |        ^
    In file included from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
    ../drivers/common/mlx5/linux/mlx5_glue.h:158:8: error: redefinition of 'mlx5dv_steering_anchor'
      158 | struct mlx5dv_steering_anchor {
          |        ^
    /usr/include/infiniband/mlx5dv.h:754:8: note: previous definition is here
      754 | struct mlx5dv_steering_anchor {
          |        ^
    2 warnings and 15 errors generated.
    
  • 问题分析:

    • 上述错误的根源是,原本0002-dpdk-add-secure-compile-option-and-fPIC-option.patch使得在drivers/meson.build中增加如下代码:

      default_cflags += ['-fPIE', '-pie', '-fPIC', '-fstack-protector-strong', '-D_FORTIFY_SOURCE=2', '-O2', '-Wall']
      default_cflags += ['-Wl,-z,relro,-z,now,-z,noexecstack', '-Wtrampolines']
      

      于是构建时的c_args会添加上上述选项。而clang中链接选项需要传给链接器而不是以编译器参数传入,且不支持-pie和-Wtrampolines选项。

      这导致了在执行drivers/common/mlx5/meson.build中的

      configure_file(output: 'mlx5_autoconf.h', configuration: mlx5_config)
      

      时,在检测infiniband/mlx5dv.h等中的定义时,gcc对测试代码能成功编译并检测出定义情况,以mlx5dv_devx_obj_create为例:

      gcc构建时:build-gcc/meson-logs/meson-log.txt片段:

      Running compile:
      Working directory:  /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-gcc/meson-private/tmpbopy1m2o
      Code:
       
              #include <infiniband/mlx5dv.h>
              int main(void) {
                  /* If it's not defined as a macro, try to use as a symbol */
                  #ifndef mlx5dv_devx_obj_create
                      mlx5dv_devx_obj_create;
                  #endif
                  return 0;
              }
      -----------
      Command line: `/usr/bin/gcc -I/usr/include/libnl3 /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-gcc/meson-private/tmpbopy1m2o/testfile.c -o /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-gcc/meson-private/tmpbopy1m2o/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -std=c11 -march=native -mno-avx512f -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -fPIE -pie -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wall -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -Wno-format-truncation -std=c11 -Wno-strict-prototypes -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -UPEDANTIC` -> 0
      stderr:
      /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-gcc/meson-private/tmpbopy1m2o/testfile.c: In function 'main':
      /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-gcc/meson-private/tmpbopy1m2o/testfile.c:6:17: warning: statement with no effect [-Wunused-value]
          6 |                 mlx5dv_devx_obj_create;
            |                 ^~~~~~~~~~~~~~~~~~~~~~
      -----------
      Header "infiniband/mlx5dv.h" has symbol "mlx5dv_devx_obj_create" with dependencies libmlx5, libibverbs: YES
      

      而clang编译由于命令行使用了-Werror=unknown-warning-option -Werror=unused-command-line-argument两个参数,所以会报错clang: error: -Wl,-z,relro,-z,now,-z,noexecstack: 'linker' input unused [-Werror,-Wunused-command-line-argument]从而导致检测失败(同理,-pie和-Wtrampolines也会导致clang error)。

      clang构建时:build-clang/meson-logs/meson-log.txt片段:

      Running compile:
      Working directory:  /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-clang/meson-private/tmp399v6yuc
      Code:
       
              #include <infiniband/mlx5dv.h>
              int main(void) {
                  /* If it's not defined as a macro, try to use as a symbol */
                  #ifndef mlx5dv_devx_obj_create
                      mlx5dv_devx_obj_create;
                  #endif
                  return 0;
              }
      -----------
      Command line: `/usr/bin/clang -I/usr/include/libnl3 /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-clang/meson-private/tmp399v6yuc/testfile.c -o /home/abuild/rpmbuild/BUILD/dpdk-23.11/build-clang/meson-private/tmp399v6yuc/output.obj -c -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -std=c11 -march=native -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -fPIE -pie -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wall -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -std=c11 -Wno-strict-prototypes -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -UPEDANTIC` -> 1
      stderr:
      clang: error: -Wl,-z,relro,-z,now,-z,noexecstack: 'linker' input unused [-Werror,-Wunused-command-line-argument]
      -----------
      Header "infiniband/mlx5dv.h" has symbol "mlx5dv_devx_obj_create" with dependencies libmlx5, libibverbs: NO 
      

      又因为在drivers/common/mlx5/linux/meson.build中使用了数组来确定是否定义宏:

      # input array for meson member search:
      # [ "MACRO to define if found", "header for the search",
      #   "symbol to search", "struct member to search" ]
      has_sym_args = [
      	...
          [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
          'mlx5dv_devx_obj_create' ],
          ...
      ]
      

      从而,对于build-clang/drivers/common/mlx5/mlx5_autoconf.h,会对应地得到:

      #undef HAVE_IBV_DEVX_OBJ
      

      而build-gcc/drivers/common/mlx5/mlx5_autoconf.h中则是:

      #define HAVE_IBV_DEVX_OBJ
      

      而在drivers/common/mlx5/linux/mlx5_glue.h中通过该宏是否定义来决定是否定义一些结构体:

      #ifndef HAVE_IBV_DEVX_OBJ
      struct mlx5dv_devx_obj;
      struct mlx5dv_devx_umem { uint32_t umem_id; };
      struct mlx5dv_devx_uar { void *reg_addr; void *base_addr; uint32_t page_id; };
      #endif
      

      由于上述原因clang构建时并没有定义HAVE_IBV_DEVX_OBJ,因此中间的几个原本在infiniband/mlx5dv.h中以及定义过的结构体被重新定义了,导致了开头所述的error: redefinition of ...的问题。

      • 将drivers/meson.build中的'-Wl,-z,relro,-z,now,-z,noexecstack'改为作为链接参数而非编译参数传入;clang不支持的-pie和-Wtrampolines参数则改为当编译器支持时才添加后可以修复上述问题
    • 上述问题修复后构建软件包会出现报错:

      [2284/2284] /usr/bin/make -j4 -C /lib/modules/6.6.0-15.0.0.13.mg2403.x86_64/build M=/home/abuild/rpmbuild/BUILD/dpdk-23.11/openEuler-linux-build/kernel/linux/igb_uio src=/home/abuild/rpmbuild/BUILD/dpdk-23.11/kernel/linux/igb_uio modules
      FAILED: kernel/linux/igb_uio/igb_uio.ko 
      /usr/bin/make -j4 -C /lib/modules/6.6.0-15.0.0.13.mg2403.x86_64/build M=/home/abuild/rpmbuild/BUILD/dpdk-23.11/openEuler-linux-build/kernel/linux/igb_uio src=/home/abuild/rpmbuild/BUILD/dpdk-23.11/kernel/linux/igb_uio modules
      make: Entering directory '/usr/src/kernels/6.6.0-15.0.0.13.mg2403.x86_64'
      warning: the compiler differs from the one used to build the kernel
        The kernel was built by: clang version 17.0.6 ( 17.0.6-8.mg2403)
        You are using:           gcc_old (GCC) 12.3.1 (openEuler 12.3.1-25.mg2403)
        CC [M]  /home/abuild/rpmbuild/BUILD/dpdk-23.11/openEuler-linux-build/kernel/linux/igb_uio/igb_uio.o
      cc1: error: unrecognized command-line option ‘-mretpoline-external-thunk’
      cc1: note: unrecognized command-line option ‘-Wno-initializer-overrides’ may have been intended to silence earlier diagnostics
      cc1: note: unrecognized command-line option ‘-Wno-tautological-constant-out-of-range-compare’ may have been intended to silence earlier diagnostics
      cc1: note: unrecognized command-line option ‘-Wno-gnu’ may have been intended to silence earlier diagnostics
      

      igb_uio由0001-add-igb_uio.patch引入,该报错的原因是igb_uio使用make构建时的命令并未指定编译器,默认使用了gcc而非clang,与kernel构建时使用的编译器clang不同。源代码中仅仅在kernel/linux/meson.build中指定了仅当交叉编译时会显式指定CC以及LD,而全部使用clang的情况并不会判定为交叉编译。

      • 向kernel/linux/igb_uio/meson.build中执行的make命令添加指定CC参数,当kernel使用clang时添加CC=clang后上述问题消失,clang构建成功。 添加的获取kernel使用的编译器是否为clang的代码比较粗糙,但我不太知道有没有更好的获取该信息的方法。原本有一个很好的方案,即直接使用CC=cc.get_id(),但这样在OBS验证工程中并没有全部通过,在验证工程Mega:24.09有遇到过与上述报错恰恰相反的报错,即kernel使用gcc构建而其他都使用clang构建(也就是meson检测到的C编译器为clang)的情况,原因不太清楚。
  • 在CFLAGS添加-fgcc-compatible是因为在线上OBS验证工程Mega-LLVM:24.03中提供的standard_aarch64环境中,会出现如下失败日志:

    ...
    [   78s] Compiler for C supports arguments -Wcast-qual: NO
    [   78s] Compiler for C supports arguments -Wdeprecated: NO
    [   78s] Compiler for C supports arguments -Wformat: NO
    [   78s] Compiler for C supports arguments -Wformat-nonliteral: NO
    [   78s] Compiler for C supports arguments -Wformat-security: NO
    [   78s] Compiler for C supports arguments -Wmissing-declarations: NO
    [   78s] Compiler for C supports arguments -Wmissing-prototypes: NO
    [   78s] Compiler for C supports arguments -Wnested-externs: NO
    [   78s] Compiler for C supports arguments -Wold-style-definition: NO
    [   78s] Compiler for C supports arguments -Wpointer-arith: NO
    [   78s] Compiler for C supports arguments -Wsign-compare: NO
    [   78s] Compiler for C supports arguments -Wstrict-prototypes: NO
    [   78s] Compiler for C supports arguments -Wundef: NO
    [   78s] Compiler for C supports arguments -Wwrite-strings: NO
    [   78s] Compiler for C supports arguments -Wno-address-of-packed-member: NO
    [   78s] Compiler for C supports arguments -Wno-packed-not-aligned: NO
    [   78s] Compiler for C supports arguments -Wno-missing-field-initializers: NO
    [   78s] Message: Arm implementer: Generic armv8
    [   78s] Message: Arm part number: generic
    [   78s] Compiler for C supports arguments -march=armv8-a: NO
    [   78s]
    [   78s] config/arm/meson.build:721:12: ERROR: Problem encountered: No suitable armv8 march version found.
    [   78s]
    [   78s] A full log can be found at /home/abuild/rpmbuild/BUILD/dpdk-23.11/openEuler-linux-build/meson-logs/meson-log.txt
    [   78s] error: Bad exit status from /var/tmp/rpm-tmp.GLGYUR (%build)
    [   78s]
    [   78s] RPM build errors:
    [   78s]     Bad exit status from /var/tmp/rpm-tmp.GLGYUR (%build)
    [   78s]
    [   78s]  failed "build dpdk.spec" at Thu Sep 19 05:59:41 UTC 2024.
    

    然而Mega:24.09的aarch64就不会出现该报错,且在上述修复后构建成功。经过对比构建日志发现二者环境中的CFLAGS不同,进而尝试之下发现添加-fgcc-compatible可以解决该问题。(笔者没有aarch64线下构建环境,具体原因暂不太清楚)

  • 09/30补充:经指导,上文中两个问题的具体原因为:

    - armv8问题,因为meson函数cc.has_argument函数会产生-wunused-commond-line报错,加-fgcc-compitable可以绕过
    - redefined报错,因为meson函数has_symbol_xx,将warning当成error所以该check没通过
likedislike
合并受阻
openeuler-ci-bot
openeuler-ci-bot成员
2024年9月19日 评论:

Hi yanyir, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-high-performance-network, and any of the maintainers: @nlgwcy , @li-yangyang20 , @bitcoffee , @jiangheng12 , @lilijun606 , @LemmyHuang , @li-huisong , @compile_success

likedislike
AtomGit-Bot
2024年9月19日 评论:

当前仓库存在以下 保护分支 :

Protected Branch Version Release
* master 23.11 20
openEuler-20.03-LTS-SP4 19.11 34
openEuler-22.03-LTS-SP1 21.11 68
openEuler-22.03-LTS-SP3 21.11 68
openEuler-22.03-LTS-SP4 21.11 69
openEuler-24.03-LTS 23.11 20
openEuler-24.03-LTS-Next 23.11 20
openEuler-24.09 23.11 20

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
openeuler-ci-botopeneuler-ci-bot成员
2024年9月19日 添加了 &nbsp; openeuler-cla/yes 标签
openeuler-ci-bot
openeuler-ci-bot成员
2024年9月19日 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/src-openeuler/trigger/dpdk/1119/console

likedislike
openeuler-ci-botopeneuler-ci-bot成员
2024年9月19日 添加了 &nbsp; ci_processing 标签
此处折叠了114条消息 查看更多
xiajingze
xiajingze2024年10月11日进行代码检视1
0046-modify-some-meson.build-to-fix-clang-build.patch
@@ -24,0 +36,0 @@
36+ )
37+
38++cc_param = ''
39++kernel_compile_file = '/lib/modules/' + run_command('uname', '-r').stdout().strip() + '/build/include/generated/compile.h'
xiajingze
xiajingze2024年10月11日评论:

是不是可以在/usr/src/kernels/${uname -r}/.config中查看CONFIG_CC_VERSION_TEXT

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
8月22日 评论:

/check-cla

likedislike
openeuler-ci-botopeneuler-ci-bot成员
8月22日 删除了label:openeuler-cla/yes
openeuler-ci-botopeneuler-ci-bot成员
8月22日 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
8月22日 评论:

CLA Signature Pass

yanyir, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike