On Mon, Sep 28, 2020 at 10:38 AM stan via kernel
<[email protected]> wrote:
>
> I sent part of this to the devel list by mistake, correcting and
> sending to the kernel list.
>
> Hi,
>
> When building the kernel with perf enabled from the src.rpm
> kernel-5.9.0-0.rc6.20200925git171d4ff79f96.17.fc34.src.rpm
> I get an error.  There seems to be an error in one of the build
> scripts.  This was not a problem in src.rpm for
> kernel-5.9.0-0.rc4.20200911git581cb3a26baf.8.fc34.src.rpm
>
> The error seems to be in a script, and looks like a typo,
> + +# perf
> /var/tmp/rpm-tmp.bbuLwN: line 499: +#: command not found
> error: Bad exit status from /var/tmp/rpm-tmp.bbuLwN (%build)
>     Bad exit status from /var/tmp/rpm-tmp.bbuLwN (%build)
>
> When I look in that temporary file, I find this, with the error line
> marked by <<<<<<---- error:
>
> ###
> # DO it...
> ###
>
> # prepare directories
> rm -rf $RPM_BUILD_ROOT
> mkdir -p $RPM_BUILD_ROOT/boot
> mkdir -p $RPM_BUILD_ROOT/usr/libexec
>
> cd linux-5.9.0-0.rc6.20200925git171d4ff79f96.17.20200927.fc31.x86_64
>
>
>
>
>
> BuildKernel bzImage arch/x86/boot/bzImage 1
>
> +# perf                                           <<<<<<<<---- error
> # make sure check-headers.sh is executable
> chmod +x tools/perf/check-headers.sh
>
>   /usr/bin/make -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}"
>   LDFLAGS="-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
>   -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"  -C tools/perf V=1
>   NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1
>   HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=/usr
>   PYTHON=/usr/bin/python3 DESTDIR=$RPM_BUILD_ROOT all
>
> That is in the spec file, but the error isn't in the spec file.
> It doesn't have the + in front of the # in the spec file.
>
> ###
> # DO it...
> ###
>
> # prepare directories
> rm -rf $RPM_BUILD_ROOT
> mkdir -p $RPM_BUILD_ROOT/boot
> mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
>
> cd linux-%{KVERREL}
>
>
> %if %{with_debug}
> BuildKernel %make_target %kernel_image %{_use_vdso} debug
> %endif
>
> %if %{with_zfcpdump}
> BuildKernel %make_target %kernel_image %{_use_vdso} zfcpdump
> %endif
>
> %if %{with_pae}
> BuildKernel %make_target %kernel_image %{use_vdso} lpae
> %endif
>
> %if %{with_up}
> BuildKernel %make_target %kernel_image %{_use_vdso}
> %endif
>
> %global perf_make \
>   %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" 
> %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 
> WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 
> NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3}
> %if %{with_perf}
> +%global _lto_cflags %{nil}
> # perf
> # make sure check-headers.sh is executable
> chmod +x tools/perf/check-headers.sh
> %{perf_make} DESTDIR=$RPM_BUILD_ROOT all
> %endif
>
> %global tools_make \
>   %{make} CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" V=1
>

This is a copy paste error.  Building tools is broken in F33/rawhide
due to LTO.  That should fix it, though I don't always add it to test
and see where we are.  You happened to catch a time when I copied too
much.  Sorry about that.  I never noticed it because we don't build
tools as part of the kernel.spec for Fedora, and you can't find it
because it went away the next day automatically. The spec is generated
without that line at all.

Justin
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to