diff mbox series

[1/1] package/tipidee: fix uclibc build

Message ID 20240724115554.2270864-1-fontaine.fabrice@gmail.com
State Changes Requested
Headers show
Series [1/1] package/tipidee: fix uclibc build | expand

Commit Message

Fabrice Fontaine July 24, 2024, 11:55 a.m. UTC
Set _GNU_SOURCE in CFLAGS to fix the following uclibc build failure
raised since the addition of the package in commit
17deaf60f66fc08a796233920a104e5233b501e0:

src/libtipidee/tipidee_response_header_lastmodified.c: In function 'tipidee_response_header_lastmodified':
src/libtipidee/tipidee_response_header_lastmodified.c:17:36: error: 'const struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?
   17 |   if (!tain_from_timespec(&t, &st->st_mtim)) return 0 ;
      |                                    ^~~~~~~
      |                                    st_mtime

Fixes: 17deaf60f66fc08a796233920a104e5233b501e0
 - http://autobuild.buildroot.org/results/f07d6d6ae2331f9972974093c0503b9d3c6b914a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/tipidee/tipidee.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

J. Neuschäfer July 26, 2024, 8:46 p.m. UTC | #1
On Wed, Jul 24, 2024 at 01:55:54PM +0200, Fabrice Fontaine wrote:
> Set _GNU_SOURCE in CFLAGS to fix the following uclibc build failure
> raised since the addition of the package in commit
> 17deaf60f66fc08a796233920a104e5233b501e0:
>
> src/libtipidee/tipidee_response_header_lastmodified.c: In function 'tipidee_response_header_lastmodified':
> src/libtipidee/tipidee_response_header_lastmodified.c:17:36: error: 'const struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?
>    17 |   if (!tain_from_timespec(&t, &st->st_mtim)) return 0 ;
>       |                                    ^~~~~~~
>       |                                    st_mtime
>
> Fixes: 17deaf60f66fc08a796233920a104e5233b501e0
>  - http://autobuild.buildroot.org/results/f07d6d6ae2331f9972974093c0503b9d3c6b914a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/tipidee/tipidee.mk | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/package/tipidee/tipidee.mk b/package/tipidee/tipidee.mk
> index 915b4f84bd..cb33b153e6 100644
> --- a/package/tipidee/tipidee.mk
> +++ b/package/tipidee/tipidee.mk
> @@ -11,6 +11,7 @@ TIPIDEE_LICENSE_FILES = COPYING
>  TIPIDEE_DEPENDENCIES = skalibs
>
>  TIPIDEE_CONF_OPTS = \
> +	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \

This seems fine as a stop-gap solution, but since upstream documents
that it only needs "A POSIX-compliant system with a standard C
development environment", have you discussed this issue with the
upstream author?


Best regards,
-- jn
Fabrice Fontaine July 26, 2024, 8:59 p.m. UTC | #2
Le ven. 26 juil. 2024 à 22:46, J. Neuschäfer <j.neuschaefer@gmx.net> a écrit :
>
> On Wed, Jul 24, 2024 at 01:55:54PM +0200, Fabrice Fontaine wrote:
> > Set _GNU_SOURCE in CFLAGS to fix the following uclibc build failure
> > raised since the addition of the package in commit
> > 17deaf60f66fc08a796233920a104e5233b501e0:
> >
> > src/libtipidee/tipidee_response_header_lastmodified.c: In function 'tipidee_response_header_lastmodified':
> > src/libtipidee/tipidee_response_header_lastmodified.c:17:36: error: 'const struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?
> >    17 |   if (!tain_from_timespec(&t, &st->st_mtim)) return 0 ;
> >       |                                    ^~~~~~~
> >       |                                    st_mtime
> >
> > Fixes: 17deaf60f66fc08a796233920a104e5233b501e0
> >  - http://autobuild.buildroot.org/results/f07d6d6ae2331f9972974093c0503b9d3c6b914a
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/tipidee/tipidee.mk | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/package/tipidee/tipidee.mk b/package/tipidee/tipidee.mk
> > index 915b4f84bd..cb33b153e6 100644
> > --- a/package/tipidee/tipidee.mk
> > +++ b/package/tipidee/tipidee.mk
> > @@ -11,6 +11,7 @@ TIPIDEE_LICENSE_FILES = COPYING
> >  TIPIDEE_DEPENDENCIES = skalibs
> >
> >  TIPIDEE_CONF_OPTS = \
> > +     CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
>
> This seems fine as a stop-gap solution, but since upstream documents
> that it only needs "A POSIX-compliant system with a standard C
> development environment", have you discussed this issue with the
> upstream author?

Nope, I didn't discuss it with the upstream author.
Thomas doesn't like this patch also:
https://patchwork.ozlabs.org/project/buildroot/patch/20240725132641.333219-1-dario.binacchi@amarulasolutions.com/

As you're the official maintainer of tipidee in buildroot, I'll let
you define the best solution and send the appropriate patch to the
buildroot mailing list.

>
>
> Best regards,
> -- jn

Best Regards,

Fabrice
J. Neuschäfer July 27, 2024, 9:51 a.m. UTC | #3
On Fri, Jul 26, 2024 at 10:59:53PM +0200, Fabrice Fontaine wrote:
> Le ven. 26 juil. 2024 à 22:46, J. Neuschäfer <j.neuschaefer@gmx.net> a écrit :
> >
> > On Wed, Jul 24, 2024 at 01:55:54PM +0200, Fabrice Fontaine wrote:
> > > Set _GNU_SOURCE in CFLAGS to fix the following uclibc build failure
> > > raised since the addition of the package in commit
> > > 17deaf60f66fc08a796233920a104e5233b501e0:
> > >
> > > src/libtipidee/tipidee_response_header_lastmodified.c: In function 'tipidee_response_header_lastmodified':
> > > src/libtipidee/tipidee_response_header_lastmodified.c:17:36: error: 'const struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'?
> > >    17 |   if (!tain_from_timespec(&t, &st->st_mtim)) return 0 ;
> > >       |                                    ^~~~~~~
> > >       |                                    st_mtime
> > >
> > > Fixes: 17deaf60f66fc08a796233920a104e5233b501e0
> > >  - http://autobuild.buildroot.org/results/f07d6d6ae2331f9972974093c0503b9d3c6b914a
> > >
> > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > ---
> > >  package/tipidee/tipidee.mk | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/package/tipidee/tipidee.mk b/package/tipidee/tipidee.mk
> > > index 915b4f84bd..cb33b153e6 100644
> > > --- a/package/tipidee/tipidee.mk
> > > +++ b/package/tipidee/tipidee.mk
> > > @@ -11,6 +11,7 @@ TIPIDEE_LICENSE_FILES = COPYING
> > >  TIPIDEE_DEPENDENCIES = skalibs
> > >
> > >  TIPIDEE_CONF_OPTS = \
> > > +     CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
> >
> > This seems fine as a stop-gap solution, but since upstream documents
> > that it only needs "A POSIX-compliant system with a standard C
> > development environment", have you discussed this issue with the
> > upstream author?
>
> Nope, I didn't discuss it with the upstream author.
> Thomas doesn't like this patch also:
> https://patchwork.ozlabs.org/project/buildroot/patch/20240725132641.333219-1-dario.binacchi@amarulasolutions.com/
>
> As you're the official maintainer of tipidee in buildroot, I'll let
> you define the best solution and send the appropriate patch to the
> buildroot mailing list.

I've determined that this is probably a uclibc bug, and I'm cooking up a
patch that I'll send to the uclibc mailing list soon, to get some review
feedback.

Basically, tipidee already sets _POSIX_C_SOURCE=200809L, which should be
enough to get st_mtim, but uclibc doesn't enable st_mtim based on
POSIX 2008 (or rather, it only does for a few architectures...).


-- jn
diff mbox series

Patch

diff --git a/package/tipidee/tipidee.mk b/package/tipidee/tipidee.mk
index 915b4f84bd..cb33b153e6 100644
--- a/package/tipidee/tipidee.mk
+++ b/package/tipidee/tipidee.mk
@@ -11,6 +11,7 @@  TIPIDEE_LICENSE_FILES = COPYING
 TIPIDEE_DEPENDENCIES = skalibs
 
 TIPIDEE_CONF_OPTS = \
+	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
 	--prefix=/usr \
 	--with-sysdeps=$(STAGING_DIR)/lib/skalibs/sysdeps \
 	--with-include=$(STAGING_DIR)/include \