From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E75EFB3BC for ; Mon, 22 Sep 2014 11:31:12 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 22 Sep 2014 02:37:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,571,1406617200"; d="scan'208";a="594885511" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 22 Sep 2014 02:37:13 -0700 Received: from irsmsx109.ger.corp.intel.com (163.33.3.23) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 22 Sep 2014 10:36:34 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.112]) by IRSMSX109.ger.corp.intel.com ([169.254.13.200]) with mapi id 14.03.0195.001; Mon, 22 Sep 2014 10:36:34 +0100 From: "Richardson, Bruce" To: "dev@dpdk.org" Thread-Topic: compile error with linuxapp-clang target on Fedora 20 with 3.15.10 kernel Thread-Index: Ac/WR0famoKrrTg0QwGzUDsED7pHVA== Date: Mon, 22 Sep 2014 09:36:33 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [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 09:31:13 -0000 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 o= n Fedora 20 -due to errors when compiling up the kernel modules. The intere= sting 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 modul= es in both builds. Something else about the clang target is affecting the k= ernel 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 o= f 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 com= piler went into the 3.15 kernels - is it possible that clang is being incor= rectly detected as the kernel compiler by the kernel build system in the se= cond case? Regards, /Bruce #### 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/l= ib/librte_eal/linuxapp/kni" -f /usr/src/kernels/3.15.10-201.fc20.x86_64/Mak= efile \ 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 fi= x it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/librt= e_eal/linuxapp/kni/.tmp_versions ; rm -f /home/bruce/mbuf_rework/x86_64-nat= ive-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= =3D/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/x8= 6_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-2= 01.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 /us= r/src/kernels/3.15.10-201.fc20.x86_64/include/linux/kconfig.h -I/home/bru= ce/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-secu= rity -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mno-80387 = -mno-fp-ret-in-387 -mpreferred-stack-boundary=3D3 -mtune=3Dgeneric -mno-red= -zone -mcmodel=3Dkernel -funit-at-a-time -maccumulate-outgoing-args -DCONFI= G_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-ss= e -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=3D2048 -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-ov= erflow -fconserve-stack -Werror=3Dimplicit-int -Werror=3Dstrict-prototypes = -DCC_HAVE_ASM_GOTO -I/home/bruce/mbuf_rework/lib/librte_eal/linuxapp/kni = --param max-inline-insns-single=3D50 -I/home/bruce/mbuf_rework/x86_64-nat= ive-linuxapp-gcc/include -I/home/bruce/mbuf_rework/lib/librte_eal/linuxap= p/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/in= clude/rte_config.h -Wall -Werror -DMODULE -D"KBUILD_STR(s)=3D#s" -D"KBUIL= D_BASENAME=3DKBUILD_STR(ixgbe_main)" -D"KBUILD_MODNAME=3DKBUILD_STR(rte_kn= i)" -c -o /home/bruce/mbuf_rework/x86_64-native-linuxapp-gcc/build/lib/libr= te_eal/linuxapp/kni/ixgbe_main.o /home/bruce/mbuf_rework/x86_64-native-linu= xapp-gcc/build/lib/librte_eal/linuxapp/kni/ixgbe_main.c #### 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/build= /lib/librte_eal/linuxapp/kni" -f /usr/src/kernels/3.15.10-201.fc20.x86_64/M= akefile \ 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 fi= x it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/lib= rte_eal/linuxapp/kni/.tmp_versions ; rm -f /home/bruce/mbuf_rework/x86_64-n= ative-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= =3D/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_ea= l/linuxapp/kni gcc -Wp,-MD,/home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/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-clang/build/lib/librte_eal/linuxapp= /kni -D__KERNEL__ -Wno-unknown-warning-option -Wall -Wundef -Wstrict-protot= ypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-funct= ion-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m= 64 -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-bounda= ry=3D3 -mtune=3Dgeneric -mno-red-zone -mcmodel=3Dkernel -funit-at-a-time -m= accumulate-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-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 func= tion '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-varia= ble] int subclass =3D SINGLE_DEPTH_NESTING; ^ /home/bruce/mbuf_rework/x86_64-native-linuxapp-clang/build/lib/librte_eal/l= inuxapp/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/l= ib/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