Bug#898743: breaks when #included after

2019-02-09 Thread Ben Hutchings
Control: reassign -1 libc6-dev
Control: severity -1 normal

On Tue, 15 May 2018 16:57:57 +0200 Helmut Grohne  wrote:
> Package: linux-libc-dev,libc6-dev
> Severity: serious
> Justification: makes systemd ftbfs
> User: helm...@debian.org
> Usertags: rebootstrap
> Control: affects -1 + src:systemd libmount-dev
>
> systemd FTBFS here, because compiling load-fragment.c fails. I spent a while
> minimizing that file and it boils down to:
> 
> $ cat test.c
> #include 
> #include 
> $ gcc -c test.c
> In file included from test.c:1:0:
> /usr/include/x86_64-linux-gnu/sys/mount.h:35:3: error: expected identifier 
> before numeric constant
>MS_RDONLY = 1,  /* Mount read-only.  */
>^
> $
> 
> linux/fs.h #defines MS_RDONLY and then sys/mount.h tries to create an
> enum containing MS_RDONLY. That's a problem.
[...]

 has defined MS_RDONLY as a macro since before version 1.0,
so this is a wontfix on the kernel side.   was already
defining MS_RDONLY as both enumerator and macro in jessie, so this
doesn't seem to be a regression.

Downgrading and reassigning to just libc6-dev, but I fully expect this
to be wontfix on that side as well.

Ben.

-- 
Ben Hutchings
The world is coming to an end.  Please log off.



signature.asc
Description: This is a digitally signed message part


Bug#898743: breaks when #included after

2018-05-15 Thread Helmut Grohne
Package: linux-libc-dev,libc6-dev
Severity: serious
Justification: makes systemd ftbfs
User: helm...@debian.org
Usertags: rebootstrap
Control: affects -1 + src:systemd libmount-dev

systemd FTBFS here, because compiling load-fragment.c fails. I spent a while
minimizing that file and it boils down to:

$ cat test.c
#include 
#include 
$ gcc -c test.c
In file included from test.c:1:0:
/usr/include/x86_64-linux-gnu/sys/mount.h:35:3: error: expected identifier 
before numeric constant
   MS_RDONLY = 1,  /* Mount read-only.  */
   ^
$

linux/fs.h #defines MS_RDONLY and then sys/mount.h tries to create an
enum containing MS_RDONLY. That's a problem.

This is also known in fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1497501

That bug hints that sometimes headers need to #included in a certain
order. If that is the case, this bug should be reassigned to src:systemd
asking that  or  must be #included before
. It also means that  should #include
 before defining its own copies of these macros.

Helmut

PS: Let me briefly curse systemd for their use of cyclic #includes
(unit.h <-> cgroup.h) and #pragma once as that works pretty badly
with creduce. Thank you.