Skip to contentSkip to conversation

lib/eal make build failed with gcc10.3.0 and clang11.0.1 on FreeBSD13.0/64

Bug 1064 [email protected] 1 participant 2 messages Aug 8, 2022 – Dec 8, 2022

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=1064

            Bug ID: 1064
           Summary: [19.11.13-rc3] lib/eal make build failed with
                    gcc10.3.0 and clang11.0.1 on FreeBSD13.0/64
           Product: DPDK
           Version: 19.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

[DPDK version]
dpdk stable v19.11.13-rc3

[OS version]
FreeBSD 13.0-RELEASE
gcc10.3.0
clang11.0.1

[Test Setup]
sed -i -e 's/BNX2X_PMD=n$/BNX2X_PMD=y/' config/common_base sed -i -e 's/PMD_PCAP=n$/PMD_PCAP=y/' config/common_base sed -i -e 's/IGB_UIO=n$/IGB_UIO=y/' config/common_base sed -i -e 's/PMD_QAT_SYM=n$/PMD_QAT_SYM=y/' config/common_base sed -i -e 's/PMD_OPENSSL=n$/PMD_OPENSSL=y/' config/common_base sed -i -e 's/PMD_ISAL=n$/PMD_ISAL=y/' config/common_base sed -i -e 's/PMD_ZLIB=n$/PMD_ZLIB=y/' config/common_base sed -i -e 's/KNI_KMOD=y$/KNI_KMOD=n/' config/common_base

gmake -j10 install T=x86_64-native-bsdapp-clang gmake -j10 install T=x86_64-native-bsdapp-gcc gmake -j10 install T=x86_64-native-bsdapp-gcc+shared gmake -j10 install T=x86_64-native-bsdapp-gcc+debug

[Error log] /root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:
In function 'compute_ctrl_threads_cpuset':
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1497:60:
error: macro "CPU_OR" passed 3 arguments, but takes just 2
1497 | RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset);
| ^
In file included from /usr/include/pthread_np.h:37,
--
In file included from /root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_common.h:28,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_string_fns.h:21,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:19:
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:59:20:
error: 'CPU_OR' undeclared (first use in this function)
59 | #define RTE_CPU_OR CPU_OR

      |                    ^~~~~~

/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1497:3:
note: in expansion of macro 'RTE_CPU_OR'
-- /root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1497:3:
note: in expansion of macro 'RTE_CPU_OR'

 1497 |   RTE_CPU_OR(cpuset, cpuset, &lcore_config[lcore_id].cpuset);
      |   ^~~~~~~~~~
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:62:2:
error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'?
   62 |  cpu_set_t tmp; \
      |  ^~~~~~~~~

/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1499:2:
note: in expansion of macro 'RTE_CPU_NOT'
--
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_common.h:28,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_string_fns.h:21,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:19:
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:63:2:
error: request for member '__bits' in something not a structure or union

   63 |  CPU_FILL(&tmp); \
      |  ^~~~~~~~

/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1499:2:
note: in expansion of macro 'RTE_CPU_NOT'
--
In file included from /root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_common.h:28,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_string_fns.h:21,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:19:
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:64:2:
error: implicit declaration of function 'CPU_XOR'; did you mean 'CPU_OR'? [-Werror=implicit-function-declaration]

   64 |  CPU_XOR(dst, src, &tmp); \
      |  ^~~~~~~
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1499:2:
note: in expansion of macro 'RTE_CPU_NOT'
 1499 |  RTE_CPU_NOT(cpuset, cpuset);
      |  ^~~~~~~~~~~
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:64:2:
error: nested extern declaration of 'CPU_XOR' [-Werror=nested-externs]
   64 |  CPU_XOR(dst, src, &tmp); \
      |  ^~~~~~~
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1499:2:
note: in expansion of macro 'RTE_CPU_NOT'
 1499 |  RTE_CPU_NOT(cpuset, cpuset);
      |  ^~~~~~~~~~~

/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1505:42:
error: macro "CPU_AND" passed 3 arguments, but takes just 2
1505 | RTE_CPU_AND(cpuset, cpuset, &default_set);
| ^
In file included from /usr/include/pthread_np.h:37,
--
In file included from /root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_common.h:28,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/x86_64-native-bsdapp-gcc/include/rte_string_fns.h:21,
from
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:19:
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/freebsd/eal/include/rte_os.h:58:21:
error: 'CPU_AND' undeclared (first use in this function)
58 | #define RTE_CPU_AND CPU_AND

      |                     ^~~~~~~
/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/lib/librte_eal/common/eal_common_options.c:1505:2:
note: in expansion of macro 'RTE_CPU_AND'
 1505 |  RTE_CPU_AND(cpuset, cpuset, &default_set);
      |  ^~~~~~~~~~~

cc1: all warnings being treated as errors
gmake[7]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/internal/rte.compile-pre.mk:116:
eal_common_options.o] Error 1
gmake[7]: *** Waiting for unfinished jobs....
gmake[6]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.subdir.mk:37:
eal] Error 2
gmake[5]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.subdir.mk:37:
freebsd] Error 2
gmake[4]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.subdir.mk:37:
librte_eal] Error 2
gmake[3]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.sdkbuild.mk:48:
lib] Error 2
gmake[2]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.sdkroot.mk:99:
all] Error 2
gmake[1]: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.sdkinstall.mk:61:
pre_install] Error 2
gmake: *** [/root/FreeBSD13-64_K13_GCC10.3.0/x86_64-native-bsdapp-gcc/20220805145143/dpdk/mk/rte.sdkroot.mk:77:
install] Error 2

[Bad commit]
commit 6e9e78dbbd2a28880f77b3ad47edebe5d3c7621e (HEAD)

Author: Bruce Richardson <[email protected]>
Date:   Thu Jul 28 12:37:50 2022 +0100

eal/freebsd: fix use of newer cpuset macros

FreeBSD has updated its CPU macros to align more with the definitions used on Linux[1]. Unfortunately, while this makes compatibility better in future, it means we need to have both legacy and newer definition support. Use a meson check to determine which set of macros are used.

[1] https://cgit.freebsd.org/src/commit/?id=e2650af157bc

Bugzilla ID: 1014

Fixes c3568ea37670 ("eal: restrict control threads to startup CPU

affinity")

Fixes b6be16acfeb1 ("eal: fix control thread affinity with --lcores")

This in new os freebsd13.1 no problem.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=1064

Bruce Richardson ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Bruce Richardson ([email protected]) --- Best fix is to update to BSD 13.1, so no code changes needed here. Other alternative is to use meson build which should work.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.