package/systemd: import daemon needs headers >= 3.11
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
... since it uses O_TMPFILE as an open(2) flag, and it was only introduced in 3.11.
--- package/systemd/Config.in | 5 +++++ 1 file changed, 5 insertions(+)
package/systemd/Config.in +5 -0
@@ -144,6 +144,7 @@ config BR2_PACKAGE_SYSTEMD_HWDB config BR2_PACKAGE_SYSTEMD_IMPORTD bool "enable import daemon" depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 # O_TMPFILE select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBGCRYPT select BR2_PACKAGE_BZIP2
@@ -157,6 +158,10 @@ config BR2_PACKAGE_SYSTEMD_IMPORTD http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands +comment "import daemon needs a toolchain w/ headers >= 3.11" + depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + config BR2_PACKAGE_SYSTEMD_KDBUS bool "enable kdbus support" help
Signature · 1 line
2.7.4
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
... since it uses
O_TMPFILEas an open(2) flag, and it was only introduced in 3.11.Signed-off-by "Yann E. MORIN" <[email protected]>Cc Gabe Evans <[email protected]>Cc Maxime Hadjinlian <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Peter, All,
On 2016-07-11 21:57 +0200, Peter Korsgaard spake thusly:
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
... since it uses
O_TMPFILEas an open(2) flag, and it was only introduced in 3.11.Signed-off-by "Yann E. MORIN" <[email protected]>Cc Gabe Evans <[email protected]>Cc Maxime Hadjinlian <[email protected]>Committed, thanks.
Had you seen the other patch a bit later, with comments from Thomas, before applying this one?
https://patchwork.ozlabs.org/patch/646796/
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Peter, All,
On 2016-07-11 21:57 +0200, Peter Korsgaard spake thusly:Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
... since it uses
O_TMPFILEas an open(2) flag, and it was only introduced in 3.11.Signed-off-by "Yann E. MORIN" <[email protected]>Cc Gabe Evans <[email protected]>Cc Maxime Hadjinlian <[email protected]>
Quoted 6 lines
Quoted 1 line
Committed, thanks.
Had you seen the other patch a bit later, with comments from Thomas, before applying this one?
I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22, and it built without problems - So I've dropped this patch.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Hello,
Quoted 2 lines · Peter Korsgaard
I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22, and it built without problems - So I've dropped this patch.
So the comment from Yann in https://patchwork.ozlabs.org/patch/646796/
that both were needed is incorrect?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Thomas, Peter, All,
On 2016-07-16 14:26 +0200, Thomas Petazzoni spake thusly:
Quoted 4 lines · Peter Korsgaard
Quoted 3 lines
I hadn't, no. I just did a test build with 3.10 headers and glibc 2.22, and it built without problems - So I've dropped this patch.
Yes, it works because glibc 2.22 (which is >= 2.19) defines it even if not available in the kernel headers).
Quoted 2 lines
So the comment from Yann in https://patchwork.ozlabs.org/patch/646796/
that both were needed is incorrect?
So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And systemd-importd does not build:
src/import/export-raw.c: In function 'reflink_snapshot':
src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
new_fd = open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
^
src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed
O_TMPFILE was added in Linux 3.11; glibc added the corresponding definition in glib-2.19.
glibc \ linux | <= 3.10 | >= 3.11 |
----------------+-----------+-----------+
<= 2.18 | No | No* |
>= 2.19 | Yes | Yes |
*: headers 3.12
So, not sure where to go from there...
Note: I have not tested uClibc or musl, because,well, systemd depends on glibc...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Hi,
Quoted 16 lines
So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And systemd-importd does not build:
src/import/export-raw.c: In function 'reflink_snapshot':
src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
new_fd=open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
^
src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed
O_TMPFILEwas added in Linux 3.11; glibc added the corresponding definition in glib-2.19.glibc \ linux | <= 3.10 | >= 3.11 | ----------------+-----------+-----------+ <= 2.18 | No | No* |
Quoted 8 lines
Quoted 1 line
= 2.19 | Yes | Yes |
*: headers 3.12
So, not sure where to go from there...
Note: I have not tested uClibc or musl, because,well, systemd depends on glibc...
I would just go for >= glibc 2.19. People are unlikely to use old glibc with new kernel headers (and it cannot be built with buildroot).
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH 1/1 package/systemd: import daemon needs headers >= 3.11
Peter, All,
On 2016-07-17 09:02 +0200, Peter Korsgaard spake thusly:
Quoted 21 lines
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
So, I built a toolchain with Linux headers 3.10 and glibc 2.18. And systemd-importd does not build:
src/import/export-raw.c: In function 'reflink_snapshot':
src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
new_fd=open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
^
src/import/export-raw.c:271:26: note: each undeclared identifier is reported only once for each function it appears in Makefile:16515: recipe for target 'src/import/systemd_export-export-raw.o' failed
O_TMPFILEwas added in Linux 3.11; glibc added the corresponding definition in glib-2.19.glibc \ linux | <= 3.10 | >= 3.11 | ----------------+-----------+-----------+ <= 2.18 | No | No* |Quoted 1 line
= 2.19 | Yes | Yes |
*: headers 3.12
Quoted 7 lines
Quoted 4 lines
So, not sure where to go from there...
Note: I have not tested uClibc or musl, because,well, systemd depends on glibc...
I would just go for >= glibc 2.19. People are unlikely to use old glibc with new kernel headers (and it cannot be built with buildroot).
So, should we add GLIBC_AT_LEAST_X_Y symbols?
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'