[pve-devel] [PATCH kernel 4/4] d/rules: check for accidental perf linkage

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 25 08:17:51 CEST 2018


On 4/24/18 1:57 PM, Fabian Gr├╝nbichler wrote:
> with libraries that are not GPL-2-only compatible.
> 
> Signed-off-by: Fabian Gr├╝nbichler <f.gruenbichler at proxmox.com>
> ---
>  debian/rules | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/debian/rules b/debian/rules
> index a84ae5a..cb892d2 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -125,7 +125,10 @@ binary: install
>  	touch $@
>  
>  .tools_compile_mark: .compile_mark
> -	${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
> +	${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr feature-libbfd=0 HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7

Does not works here?? 

/usr/bin/make -C ubuntu-bionic/tools/perf prefix=/usr feature-libbfd=0 HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
make[2]: Entering directory '/mnt/pve/store/tlamprecht/sources/pve-kernel/build/ubuntu-bionic/tools/perf'
cd modules/pkg-spl; ./autogen.sh
  BUILD:   Doing 'make -j64' parallel build
  HOSTCC   fixdep.o
  HOSTLD   fixdep-in.o
  LINK     fixdep
Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h'
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/required-features.h' differs from latest version at 'arch/x86/include/asm/required-features.h'
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I config
configure.ac:44: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2672: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2689: AC_LINK_IFELSE is expanded from...
config/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
config/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
config/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
config/libtool.m4:138: _LT_SETUP is expanded from...
config/libtool.m4:67: LT_INIT is expanded from...
config/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:44: the top level
configure.ac:44: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2672: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2689: AC_LINK_IFELSE is expanded from...
config/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
config/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
config/libtool.m4:138: _LT_SETUP is expanded from...
config/libtool.m4:67: LT_INIT is expanded from...
config/libtool.m4:102: AC_PROG_LIBTOOL is expanded from...
configure.ac:44: the top level

Auto-detecting system features:
...                         dwarf: [ on  ]
...            dwarf_getlocations: [ on  ]
...                         glibc: [ on  ]
...                          gtk2: [ on  ]
...                      libaudit: [ on  ]
...                        libbfd: [ on  ]
                           ^^^^^^^^^^^^^^^^
...                        libelf: [ on  ]
...                       libnuma: [ on  ]
...        numa_num_possible_cpus: [ on  ]
...                       libperl: [ OFF ]
...                     libpython: [ on  ]
...                      libslang: [ on  ]
...                     libcrypto: [ on  ]
...                     libunwind: [ on  ]
...            libdw-dwarf-unwind: [ on  ]
...                          zlib: [ on  ]
...                          lzma: [ on  ]
...                     get_cpuid: [ on  ]
...                           bpf: [ on  ]

[...]

linkage check fails then, so at least they work correctly :)

> +	echo "checking GPL-2 only perf binary for library linkage with incompatible licenses.."
> +	! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibbfd'
> +	! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibcrypto'
>  	${MAKE} -C ${KERNEL_SRC}/tools/perf man
>  	# contained in linux-base
>  	rm -f ${KERNEL_SRC}/tools/perf/Documentation/perf.1
> 





More information about the pve-devel mailing list