Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UADK doesn't build under x86_64 #3373

Closed
mikeBashStuff opened this issue May 14, 2024 · 2 comments
Closed

UADK doesn't build under x86_64 #3373

mikeBashStuff opened this issue May 14, 2024 · 2 comments
Labels

Comments

@mikeBashStuff
Copy link
Contributor

Sighting report

Recently, UADK was added to the pkgdep via 1360321. Since it was also pinned to install_all_dependencies() our imaging infrastructure picked it up. The build failed across all the distros with this (example taken from fedora38, though the same failure is seen under ubuntu, centos, rocky):

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c: In function 'wd_check_ce_support':

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c:103:58: error: 'HWCAP_CE_SM3' undeclared (first use in this function)

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:   103 |         if (!strcmp("isa_ce_sm3", dev_name) && (hwcaps & HWCAP_CE_SM3))

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:       |                                                          ^~~~~~~~~~~~

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c:103:58: note: each undeclared identifier is reported only once for each function it appears in

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c:106:58: error: 'HWCAP_CE_SM4' undeclared (first use in this function)

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:   106 |         if (!strcmp("isa_ce_sm4", dev_name) && (hwcaps & HWCAP_CE_SM4))

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:       |                                                          ^~~~~~~~~~~~

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c: In function 'wd_check_sve_support':

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: wd_alg.c:119:22: error: 'HWCAP_SVE' undeclared (first use in this function)

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:   119 |         if (hwcaps & HWCAP_SVE)

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38:       |                      ^~~~~~~~~

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: make[1]: *** [Makefile:1011: wd_alg.lo] Error 1

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00:     fedora38: make[1]: Leaving directory '/usr/local/src/uadk'

[2024-05-13T14:56:14.920Z] 2024-05-13T16:56:14+02:00: ==> fedora38: make: *** [Makefile:1105: install-recursive] Error 1

[2024-05-13T14:56:15.180Z] 2024-05-13T16:56:14+02:00: ==> fedora38: retry limit reached.

[2024-05-13T14:56:15.180Z] 2024-05-13T16:56:14+02:00: ==> fedora38: Provisioning step had errors: Running the cleanup provisioner, if present...

[2024-05-13T14:56:15.181Z] 2024-05-13T16:56:14+02:00: ==> fedora38: Deleting output directory...

After a closer inspection it seems that UADK is quite ARM-centric since the above macros the compiler is complaining about are declared only for ARM-based systems (see ./include/wd_alg.h):

#if defined(__arm__) || defined(__arm)
# define HWCAP                  AT_HWCAP
# define HWCAP_NEON             (1 << 12)

# define HWCAP_CE               AT_HWCAP2
# define HWCAP_CE_AES           (1 << 0)
# define HWCAP_CE_PMULL         (1 << 1)
# define HWCAP_CE_SHA1          (1 << 2)
# define HWCAP_CE_SHA256        (1 << 3)
#elif defined(__aarch64__)
# define HWCAP                  AT_HWCAP
# define HWCAP_NEON             (1 << 1)

# define HWCAP_CE               HWCAP
# define HWCAP_CE_AES           (1 << 3)
# define HWCAP_CE_PMULL         (1 << 4)
# define HWCAP_CE_SHA1          (1 << 5)
# define HWCAP_CE_SHA256        (1 << 6)
# define HWCAP_CPUID            (1 << 11)
# define HWCAP_SHA3             (1 << 17)
# define HWCAP_CE_SM3           (1 << 18)
# define HWCAP_CE_SM4           (1 << 19)
# define HWCAP_CE_SHA512        (1 << 21)
# define HWCAP_SVE              (1 << 22)
/* AT_HWCAP2 */
# define HWCAP2                 26
# define HWCAP2_SVE2            (1 << 1)
# define HWCAP2_RNG             (1 << 16)
#endif

include/drv/arm_arch_ce.h also seems to look only for ARM.

Considering all that, UADK should be, at minimum, removed from install_all_dependencies() to make sure the --all does not suddenly break.

Also, just to note, under FreeBSD the build fails already at the autoconf stage:

[2024-05-13T15:36:47.134Z] 2024-05-13T17:36:47+02:00: ==> freebsd14: configure.ac:30: error: possibly undefined macro: AC_DEFINE

[2024-05-13T15:36:47.134Z] 2024-05-13T17:36:47+02:00: ==> freebsd14:       If this token and others are legitimate, please use m4_pattern_allow.

[2024-05-13T15:36:47.134Z] 2024-05-13T17:36:47+02:00: ==> freebsd14:       See the Autoconf documentation.

[2024-05-13T15:36:47.135Z] 2024-05-13T17:36:47+02:00: ==> freebsd14: autoreconf2.72: error: /usr/local/bin/autoconf2.72 failed with exit status: 1
@mikeBashStuff
Copy link
Contributor Author

https://review.spdk.io/gerrit/c/spdk/spdk/+/23089. The alternative is to drive the $INSTALL_UADK setup with extra arch checks but this seems to be the simplest of solutions.

spdk-bot pushed a commit that referenced this issue May 15, 2024
UADK doesn't build under x86_64 platforms so it cannot be installed
by the very default under the --all flag.

See #3373.

Change-Id: Ied40bc3da02b1d9435ae31de8ea5dfe96f784291
Signed-off-by: Michal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23089
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <jim.harris@samsung.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
@mikeBashStuff
Copy link
Contributor Author

Patch got merged, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 14.05
Development

No branches or pull requests

1 participant