<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I have installed: llvm-3.5-dev, libclang-3.5-dev and libclang-common-3.5-dev but same error:<br>CMake Error at CMakeLists.txt:49 (message):<br> llvm-config not found -- LLVM_CONFIG-NOTFOUND<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-26 19:06 GMT+01:00 Jan-Simon Moeller <span dir="ltr"><<a href="mailto:dl9pf@gmx.de" target="_blank">dl9pf@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems to require the devel-package of clang3.5 if you try to compile "from-<br>
source". Install the -dev package of clang.<br>
<br>
Best,<br>
JS<br>
<br>
Am Mittwoch, 26. November 2014, 19:04:05 schrieb Juan Simón:<br>
<div class="HOEnZb"><div class="h5">> With 'CLANG_TOOLCHAIN=from-source' it fails when try to configure clang:<br>
> I: Configure Clang...<br>
> -- The C compiler identification is Clang 3.5.0<br>
> -- The CXX compiler identification is Clang 3.5.0<br>
> -- Check for working C compiler: /usr/bin/clang<br>
> -- Check for working C compiler: /usr/bin/clang -- works<br>
> -- Detecting C compiler ABI info<br>
> -- Detecting C compiler ABI info - done<br>
> -- Check for working CXX compiler: /usr/bin/clang++<br>
> -- Check for working CXX compiler: /usr/bin/clang++ -- works<br>
> -- Detecting CXX compiler ABI info<br>
> -- Detecting CXX compiler ABI info - done<br>
> CMake Error at CMakeLists.txt:49 (message):<br>
> llvm-config not found -- LLVM_CONFIG-NOTFOUND<br>
><br>
> CMakeOutput.log: <a href="http://pastebin.com/JxKRR5c9" target="_blank">http://pastebin.com/JxKRR5c9</a><br>
><br>
> 2014-11-26 18:36 GMT+01:00 Jan-Simon Moeller <<a href="mailto:dl9pf@gmx.de">dl9pf@gmx.de</a>>:<br>
> > Well, that seems to produce compiler crashes on the prebuilt version<br>
> > of the compiler.<br>
> ><br>
> > can you do make with 'CLANG_TOOLCHAIN=from-source' ?<br>
> ><br>
> > Best,<br>
> > Jan-Simon<br>
> ><br>
> > Am Mittwoch, 26. November 2014, 17:24:08 schrieb Juan Simón:<br>
> > > I've compiled now using 'LLVMLinux build system' with<br>
> > > 'CLANG_TOOLCHAIN=prebuilt make' and it fails too:<br>
> > > <a href="http://pastebin.com/mUKjDsPB" target="_blank">http://pastebin.com/mUKjDsPB</a><br>
> > ><br>
> > > 2014-11-26 17:02 GMT+01:00 Vinícius Tinti <<a href="mailto:viniciustinti@gmail.com">viniciustinti@gmail.com</a>>:<br>
> > > > Strange. But I think there are still missing commands. Normally I<br>
> ><br>
> > only use<br>
> ><br>
> > > > LLVMLinux build system for building.<br>
> > > ><br>
> > > > Any reason to not use it?<br>
> > > ><br>
> > > > I think it would be easier.<br>
> > > ><br>
> > > > On Wed, Nov 26, 2014, 13:46 Juan Simón <<a href="mailto:decedion@gmail.com">decedion@gmail.com</a>> wrote:<br>
> > > >> This is my Makefile: <a href="http://pastebin.com/NDXyv2L2" target="_blank">http://pastebin.com/NDXyv2L2</a><br>
> > > >><br>
> > > >> 2014-11-26 16:43 GMT+01:00 Juan Simón <<a href="mailto:decedion@gmail.com">decedion@gmail.com</a>>:<br>
> > > >>> I'm compiling the kernel 3.17.4 downloaded from<br>
> ><br>
> > <a href="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.4.tar.xz" target="_blank">https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.4.tar.xz</a>, not<br>
> ><br>
> > > >>> the git version.<br>
> > > >>><br>
> > > >>> 2014-11-26 16:42 GMT+01:00 Vinícius Tinti<br>
> ><br>
> > <<a href="mailto:viniciustinti@gmail.com">viniciustinti@gmail.com</a>>:<br>
> > > >>>> On Wed, Nov 26, 2014 at 1:40 PM, Juan Simón<br>
> ><br>
> > <<a href="mailto:decedion@gmail.com">decedion@gmail.com</a>> wrote:<br>
> > > >>>> > My config file: <a href="http://pastebin.com/qtvSyeKt" target="_blank">http://pastebin.com/qtvSyeKt</a><br>
> > > >>>> ><br>
> > > >>>> > 2014-11-26 16:38 GMT+01:00 Juan Simón <<a href="mailto:decedion@gmail.com">decedion@gmail.com</a>>:<br>
> > > >>>> >> Yes, I've applied all kernel-patches from<br>
> ><br>
> > <a href="http://buildbot.llvm.linuxfoundation.org/configs/x86_64/kernel-patches" target="_blank">http://buildbot.llvm.linuxfoundation.org/configs/x86_64/kernel-patches</a>.<br>
> ><br>
> > > >>>> tar.bz2>>>><br>
> > > >>>><br>
> > > >>>> >> with 'bzcat ../kernel-patches.tar.bz2 | patch -p1':<br>
> > > >>>> >><br>
> > > >>>> >> kernel/linux-3.17.4$ grep -i clang Makefile<br>
> > > >>>> >> ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"),<br>
> ><br>
> > 1)<br>
> ><br>
> > > >>>> >> ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)<br>
> > > >>>> >> COMPILER := clang<br>
> > > >>>> >> ifeq ($(COMPILER),clang)<br>
> > > >>>> >> CLANG_TARGET := -target $(notdir $(CROSS_COMPILE:%-=%))<br>
> > > >>>> >> CLANG_GCC_TC := -gcc-toolchain $(GCC_TOOLCHAIN)<br>
> > > >>>> >> CLANG_IA_FLAG = -no-integrated-as<br>
> > > >>>> >> CLANG_FLAGS := $(CLANG_TARGET) $(CLANG_GCC_TC)<br>
> ><br>
> > $(CLANG_IA_FLAG)<br>
> ><br>
> > > >>>> >> ifeq ($(COMPILER),clang)<br>
> > > >>>> >><br>
> > > >>>> >> My relevant environment variables:<br>
> > > >>>> >><br>
> > > >>>> >> LDFLAGS=-Wl,--as-needed -Wl,-s -Wl,-S -Wl,-O1 -Wl,--hash-<br>
> ><br>
> > style=gnu<br>
> ><br>
> > > >>>> >> -Wl,--sort-common<br>
> > > >>>> >> MAKEFLAGS=-s<br>
> > > >>>> >> CPPFLAGS=-m64 -fPIC -pipe -march=native -mtune=native -Ofast<br>
> > > >>>> >> -fomit-frame-pointer -fivopts -w -fno-math-errno<br>
> > > >>>> >> CXXFLAGS=-m64 -fPIC -pipe -march=native -mtune=native -Ofast<br>
> > > >>>> >> -fomit-frame-pointer -fivopts -w -fno-math-errno<br>
> > > >>>> >> CPP=clang-3.6 -E<br>
> ><br>
> > PATH=/home/simon/bin:usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/<br>
> ><br>
> > > >>>> sbin:/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-<br>
> ><br>
> > oracle/db/<br>
> ><br>
> > > >>>> bin:/usr/lib/jvm/java-8-oracle/jre/bin:~/bin>>>><br>
> > > >>>><br>
> > > >>>> >> HOSTCC=clang-3.6<br>
> > > >>>> >> LANG=es_ES.UTF-8<br>
> > > >>>> >> CONCURRENCY_LEVEL=9<br>
> > > >>>> >> CXX=clang++-3.6<br>
> > > >>>> >> CFLAGS=-m64 -fPIC -pipe -march=native -mtune=native -Ofast<br>
> > > >>>> >> -fomit-frame-pointer -fivopts -w -fno-math-errno<br>
> > > >>>> >> CC=clang-3.6<br>
> > > >>>> >><br>
> > > >>>> >> The errors are:<br>
> > > >>>> >> In file included from<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs_64.c:17:<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:969:6:<br>
> > > >>>> >> warning: variable 'do_reloc' is used uninitialized<br>
> > > >>>> >><br>
> > > >>>> >> whenever 'if' condition is false [-Wsometimes-<br>
> ><br>
> > uninitialized]<br>
> ><br>
> > > >>>> >> if (!use_real_mode)<br>
> > > >>>> >><br>
> > > >>>> >> ^~~~~~~~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:981:14:<br>
> > > >>>> >> note: uninitialized use occurs here<br>
> > > >>>> >><br>
> > > >>>> >> walk_relocs(do_reloc);<br>
> > > >>>> >><br>
> > > >>>> >> ^~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:969:2:<br>
> > > >>>> >> note: remove the 'if' if its condition is always<br>
> > > >>>> >><br>
> > > >>>> >> true<br>
> > > >>>> >><br>
> > > >>>> >> if (!use_real_mode)<br>
> > > >>>> >> ^~~~~~~~~~~~~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:966:24:<br>
> > > >>>> >> note: initialize the variable 'do_reloc' to<br>
> > > >>>> >><br>
> > > >>>> >> silence this warning<br>
> > > >>>> >><br>
> > > >>>> >> const char *symname);<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> = NULL<br>
> > > >>>> >><br>
> > > >>>> >> 1 warning generated.<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:18:2: error:<br>
> > > >>>> >> unexpected token at start of statement<br>
> > > >>>> >><br>
> > > >>>> >> DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);<br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> note:<br>
> > > >>>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >><br>
> > > >>>> >> asm volatile("\n@->" #sym " %0 " #val : : "i" (val))<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >> @->NR_PAGEFLAGS $25 __NR_PAGEFLAGS<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:19:2: error:<br>
> > > >>>> >> unexpected token at start of statement<br>
> > > >>>> >><br>
> > > >>>> >> DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);<br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> note:<br>
> > > >>>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >><br>
> > > >>>> >> asm volatile("\n@->" #sym " %0 " #val : : "i" (val))<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >> @->MAX_NR_ZONES $4 __MAX_NR_ZONES<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:21:2: error:<br>
> > > >>>> >> unexpected token at start of statement<br>
> > > >>>> >><br>
> > > >>>> >> DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));<br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> note:<br>
> > > >>>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >><br>
> > > >>>> >> asm volatile("\n@->" #sym " %0 " #val : : "i" (val))<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >> @->NR_CPUS_BITS $8 ilog2(CONFIG_NR_CPUS)<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:23:2: error:<br>
> > > >>>> >> unexpected token at start of statement<br>
> > > >>>> >><br>
> > > >>>> >> DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));<br>
> > > >>>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> note:<br>
> > > >>>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >><br>
> > > >>>> >> asm volatile("\n@->" #sym " %0 " #val : : "i" (val))<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >> @->SPINLOCK_SIZE $4 sizeof(spinlock_t)<br>
> > > >>>> >><br>
> > > >>>> >> ^<br>
> > > >>>> >><br>
> > > >>>> >> 4 errors generated.<br>
> > > >>>> >> make[4]: *** [kernel/bounds.s] Error 1<br>
> > > >>>> >> make[3]: *** [prepare0] Error 2<br>
> > > >>>> >> make[2]: *** [sub-make] Error 2<br>
> > > >>>> >> make[1]: *** [prepare] Error 2<br>
> > > >>>> >> make: ***<br>
> > > >>>><br>
> > > >>>> [/home/simon/fuentes/kernel/linux-3.17.4/debian/stamps/stamp-<br>
> ><br>
> > prepare-tr<br>
> ><br>
> > > >>>> ee-i7]>>>><br>
> > > >>>><br>
> > > >>>> >> Error 2<br>
> > > >>>> >><br>
> > > >>>> >> 2014-11-26 16:23 GMT+01:00 Vinícius Tinti<br>
> ><br>
> > <<a href="mailto:viniciustinti@gmail.com">viniciustinti@gmail.com</a>>:<br>
> > > >>>> >>> On Wed, Nov 26, 2014 at 1:18 PM, Jan-Simon Moeller<br>
> ><br>
> > <<a href="mailto:dl9pf@gmx.de">dl9pf@gmx.de</a>><br>
> ><br>
> > > >>>> wrote:<br>
> > > >>>> >>> > What version of clang do you use ?<br>
> > > >>>> >>> ><br>
> > > >>>> >>> > Am Mittwoch, 26. November 2014, 16:18:14 schrieb Juan<br>
> ><br>
> > Simón:<br>
> > > >>>> >>> >> Thanks.<br>
> > > >>>> >>> >> I have saved the 'makefile', I've disabled "AppArmor"<br>
> ><br>
> > and I have<br>
> ><br>
> > > >>>> >>> >> compiled<br>
> > > >>>> >>> >> again but it fails:<br>
> > > >>>> >>> >> In file included from<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs_64.c:17:<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:969:6:<br>
> > > >>>> >>> >> warning: variable 'do_reloc' is used uninitialized<br>
> ><br>
> > whenever 'if'<br>
> ><br>
> > > >>>> >>> >> condition<br>
> > > >>>> >>> >> is false<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> [-Wsometimes-uninitialized]<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> if (!use_real_mode)<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^~~~~~~~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:981:14:<br>
> > > >>>> >>> >> note: uninitialized use occurs here<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> walk_relocs(do_reloc);<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:969:2:<br>
> > > >>>> >>> >> note: remove the 'if' if its condition is always true<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> if (!use_real_mode)<br>
> > > >>>> >>> >> ^~~~~~~~~~~~~~~~~~~<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/arch/x86/tools/relocs.c:966:24:<br>
> > > >>>> >>> >> note: initialize the variable 'do_reloc' to silence this<br>
> ><br>
> > warning<br>
> ><br>
> > > >>>> >>> >> const char *symname);<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> = NULL<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> 1 warning generated.<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:18:2:<br>
> > > >>>> error:<br>
> > > >>>> >>> >> unexpected token at start of statement<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);<br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> >>> >> note:<br>
> > > >>>> >>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> asm volatile("\n@->" #sym " %0 " #val : : "i"<br>
> ><br>
> > (val))<br>
> ><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >>> >> @->NR_PAGEFLAGS $25 __NR_PAGEFLAGS<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:19:2:<br>
> > > >>>> error:<br>
> > > >>>> >>> >> unexpected token at start of statement<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);<br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> >>> >> note:<br>
> > > >>>> >>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> asm volatile("\n@->" #sym " %0 " #val : : "i"<br>
> ><br>
> > (val))<br>
> ><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >>> >> @->MAX_NR_ZONES $4 __MAX_NR_ZONES<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:21:2:<br>
> > > >>>> error:<br>
> > > >>>> >>> >> unexpected token at start of statement<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));<br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> >>> >> note:<br>
> > > >>>> >>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> asm volatile("\n@->" #sym " %0 " #val : : "i"<br>
> ><br>
> > (val))<br>
> ><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >>> >> @->NR_CPUS_BITS $8 ilog2(CONFIG_NR_CPUS)<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/kernel/bounds.c:23:2:<br>
> > > >>>> error:<br>
> > > >>>> >>> >> unexpected token at start of statement<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));<br>
> > > >>>> >>> >> ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/include/linux/kbuild.h:5:18:<br>
> > > >>>> >>> >> note:<br>
> > > >>>> >>> >> expanded from macro 'DEFINE'<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> asm volatile("\n@->" #sym " %0 " #val : : "i"<br>
> ><br>
> > (val))<br>
> ><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> <inline asm>:2:2: note: instantiated into assembly here<br>
> > > >>>> >>> >> @->SPINLOCK_SIZE $4 sizeof(spinlock_t)<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> ^<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> 4 errors generated.<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> I'm compiling the 3.17.4 version.<br>
> > > >>>> >>> >><br>
> > > >>>> >>> >> 2014-11-26 16:06 GMT+01:00 Jan-Simon Moeller<br>
> ><br>
> > <<a href="mailto:dl9pf@gmx.de">dl9pf@gmx.de</a>>:<br>
> > > >>>> >>> >> > See this page:<br>
> > > >>>> <a href="http://llvm.linuxfoundation.org/index.php/Broken_kernel_options" target="_blank">http://llvm.linuxfoundation.org/index.php/Broken_kernel_options</a><br>
> > > >>>><br>
> > > >>>> >>> >> > and i attached a fixed "makefile". forgot an argument.<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > Best,<br>
> > > >>>> >>> >> > JS<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > Am Mittwoch, 26. November 2014, 16:04:00 schrieb Jan-<br>
> ><br>
> > Simon<br>
> ><br>
> > > >>>> Moeller:<br>
> > > >>>> >>> >> > > This is a known issue, disable apparmor.<br>
> > > >>>> >>> >> > ><br>
> > > >>>> >>> >> > > The construct used (shash structure layout) - we<br>
> ><br>
> > call it<br>
> ><br>
> > > >>>> VLAIS<br>
> > > >>>><br>
> > > >>>> >>> >> > > (variable<br>
> > > >>>> >>> >> > > length array in struct) is not supported and the<br>
> ><br>
> > driver<br>
> ><br>
> > > >>>> needs to<br>
> > > >>>><br>
> > > >>>> >>> >> > > be<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > changed.<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > Patches welcome.<br>
> > > >>>> >>> >> > ><br>
> > > >>>> >>> >> > > Best,<br>
> > > >>>> >>> >> > > JS<br>
> > > >>>> >>> >> > ><br>
> > > >>>> >>> >> > > Am Mittwoch, 26. November 2014, 15:57:54 schrieb<br>
> ><br>
> > Juan Simón:<br>
> > > >>>> >>> >> > > > It doesn't compile:<br>
> > /home/simon/fuentes/kernel/linux-3.17.4/security/apparmor/crypto.c:35:2:<br>
> > > >>>> >>> >> > > > error: implicit declaration of function<br>
> > > >>>><br>
> > > >>>> 'SHASH_DESC_ON_STACK'<br>
> > > >>>><br>
> > > >>>> >>> >> > > > [-Werror=implicit-function-declaration]<br>
> > > >>>> >>> >> > > ><br>
> > > >>>> >>> >> > > > SHASH_DESC_ON_STACK(shash, apparmor_tfm);<br>
> > > >>>> >>> >> > > > ^<br>
> ><br>
> > /home/simon/fuentes/kernel/linux-3.17.4/security/apparmor/crypto.c:35:22:<br>
> > > >>>> >>> >> > > > error: 'shash' undeclared (first use in this<br>
> ><br>
> > function)<br>
> ><br>
> > > >>>> >>> >> > > > SHASH_DESC_ON_STACK(shash, apparmor_tfm);<br>
> > > >>>> >>> >> > > ><br>
> > > >>>> >>> >> > > > ^<br>
> > > >>>> >>> >> > > ><br>
> > > >>>> >>> >> > > > Is this a known bug? I haven't found it in bug<br>
> ><br>
> > tracker.<br>
> ><br>
> > > >>>> >>> >> > > > I've tested it with clang-3.5 and clang-3.6. Same<br>
> ><br>
> > error.<br>
> ><br>
> > > >>>> >>> >> > > > 2014-11-26 13:12 GMT+01:00 Jan-Simon Moeller<br>
> ><br>
> > <<a href="mailto:dl9pf@gmx.de">dl9pf@gmx.de</a><br>
> ><br>
> > > >>>> >>> >> > > > > Am Mittwoch, 26. November 2014, 12:53:17 schrieb<br>
> ><br>
> > Juan<br>
> ><br>
> > > >>>> Simón:<br>
> > > >>>> >>> >> > > > > > Hi,<br>
> > > >>>> >>> >> > > > > > I've followed the instructions on main page to<br>
> ><br>
> > compile<br>
> ><br>
> > > >>>> the<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > kernel<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > with<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > > > > clang on Ubuntu 14.04 64 bits:<br>
> > > >>>> >>> >> > > > > > 1. Get the latest SVN version of clang<br>
> ><br>
> > (version 3.5<br>
> ><br>
> > > >>>> from<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > PPA)<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > 2. Get the kernel pacthed from "git clone<br>
> ><br>
> > git://<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git" target="_blank">git.linuxfoundation.org/llvmlinux/kernel.git</a>"<br>
> ><br>
> > > >>>> >>> >> > > > > > 3. Execute: "export HOSTCC=clang CC=clang"<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > Exporting it in your shell environment might not<br>
> ><br>
> > end up<br>
> ><br>
> > > >>>> in the<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > build<br>
> > > >>>> >>> >> > > > > process<br>
> > > >>>> >>> >> > > > > with dpkg rules. Export it in the rules file<br>
> ><br>
> > maybe ?<br>
> ><br>
> > > >>>> >>> >> > > > > or create a "makefile" (little m !!!) in the<br>
> ><br>
> > toplevel<br>
> ><br>
> > > >>>> >>> >> > > > > kernel-dir<br>
> > > >>>> >>> >> > > > > with<br>
> > > >>>> >>> >> > > > > this<br>
> > > >>>> >>> >> > > > > content:<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > #<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > CC := clang<br>
> > > >>>> >>> >> > > > > CPP := $(CC) -E<br>
> > > >>>> >>> >> > > > > HOSTCC := clang<br>
> > > >>>> >>> >> > > > > lm = $(MAKE) -f Makefile O="$(1)" CPP="$(CPP)"<br>
> > > >>>> >>> >> > > > > CC="$(CC)"<br>
> > > >>>> >>> >> > > > > HOSTCC="$(HOSTCC)"<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > %:<br>
> > > >>>> >>> >> > > > > @$(call lm,$(O),$@)<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > all:<br>
> > > >>>> >>> >> > > > > @$(call lm,$(O),$@)<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > #<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > > 4. From here I compile the kernel at Ubuntu<br>
> ><br>
> > way to<br>
> ><br>
> > > >>>> obtain<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > DEB<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > packages:<br>
> > > >>>> >>> >> > > > > > 1. I patched the kernel with the patches<br>
> ><br>
> > in<br>
> ><br>
> ><br>
> > <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-rc6-vivid/" target="_blank">http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-rc6-vivid/</a><br>
> ><br>
> > > >>>> >>> >> > > > > > 2. cp /boot/config-`uname -r`<br>
> ><br>
> > debian.master/config/amd64/config.flavour.i7<br>
> ><br>
> > > >>>> >>> >> > > > > > 3. fakeroot debian/rules clean<br>
> > > >>>> >>> >> > > > > > 4. debian/rules editconfigs<br>
> > > >>>> >>> >> > > > > > 5. fakeroot debian/rules clean<br>
> > > >>>> >>> >> > > > > > 6. fakeroot debian/rules binary-headers<br>
> > > >>>> >>> >> > > > > > binary-i7<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > binary-arch-headers<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > > I install the generated deb packages without<br>
> ><br>
> > problems.<br>
> ><br>
> > > >>>> >>> >> > > > > > This i7 flavour it has:<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > CONFIG_MCORE2=y<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > and it's patched with:<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > -cflags-$(CONFIG_MCORE2) += -march=i686<br>
> ><br>
> > $(call<br>
> ><br>
> > > >>>> >>> >> > > > > > tune,core2)<br>
> > > >>>> >>> >> > > > > > +cflags-$(CONFIG_MCORE2) += -<br>
> ><br>
> > march=native<br>
> ><br>
> > > >>>> >>> >> > > > > > $(call<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > tune,native)<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > > > > My doubts are:<br>
> > > >>>> >>> >> > > > > > 1. Is this kernel really compiled with<br>
> ><br>
> > clang? The<br>
> ><br>
> > > >>>> >>> >> > > > > > compilation<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > process<br>
> > > >>>> >>> >> > > > > > shows in console a lot of warnings typical<br>
> ><br>
> > of clang<br>
> ><br>
> > > >>>> but<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > when I<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > execute<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > "cat /proc/version", after reboot with the new<br>
> ><br>
> > kernel<br>
> ><br>
> > > >>>> >>> >> > > > > > version, it<br>
> > > >>>> >>> >> > > > > > shows:<br>
> > > >>>> >>> >> > > > > > "Linux version 3.18.0-031800rc6-i7 (root@X58A-<br>
> ><br>
> > UD5)<br>
> ><br>
> > > >>>> (gcc<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > version<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > 4.8.2<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > > > > (Ubuntu 4.8.2-19ubuntu1) )"<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > 2. What's the kernel version in<br>
> ><br>
> > git://<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git" target="_blank">git.linuxfoundation.org/llvmlinux/kernel.git</a>?<br>
> ><br>
> > > >>>> In<br>
> > > >>>><br>
> > > >>>> >>> >> > LLVMLinux<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > > > > main<br>
> > > >>>> >>> >> > > > > > page<br>
> ><br>
> > <<a href="http://llvm.linuxfoundation.org/index.php/Main_Page" target="_blank">http://llvm.linuxfoundation.org/index.php/Main_Page</a>><br>
> ><br>
> > > >>>> it<br>
> > > >>>><br>
> > > >>>> >>> >> > says:<br>
> > > >>>> >>> >> > > > > > "Alternatively you can use the LLVMLinux<br>
> ><br>
> > kernel<br>
> ><br>
> > > >>>> >>> >> > > > > > tree<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > (recent<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > mainline<br>
> > > >>>> >>> >> > > > > ><br>
> > > >>>> >>> >> > > > > > with latest LLVMLinux patches applied)" but<br>
> ><br>
> > when I<br>
> ><br>
> > > >>>> execute<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > "debian/rules<br>
> > > >>>> >>> >> > > > > > editconfigs" it shows 3.17.0 in top of console<br>
> ><br>
> > and the<br>
> ><br>
> > > >>>> git<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > page<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > shows<br>
> ><br>
> > <<a href="http://git.linuxfoundation.org/llvmlinux/kernel.git/" target="_blank">http://git.linuxfoundation.org/llvmlinux/kernel.git/</a>><br>
> ><br>
> > > >>>> that<br>
> > > >>>><br>
> > > >>>> >>> >> > > > > > the<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > last<br>
> > > >>>> >>> >> ><br>
> > > >>>> >>> >> > > > > change<br>
> > > >>>> >>> >> > > > ><br>
> > > >>>> >>> >> > > > > > was at 15 Oct 2014.<br>
> > > >>>> >>> >> > ><br>
> > > >>>> >>> >> > > _______________________________________________<br>
> > > >>>> >>> >> > > LLVMLinux mailing list<br>
> > > >>>> >>> >> > > <a href="mailto:LLVMLinux@lists.linuxfoundation.org">LLVMLinux@lists.linuxfoundation.org</a><br>
> ><br>
> > <a href="https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux</a><br>
> ><br>
> > > >>>> >>> >> > _______________________________________________<br>
> > > >>>> >>> >> > LLVMLinux mailing list<br>
> > > >>>> >>> >> > <a href="mailto:LLVMLinux@lists.linuxfoundation.org">LLVMLinux@lists.linuxfoundation.org</a><br>
> ><br>
> > <a href="https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux</a><br>
> ><br>
> > > >>>> >>> > _______________________________________________<br>
> > > >>>> >>> > LLVMLinux mailing list<br>
> > > >>>> >>> > <a href="mailto:LLVMLinux@lists.linuxfoundation.org">LLVMLinux@lists.linuxfoundation.org</a><br>
> ><br>
> > <a href="https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux</a><br>
> ><br>
> > > >>>> >>> Have you applied the disable-clang-integrated-as.patch?<br>
> ><br>
> > <a href="http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/all/patch" target="_blank">http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/all/patch</a><br>
> ><br>
> > > >>>> es/disable-clang-integrated-<br>
> ><br>
> > as.patch;h=4bde9a683525ce5c0aee0f46164d3028<br>
> ><br>
> > > >>>> a167b445;hb=HEAD>>>><br>
> > > >>>><br>
> > > >>>> >>> This output happens if you try to build the kernel with<br>
> ><br>
> > clang only<br>
> ><br>
> > > >>>> >>> (you still need gcc for the assembly part).<br>
> > > >>>> >>><br>
> > > >>>> >>> --<br>
> > > >>>> >>> Simplicity is the ultimate sophistication<br>
> > > >>>> >>> _______________________________________________<br>
> > > >>>> >>> LLVMLinux mailing list<br>
> > > >>>> >>> <a href="mailto:LLVMLinux@lists.linuxfoundation.org">LLVMLinux@lists.linuxfoundation.org</a><br>
> ><br>
> > <a href="https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux</a><br>
> ><br>
> > > >>>> Could you pastebin 'git diff Makefile'?<br>
> > > >>>><br>
> > > >>>> --<br>
> > > >>>> Simplicity is the ultimate sophistication<br>
<br>
</div></div></blockquote></div><br></div>