All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
	<oe-kbuild-all@lists.linux.dev>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Keeping <john@metanate.com>, <llvm@lists.linux.dev>,
	kernel test robot <lkp@intel.com>
Subject: Re: [stable:linux-4.19.y 984/6017] ld.lld: error: drivers/usb/dwc2/platform.o: contains a compressed section, but zlib is not available
Date: Mon, 5 Jun 2023 12:19:00 +0800	[thread overview]
Message-ID: <ZH1iNG4IrpA7/hLM@rli9-mobl> (raw)
In-Reply-To: <CAKwvOdmBMeOUxAzYu0Q13sGsS6-_cVFBtQsnFgjoSfc_kHE14g@mail.gmail.com>

On Tue, May 30, 2023 at 10:09:40AM -0700, Nick Desaulniers wrote:
> On Sat, May 27, 2023 at 8:59 PM Philip Li <philip.li@intel.com> wrote:
> >
> > On Fri, May 26, 2023 at 08:24:58AM -0700, Nathan Chancellor wrote:
> > > On Thu, May 25, 2023 at 02:21:24PM -0700, Nick Desaulniers wrote:
> > > > On Thu, May 25, 2023 at 12:44 AM kernel test robot <lkp@intel.com> wrote:
> > > > >
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
> > > > > head:   3f57fb8b1bd06b277556601133823bec370d723f
> > > > > commit: c964b1bbf179a163084b1ec8ad094b8c8dce28c8 [984/6017] usb: dwc2: hcd_queue: Fix use of floating point literal
> > > > > config: x86_64-randconfig-x093-20230524
> > > > > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
> > > > > reproduce (this is a W=1 build):
> > > > >         mkdir -p ~/bin
> > > > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > > >         chmod +x ~/bin/make.cross
> > > > >         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=c964b1bbf179a163084b1ec8ad094b8c8dce28c8
> > > > >         git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> > > > >         git fetch --no-tags stable linux-4.19.y
> > > > >         git checkout c964b1bbf179a163084b1ec8ad094b8c8dce28c8
> > > > >         # save the config file
> > > > >         mkdir build_dir && cp config build_dir/.config
> > > > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
> > > > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/usb/
> > > > >
> > > > > If you fix the issue, kindly add following tag where applicable
> > > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202305251508.iFEInYVW-lkp@intel.com/
> > > > >
> > > > > All errors (new ones prefixed by >>):
> > > > >
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > >
> > > > Hmmm...that's surprising to see on 4.19.  I didn't add support for
> > > > compressed debug info until:
> > > >
> > > > commit 10e68b02c861 ("Makefile: support compressed debug info")
> > > >
> > > > which landed in v5.8-rc1 and AFAIK was never backported.
> > > >
> > > > I wasn't able to reproduce this with ToT LLVM (clang-17); I wonder if
> > > > this is an issue with clang-14?
> >
> > Hi Nathan, we will double check whether it is clang-14 specific. For now,
> > I use the the reproduce steps which can't reproduce this yet, even by running
> >
> >         $ COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
> >
> > The clang version downloaded by reproduce step is clang-16, which
> > can't reproduce
> 
> Hi Philip,
> Is it possible that perhaps on your test machine that you're
> attempting to reproduce, you have zlib installed, but some of the
> automation machines on which the bot runs do not?

Hi Nick, per further check, both the local test machine and the bot cluster side has
zlib1g/zlib1g-dev installed. But while trying to reproduce by clang-14, we can't reproduce
the issue with clang-14 even in the automation machine now.

We need do more check and comparision for this. And if we have found useful clues,
we will share it out.

Sorry for costing all's time for this report, and thanks for the help and input.

> 
> >
> > $ ~/0day/clang/bin/clang --version
> > clang version 16.0.0 (git://gitmirror/llvm_project 8d9828ef5aa9688500657d36cd2aefbe12bbd162)
> > Target: x86_64-unknown-linux-gnu
> > Thread model: posix
> >
> > >
> > > Something I was thinking about yesterday is that binutils has a bunch of
> > > configure flags to control default behavior and one of those is
> > > compressed debug sections on by default:
> > >
> > >   --enable-compressed-debug-sections={all,gas,gold,ld,none}
> > >                           Enable compressed debug sections for gas, gold or ld
> > >                           by default
> > >
> > > Is it possible that the version of binutils that the kernel test robot
> > > uses has compressed debug sections enabled by default for gas? Although,
> >
> > Do you refer to below info? If not, i will check further
> >
> > $ ld --version
> > GNU ld (GNU Binutils for Debian) 2.40
> >
> > $ ld --help | grep -A4 compress
> >   --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi|zstd]
> >                               Compress DWARF debug sections
> >                                 Default: none
> >   -z common-page-size=SIZE    Set common page size to SIZE
> >
> > > if I am reading make.cross correctly (linked above), it seems like the
> > > integrated assembler should be used in this case... It would be really
> > > helpful to have the exact make command that the robot used in the report
> >
> > Got it, let us think of this to share the build log, so far, as it contains
> > some debugging/tracing info, we haven't sent it along with the report. But
> > I think at least, we can extract the make command out as first step.
> >
> > > to know for sure. I do not see a similar switch available for LLVM and
> > > even then, I would not expect to see the same issue because we should
> > > not even have the ability to generate a compressed debug section if zlib
> > > was not available.
> > >
> > > > Just tried and could not reproduce.  Has this issue been seen elsewhere?
> > > >
> > > > Ah, we have
> > > >
> > > > https://lore.kernel.org/llvm/?q=contains+a+compressed+section%2C+but+zlib+is+not+available
> > > > https://lore.kernel.org/llvm/20230404161735.GA1703291@dev-arch.thelio-3990X/
> > > >
> > > > So since 10e68b02c861 is in v5.8-rc1, then for 4.14, 4.19, and 5.4 we
> > > > probably want a stable-only patch for -gz=none.
> > > >
> > > > GCC didn't support -gz=none until 5.1, so that might be an issue for
> > > > older branches of stable which might still support older GCC versions.
> > > > 4.19.y still supports gcc 4.6.
> > > >
> > > > ```
> > > > diff --git a/Makefile b/Makefile
> > > > index 71416fde7348..e6754300021c 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -756,6 +756,7 @@ KBUILD_AFLAGS       += -g
> > > >  else
> > > >  KBUILD_AFLAGS  += -Wa,-gdwarf-2
> > > >  endif
> > > > +KBUILD_CFLAGS  += $(call cc-option, -gz=none)
> > > >  endif
> > > >
> > > >  ifdef CONFIG_DEBUG_INFO_DWARF4
> > > > ```
> > > >
> > > > Godbolt only binutils v2.27+, but 4.19 supported v2.20+ (so I can't
> > > > check --compress-debug-sections=none assembler support quickly).
> > >
> > > You could do
> > >
> > >   KBUILD_AFLAGS   += $(as-option, -Wa$(comma)--compress-debug-sections=none)
> > >
> > > no?
> >
> > Do you suggest we can do this when using clang-14 to build or even gcc when
> > such issue appears?
> >
> > >
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: drivers/usb/dwc2/core_intr.o: contains a compressed section, but zlib is not available
> > > > > >> ld.lld: error: drivers/usb/dwc2/platform.o: contains a compressed section, but zlib is not available
> > > > >    ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
> > >
> > > Cheers,
> > > Nathan
> > >
> 
> 
> 
> -- 
> Thanks,
> ~Nick Desaulniers

      reply	other threads:[~2023-06-05  4:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  7:44 [stable:linux-4.19.y 984/6017] ld.lld: error: drivers/usb/dwc2/platform.o: contains a compressed section, but zlib is not available kernel test robot
2023-05-25 21:21 ` Nick Desaulniers
2023-05-26 15:24   ` Nathan Chancellor
2023-05-28  3:58     ` Philip Li
2023-05-30 17:09       ` Nick Desaulniers
2023-06-05  4:19         ` Philip Li [this message]

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=ZH1iNG4IrpA7/hLM@rli9-mobl \
    --to=philip.li@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john@metanate.com \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.