From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 787C8B3AC for ; Mon, 22 Sep 2014 15:12:59 +0200 (CEST) Received: from [2001:470:8:a08:18c5:c64e:4bf:67a] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XW3Vz-0003Mw-O1; Mon, 22 Sep 2014 09:19:02 -0400 Date: Mon, 22 Sep 2014 09:18:51 -0400 From: Neil Horman To: "Richardson, Bruce" Message-ID: <20140922131851.GG25406@hmsreliant.think-freely.org> References: <59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No 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 13:12:59 -0000 On Mon, Sep 22, 2014 at 09:36:33AM +0000, Richardson, Bruce wrote: > Hi all, >=20 > just looking to see if anyone has any suggestions to help me debug an iss= ue 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 inte= resting thing is that the gcc target works fine, while the clang target doe= sn't - despite the fact that gcc is used as the compiler for the kernel mod= ules in both builds. Something else about the clang target is affecting the= kernel compile. >=20 > From my investigation, it looks like the compiler flags used in both case= s 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 second= ly for the clang target. From what I read, some initial support for clang c= ompiler went into the 3.15 kernels - is it possible that clang is being inc= orrectly detected as the kernel compiler by the kernel build system in the = second case? >=20 > Regards, > /Bruce >=20 > #### GCC TARGET COMPILE > =3D=3D Build lib/librte_eal/linuxapp/kni > make -C /usr/src/kernels/3.15.10-201.fc20.x86_64 \ > KBUILD_SRC=3D/usr/src/kernels/3.15.10-201.fc20.x86_64 \ > KBUILD_EXTMOD=3D"/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/M= akefile \ >=20 > 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.co= nf 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/lib= rte_eal/linuxapp/kni/.tmp_versions ; rm -f /home/bruce/mbuf_rework/x86_64-n= ative-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 o= bj=3D/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_ea= l/linuxapp/kni > gcc -Wp,-MD,/home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/li= b/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_6= 4/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/kerne= ls/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/b= ruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/k= ni -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-stric= t-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-se= curity -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mno-8038= 7 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3D3 -mtune=3Dgeneric -mno-r= ed-zone -mcmodel=3Dkernel -funit-at-a-time -maccumulate-outgoing-args -DCON= FIG_AS_CFI=3D1 -DCONFIG_AS_CFI_SIGNAL_FRAME=3D1 -DCONFIG_AS_CFI_SECTIONS=3D= 1 -DCONFIG_AS_FXSAVEQ=3D1 -DCONFIG_AS_CRC32=3D1 -DCONFIG_AS_AVX=3D1 -DCONFI= G_AS_AVX2=3D1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-= sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=3D2048 -fsta= ck-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -f= no-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DC= C_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-= overflow -fconserve-stack -Werror=3Dimplicit-int -Werror=3Dstrict-prototype= s -DCC_HAVE_ASM_GOTO -I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kn= i --param max-inline-insns-single=3D50 -I/home/bruce/mbuf_rework/x86_64-n= ative-linuxapp-gcc/include -I/home/bruce/mbuf_rework/lib/librte_eal/linux= app/kni/ethtool/ixgbe -I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/k= ni/ethtool/igb -include /home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/= include/rte_config.h -Wall -Werror -DMODULE -D"KBUILD_STR(s)=3D#s" -D"KBU= ILD_BASENAME=3DKBUILD_STR(ixgbe_main)" -D"KBUILD_MODNAME=3DKBUILD_STR(rte_= kni)" -c -o /home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/li= brte_eal/linuxapp/kni/ixgbe_main.o /home/bruce/mbuf_rework/x86_64-native-li= nuxapp-gcc/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c >=20 > #### CLANG TARGET COMPILE (MODULE COMPILED USING GCC) > =3D=3D Build lib/librte_eal/linuxapp/kni > make -C /usr/src/kernels/3.15.10-201.fc20.x86_64 \ > KBUILD_SRC=3D/usr/src/kernels/3.15.10-201.fc20.x86_64 \ > KBUILD_EXTMOD=3D"/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/bui= ld/lib/librte_eal/linuxapp/kni" -f /usr/src/kernels/3.15.10-201.fc20.x86_64= /Makefile \ >=20 > 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.co= nf 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/l= ibrte_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 o= bj=3D/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/gc= c/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.x8= 6_64/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/ker= nels/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/linuxa= pp/kni -D__KERNEL__ -Wno-unknown-warning-option -Wall -Wundef -Wstrict-prot= otypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-fun= ction-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 = -m64 -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boun= dary=3D3 -mtune=3Dgeneric -mno-red-zone -mcmodel=3Dkernel -funit-at-a-time = -maccumulate-outgoing-args -DCONFIG_AS_CFI=3D1 -DCONFIG_AS_CFI_SIGNAL_FRAME= =3D1 -DCONFIG_AS_CFI_SECTIONS=3D1 -DCONFIG_AS_FXSAVEQ=3D1 -DCONFIG_AS_CRC32= =3D1 -DCONFIG_AS_AVX=3D1 -DCONFIG_AS_AVX2=3D1 -pipe -Wno-sign-compare -fno-= asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx = -Wframe-larger-than=3D2048 -fstack-protector-strong -Wno-unused-variable -f= no-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignm= ents -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-p= ointer-sign -fno-strict-overflow -fconserve-stack -Werror=3Dimplicit-int -W= error=3Dstrict-prototypes -DCC_HAVE_ASM_GOTO -I/home/bruce/mbuf_rework/li= b/librte_eal/linuxapp/kni --param max-inline-insns-single=3D50 -I/home/br= uce/mbuf_rework/x86_64-native-linuxapp-clang/include -I/home/bruce/mbuf_r= ework/lib/librte_eal/linuxapp/kni/ethtool/ixgbe -I/home/bruce/mbuf_rework= /lib/librte_eal/linuxapp/kni/ethtool/igb -include /home/bruce/mbuf_rework/x= 86_64-native-linuxapp-clang/include/rte_config.h -Wall -Werror -DMODULE -= D"KBUILD_STR(s)=3D#s" -D"KBUILD_BASENAME=3DKBUILD_STR(ixgbe_main)" -D"KBUI= LD_MODNAME=3DKBUILD_STR(rte_kni)" -c -o /home/bruce/mbuf_rework/x86_64-nati= ve-linuxapp-clang/build/lib/librte_eal/linuxapp/kni/ixgbe_main.o /home/bruc= e/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/linuxapp/kn= i/ixgbe_main.c > In file included from /home/bruce/mbuf_rework/x86_64-native-linuxapp-clan= g/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 fu= nction '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=3Dunused-but-set-var= iable] > int subclass =3D 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-clan= g/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 >=20 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 chokin= g on, though I can't see what that might be from my git tree Neil