Skip to content
New issue

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

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

Already on GitHub? # to your account

Error building on Ubuntu 18.04 #3

Open
wililupy opened this issue Oct 2, 2019 · 0 comments
Open

Error building on Ubuntu 18.04 #3

wililupy opened this issue Oct 2, 2019 · 0 comments

Comments

@wililupy
Copy link

wililupy commented Oct 2, 2019

Hello,
When building these drivers on Ubuntu 18.04 with Kernel 4.15.0-65-generic I get the following error:

gcc -Wp,-MD,/root/Switch-SDK-Drivers/drivers/net/mlx_sx/.ioctl_host_ifc.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/7/include \
 \
-include include/generated/autoconf.h \
-include /root/Switch-SDK-Drivers/include/linux/autoconf.h \
-include /lib/modules/4.15.0-65-generic/build/include/linux/kconfig.h \
 \
-I/root/Switch-SDK-Drivers/include \
-I/root/Switch-SDK-Drivers/drivers/net/mlx_sx/debug/memtrack \
-Iinclude \
-Iarch/x86/include \
 \
-I./arch/x86/include \
-Iarch/x86/include/uapi -Iinclude/uapi -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude/generated/uapi \
 \
 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -DSYSTEM_PCI -Werror -Wall -Wswitch -Wunused -Wno-date-time  -DMODULE  -DKBUILD_BASENAME='"ioctl_host_ifc"'  -DKBUILD_MODNAME='"sx_core"' -c -o /root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.o /root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c
/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c: In function ‘ctrl_cmd_set_skb_offload_fwd_mark_en’:
/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c:1715:5: error: ‘err’ undeclared (first use in this function)
     err = copy_from_user((void*)&offload_fwd_mark_en,
     ^~~
/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c:1715:5: note: each undeclared identifier is reported only once for each function it appears in
/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c:1729:28: error: ‘dev’ undeclared (first use in this function); did you mean ‘cdev’?
     sx_core_dispatch_event(dev, SX_DEV_EVENT_OFFLOAD_MARK_SET, offload_mark_event_data);
                            ^~~
                            cdev
/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.c:1738:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.o' failed
make[3]: *** [/root/Switch-SDK-Drivers/drivers/net/mlx_sx/ioctl_host_ifc.o] Error 1
scripts/Makefile.build:604: recipe for target '/root/Switch-SDK-Drivers/drivers/net/mlx_sx' failed
make[2]: *** [/root/Switch-SDK-Drivers/drivers/net/mlx_sx] Error 2
Makefile:1571: recipe for target '_module_/root/Switch-SDK-Drivers' failed
make[1]: *** [_module_/root/Switch-SDK-Drivers] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-65-generic'
makefile:147: recipe for target 'kernel' failed
make: *** [kernel] Error 2

I tried adding cdev as the output requested, but that didn't fix this issue.
I ran ./configure the first time, and when that failed, I tried ./configure --without-memtrack --without-debug-info and run make and I still get the same result.
I have the linux-headers-4.15.0-65-generic and build-essential packages installed on the build system. Are there any other packages required for build?

Thanks,
Luke

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant