DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] compile error with linuxapp-clang target on Fedora 20 with 3.15.10 kernel
Date: Mon, 22 Sep 2014 09:36:33 +0000	[thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com> (raw)

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

             reply	other threads:[~2014-09-22  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22  9:36 Richardson, Bruce [this message]
2014-09-22 13:18 ` Neil Horman
2014-09-22 19:23   ` Matthew Hall
2014-09-22 20:05     ` Neil Horman
2014-09-22 22:12       ` Matthew Hall
2014-09-23  9:59         ` Bruce Richardson
2014-09-23 17:08           ` Matthew Hall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59AF69C657FD0841A61C55336867B5B0344015CB@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).