From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.46.186]) by dpdk.org (Postfix) with ESMTP id 9E463333 for ; Mon, 22 Sep 2014 21:17:40 +0200 (CEST) Received: from 76-225-216-21.pools.spcsdns.net (unknown [66.87.119.76]) by mail.mhcomputing.net (Postfix) with ESMTPSA id 67AB880D36A; Mon, 22 Sep 2014 12:23:17 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <20140922131851.GG25406@hmsreliant.think-freely.org> References: <59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com> <20140922131851.GG25406@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: Matthew Hall Date: Mon, 22 Sep 2014 12:23:36 -0700 To: Neil Horman , "Richardson, Bruce" Message-ID: Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] compile error with linuxapp-clang target on Fedora 20 with 3.15.10 kernel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 19:17:41 -0000 I fixed some of the clang errors a few weeks ago. But some of my patches got sent back due to issues seen by others and I didn't have time to fix them yet. -- Sent from my mobile device. On September 22, 2014 6:18:51 AM PDT, Neil Horman wrote: >On Mon, Sep 22, 2014 at 09:36:33AM +0000, Richardson, Bruce wrote: >> Hi all, >> >> just looking to see if anyone has any suggestions to help me debug an >issue I'm seeing here. Basically, the clang target is no longer working >for me on Fedora 20 -due to errors when compiling up the kernel >modules. The interesting thing is that the gcc target works fine, while >the clang target doesn't - despite the fact that gcc is used as the >compiler for the kernel modules in both builds. Something else about >the clang target is affecting the kernel compile. >> >> From my investigation, it looks like the compiler flags used in both >cases are different, but I'm not sure why. The output of compiling up >the first of the kni files is shown below, first for a regular gcc >target and secondly for the clang target. From what I read, some >initial support for clang compiler went into the 3.15 kernels - is it >possible that clang is being incorrectly detected as the kernel >compiler by the kernel build system in the second case? >> >> Regards, >> /Bruce >> >> #### GCC TARGET COMPILE >> == Build lib/librte_eal/linuxapp/kni >> make -C /usr/src/kernels/3.15.10-201.fc20.x86_64 \ >> KBUILD_SRC=/usr/src/kernels/3.15.10-201.fc20.x86_64 \ >> >KBUILD_EXTMOD="/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni" >-f /usr/src/kernels/3.15.10-201.fc20.x86_64/Makefile \ >> >> test -e include/generated/autoconf.h -a -e include/config/auto.conf >|| ( \ >> echo >&2; \ >> echo >&2 " ERROR: Kernel configuration is invalid."; \ >> echo >&2 " include/generated/autoconf.h or >include/config/auto.conf are missing.";\ >> echo >&2 " Run 'make oldconfig && make prepare' on kernel src >to fix it."; \ >> echo >&2 ; \ >> /bin/false) >> mkdir -p >/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/.tmp_versions >; rm -f >/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/.tmp_versions/* >> make -f >/usr/src/kernels/3.15.10-201.fc20.x86_64/scripts/Makefile.build >obj=/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni >> gcc >-Wp,-MD,/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/.ixgbe_main.o.d >-nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/arch/x86/include >-Iarch/x86/include/generated >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/include -Iinclude >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/arch/x86/include/uapi >-Iarch/x86/include/generated/uapi >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/include/uapi >-Iinclude/generated/uapi -include >/usr/src/kernels/3.15.10-201.fc20.x86_64/include/linux/kconfig.h >-I/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni >-D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs >-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration >-Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx >-mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 >-mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time >-maccumulate-outgoing-args -DCONFIG_AS_CFI=1 >-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 >-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 >-DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare >-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow >-mno-avx -Wframe-larger-than=2048 -fstack-protector-strong >-Wno-unused-but-set-variable -fno-omit-frame-pointer >-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg >-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement >-Wno-pointer-sign -fno-strict-overflow -fconserve-stack >-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni --param >max-inline-insns-single=50 >-I/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/include >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni/ethtool/ixgbe >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni/ethtool/igb >-include >/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/include/rte_config.h >-Wall -Werror -DMODULE -D"KBUILD_STR(s)=#s" >-D"KBUILD_BASENAME=KBUILD_STR(ixgbe_main)" >-D"KBUILD_MODNAME=KBUILD_STR(rte_kni)" -c -o >/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o >/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c >> >> #### CLANG TARGET COMPILE (MODULE COMPILED USING GCC) >> == Build lib/librte_eal/linuxapp/kni >> make -C /usr/src/kernels/3.15.10-201.fc20.x86_64 \ >> KBUILD_SRC=/usr/src/kernels/3.15.10-201.fc20.x86_64 \ >> >KBUILD_EXTMOD="/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni" >-f /usr/src/kernels/3.15.10-201.fc20.x86_64/Makefile \ >> >> test -e include/generated/autoconf.h -a -e include/config/auto.conf >|| ( \ >> echo >&2; \ >> echo >&2 " ERROR: Kernel configuration is invalid."; \ >> echo >&2 " include/generated/autoconf.h or >include/config/auto.conf are missing.";\ >> echo >&2 " Run 'make oldconfig && make prepare' on kernel src >to fix it."; \ >> echo >&2 ; \ >> /bin/false) >> mkdir -p >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/.tmp_versions >; rm -f >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/.tmp_versions/* >> make -f >/usr/src/kernels/3.15.10-201.fc20.x86_64/scripts/Makefile.build >obj=/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni >> gcc >-Wp,-MD,/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/.ixgbe_main.o.d >-nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.3/include >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/arch/x86/include >-Iarch/x86/include/generated >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/include -Iinclude >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/arch/x86/include/uapi >-Iarch/x86/include/generated/uapi >-I/usr/src/kernels/3.15.10-201.fc20.x86_64/include/uapi >-Iinclude/generated/uapi -include >/usr/src/kernels/3.15.10-201.fc20.x86_64/include/linux/kconfig.h >-I/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni >-D__KERNEL__ -Wno-unknown-warning-option -Wall -Wundef >-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common >-Werror-implicit-function-declaration -Wno-format-security >-fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mno-80387 >-mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic >-mno-red-zone -mcmodel=kernel -funit-at-a-time >-maccumulate-outgoing-args -DCONFIG_AS_CFI=1 >-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 >-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 >-DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare >-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow >-mno-avx -Wframe-larger-than=2048 -fstack-protector-strong >-Wno-unused-variable -fno-omit-frame-pointer >-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg >-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement >-Wno-pointer-sign -fno-strict-overflow -fconserve-stack >-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni --param >max-inline-insns-single=50 >-I/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/include >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni/ethtool/ixgbe >-I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni/ethtool/igb >-include >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/include/rte_config.h >-Wall -Werror -DMODULE -D"KBUILD_STR(s)=#s" >-D"KBUILD_BASENAME=KBUILD_STR(ixgbe_main)" >-D"KBUILD_MODNAME=KBUILD_STR(rte_kni)" -c -o >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c >> In file included from >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c:34:0: >> /usr/src/kernels/3.15.10-201.fc20.x86_64/include/linux/netdevice.h: >In function 'netif_addr_lock_nested': >> >/usr/src/kernels/3.15.10-201.fc20.x86_64/include/linux/netdevice.h:2954:6: >error: variable 'subclass' set but not used >[-Werror=unused-but-set-variable] >> int subclass = SINGLE_DEPTH_NESTING; >> ^ >> >/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c: >At top level: >> cc1: error: unrecognized command line option >"-Wno-unknown-warning-option" [-Werror] >> cc1: all warnings being treated as errors >> make[10]: *** >[/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o] >Error 1 >> make[9]: *** >[_module_/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kni] >Error 2 >> make[8]: *** [sub-make] Error 2 >> make[7]: *** [rte_kni.ko] Error 2 >> make[6]: *** [kni] Error 2 >> make[5]: *** [linuxapp] Error 2 >> make[4]: *** [librte_eal] Error 2 >> make[3]: *** [lib] Error 2 >> make[2]: *** [all] Error 2 >> make[1]: *** [x86_64-native-linuxapp-clang_install] Error 2 >> make: *** [install] Error 2 >> > > >FWIW, gcc documents the -Wno-unknown-warning option, not the >-Wno-unknown-warning-option option, so it seems that, when using the >clang >config something about it is slipping in an extra option that gcc is >choking on, >though I can