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

error: 'ARPHRD_MCTP' undeclared (first use in this function) #20694

Closed
cpackham-atlnz opened this issue Sep 9, 2021 · 1 comment · Fixed by #20695
Closed

error: 'ARPHRD_MCTP' undeclared (first use in this function) #20694

cpackham-atlnz opened this issue Sep 9, 2021 · 1 comment · Fixed by #20695
Labels

Comments

@cpackham-atlnz
Copy link
Contributor

systemd version the issue has been seen with

v249
v243

Used distribution

custom build for embedded devices

Linux kernel version used (uname -a)

Tip of Linus's tree v5.14-10557-ga3fa7a101dcf

CPU architecture issue was seen on

aarch64

Expected behaviour you didn't see

Successful compilation

Unexpected behaviour you saw

Build fails with following message

armv8,systemd: FAILED: src/basic/libbasic.a.p/arphrd-list.c.o
armv8,systemd: aarch64-unknown-linux-gnu-gcc --sysroot=/usr/src/linuxbox/output/armv8/systemd/staging -Isrc/basic/libbasic.a.p -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I/usr/src/linuxbox/output/armv8/syste
md/staging/usr/include -I/usr/src/linuxbox/output/armv8/systemd/staging/usr/include/libmount -I/usr/src/linuxbox/output/armv8/systemd/staging/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-format-signedn
ess -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=overflow -Werror=return-type -Werror=shift-count-overflow -Werror=shi
ft-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attr
ibute=noreturn -Wwrite-strings -Wno-maybe-uninitialized -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -ffast-math -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fvisibility=hidden --param=ssp-buffer-size=4
 -Wno-shadow -include config.h -fPIC -pthread -fvisibility=default -MD -MQ src/basic/libbasic.a.p/arphrd-list.c.o -MF src/basic/libbasic.a.p/arphrd-list.c.o.d -o src/basic/libbasic.a.p/arphrd-list.c.o -c ../src/basic/arphrd-list.c
armv8,systemd: In file included from ../src/basic/arphrd-list.c:12:
armv8,systemd: src/basic/arphrd-from-name.gperf: In function 'lookup_arphrd':   
armv8,systemd: src/basic/arphrd-from-name.gperf:62:16: error: 'ARPHRD_MCTP' undeclared (first use in this function); did you mean 'ARPHRD_FCPP'?
armv8,systemd:  MCTP, ARPHRD_MCTP
armv8,systemd:                 ^~
armv8,systemd:                 ARPHRD_FCPP
armv8,systemd: src/basic/arphrd-from-name.gperf:62:16: note: each undeclared identifier is reported only once for each function it appears in
armv8,systemd: In file included from ../src/basic/arphrd-list.c:13:
armv8,systemd: src/basic/arphrd-to-name.h: In function 'arphrd_to_name':
armv8,systemd: src/basic/arphrd-to-name.h:55:14: error: 'ARPHRD_MCTP' undeclared (first use in this function); did you mean 'ARPHRD_FCPP'?
armv8,systemd:          case ARPHRD_MCTP: return "MCTP";
armv8,systemd:               ^~~~~~~~~~~
armv8,systemd:               ARPHRD_FCPP

I'm assuming there's some change in the definition of ARPHRD_MCTP in the kernel uapi headers. I haven't investigated that yet.

Steps to reproduce the problem

Unsure, might be possible to reproduce with the right packages under buildroot

Additional program output to the terminal or log subsystem illustrating the issue

@cpackham-atlnz
Copy link
Contributor Author

Looks like there's a bundled src/basic/linux/if_arp.h which doesn't have the ARPHRD_MCTP definition. Looking at the build line above -Isrc/basic -I../src/basic is before the "normal" -I/usr/src/linuxbox/output/armv8/systemd/staging/usr/include where the header from the kernel is placed.

cpackham-atlnz added a commit to cpackham-atlnz/systemd that referenced this issue Sep 9, 2021
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694
yuwata pushed a commit that referenced this issue Sep 10, 2021
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes #20694
codepeon pushed a commit to codepeon/systemd that referenced this issue Oct 14, 2021
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)
bluca pushed a commit to bluca/systemd that referenced this issue Nov 24, 2021
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
bluca pushed a commit to bluca/systemd that referenced this issue Jan 21, 2022
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
bluca pushed a commit to bluca/systemd that referenced this issue Jan 31, 2022
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
bluca pushed a commit to bluca/systemd that referenced this issue Mar 4, 2022
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
bluca pushed a commit to bluca/systemd that referenced this issue Oct 3, 2022
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
bluca pushed a commit to bluca/systemd that referenced this issue Apr 21, 2023
ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition

Fixes systemd#20694

(cherry picked from commit 7c5b995)

(cherry picked from commit 1d4d6fa v247-stable)
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants