Linux SPARSE checker discussions
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>,
	Santiago Vila <sanvila@debian.org>
Cc: 906472@bugs.debian.org, linux-sparse@vger.kernel.org,
	Adrian Bunk <bunk@debian.org>
Subject: Bug#906472: horst: FTBFS in buster/sid (unable to open 'stdarg.h')
Date: Fri, 14 Sep 2018 21:45:44 +0200	[thread overview]
Message-ID: <20180914194543.GA22476@taurus.defre.kleine-koenig.org> (raw)
In-Reply-To: <20180914140409.GA25593@localhost>

[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]

Hello,

[Cc += sparse mailing list]

On Fri, Sep 14, 2018 at 05:04:09PM +0300, Adrian Bunk wrote:
> Control: reassign -1 sparse 0.5.2-1
> Control: affects -1 src:horst
> 
> On Sat, Aug 25, 2018 at 10:09:47PM +0200, Christoph Biedl wrote:
> > Santiago Vila wrote...
> > 
> > > 	make -j1 check
> > > make[1]: Entering directory '/<<PKGBUILDDIR>>'
> > > sparse -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -Wall -Wextra -g -I. -DDO_DEBUG -I/usr/include/libnl3 *.[ch]
> > > /usr/include/err.h:25:11: error: unable to open 'stdarg.h'
> > 
> > To reproduce this it's important to remove gcc-7 from the build chroot
> > (apt purge libgcc-7-dev ; apt --purge autoremove).
> > 
> > Problem is, sparse appearently uses hardcoded paths and looks for
> > stdarg.h in (among other places)
> > 
> > | /usr/lib/gcc/x86_64-linux-gnu/7//include/stdarg.h
> > |                               ^
> > 
> > ... which fails.
> > 
> > Solution is to rebuild sparse, building horst was successful then.
> > If this is true (please check!), the interesting question is why this
> > wasn't a problem in earlier gcc version bumps.

I think this is a known limitation of sparse and there are three
ways to fix this (in my order of preference):

 a) let horst use cgcc -no-compile instead of sparse; or
 b) let sparse depend on libgcc-7-dev (or whatever provides the
    necessary files); or
 c) use autodetection which gcc is used and pick its files.

I'm not sure if a) fixes the problem. It fixed another problem we had
with horst's usage of sparse in the past though[1].

The downside of c) is that running this autodetection on every call to
sparse is probably slowing down sparse a bit which isn't nice.

Best regards
Uwe

[1] https://bugs.debian.org/873508

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

       reply	other threads:[~2018-09-14 19:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1535227396@msgid.manchmal.in-ulm.de>
     [not found] ` <E1fqkJB-0004Wc-55@paradis.debian.org>
     [not found]   ` <20180914140409.GA25593@localhost>
2018-09-14 19:45     ` Uwe Kleine-König [this message]
2018-09-24 16:23       ` Bug#906472: horst: FTBFS in buster/sid (unable to open 'stdarg.h') Luc Van Oostenryck
2018-09-25 14:38         ` Uwe Kleine-König
2018-09-25 17:06           ` Luc Van Oostenryck

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=20180914194543.GA22476@taurus.defre.kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=906472@bugs.debian.org \
    --cc=bunk@debian.org \
    --cc=debian.axhn@manchmal.in-ulm.de \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sanvila@debian.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