[Debian-med-packaging] Bug#1042124: Flex help needed for eegdev (Was: Re: eegdev: FTBFS: ../../lib/stdio.h:64:3: error: #error "Please include config.h first.")

Nilesh Patra nilesh at debian.org
Fri Aug 25 16:49:15 BST 2023


On Fri, Aug 25, 2023 at 05:17:47PM +0200, Niels Thykier wrote:
> Nilesh Patra:
> > 
> > 
> > On 25 August 2023 1:47:26 pm IST, Nilesh Patra <nilesh at debian.org> wrote:
> > > On Wed, 26 Jul 2023 21:52:17 +0200 Lucas Nussbaum <lucas at debian.org> wrote:
> > > > Source: eegdev
> > > > Version: 0.2-6
> > > > Severity: serious
> > > > > In file included from conffile.lex.c:242:
> > > > > ../../lib/stdio.h:64:3: error: #error "Please include config.h first."
> > > > >     64 |  #error "Please include config.h first."
> > > > >        |   ^~~~~
> > > 
> > > The lexed file conffile.lex.c seems to include some stuff before
> > > config.h is included which is causing it to choke.
> > > 
> > > I'm not acquainted with lexers and not sure what causes this. I'd
> > > appreciate any help.
> > 
> > Adding mentors list as well. If someone can help with this, that'd be great.
> I do not think the lexer has anything to do with this.
> 
> A quick look at the log suggests that the package is "rolling" its own
> "stdio.h" (note the "../../lib/stdio.h" in the error message).  Indeed, the
> full log has "mv stdio.h-t3 stdio.h" as well.
> 
> I believe that this is stdio.h is generated by the embedded gnulib copy and
> that is as far as I am willing to debug that rabbit hole. Based on the
> error, I assume gnulib's generated stdio.h requires the project specific
> "config.h" to be loaded first.
> 
> As for solving it, I would have a look at the "conffile.lex.c" file, see
> where it has its "#include" for stdio.h and then add an `include "config.h"`
> before that to see if it works (via a patch).

I had figured out this already, but conffile.lex.c does not exist in the
project, it is generated as a part of the lexer output. In particular:

$ ls conffile.lex.c
ls: cannot access 'conffile.lex.c': No such file or directory
$ flex conffile.l
$ ls conffile.lex.c
conffile.lex.c

And this indeed has config.h include after a few C-specific includes.
Since this is not a part of the source, there's nothing I can patch in
this file. conffile.l has the config.h include present before everything
else, and hence I'm not sure where this should be fixed.

Did I misunderstand your solution somehow? If not, can you recommend
something else?

Best,
Nilesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20230825/03d8e7e3/attachment-0001.sig>


More information about the Debian-med-packaging mailing list